| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Col, Empty, notification, Button, Row } from 'antd' |
| | | import { Col, notification, Button, Row } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | getComponents = () => { |
| | | const { config } = this.props |
| | | const { mainSearch, data } = this.state |
| | | |
| | | if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />) |
| | | |
| | | return config.components.map(item => { |
| | | if (item.type === 'bar' || item.type === 'line') { |
| | |
| | | const { config } = this.props |
| | | const { printing } = this.state |
| | | |
| | | if (!config.components || config.components.length === 0) return (<div style={config.style}></div>) |
| | | |
| | | return ( |
| | | <div className={'normal-group-wrap ' + (config.setting.layout || '')} id={config.uuid} style={config.style}> |
| | | {config.setting && config.setting.print === 'true' ? <Button className="print-button" icon="printer" loading={printing} onClick={this.print}></Button> : null} |