| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Modal, Form, Row, Col, Select, Radio, Tooltip, Input, InputNumber, Tabs, Button } from 'antd' |
| | | import { Modal, Form, Row, Col, Select, Radio, Tooltip, Input, InputNumber, notification, Tabs, Button } from 'antd' |
| | | import { QuestionCircleOutlined, EditOutlined } from '@ant-design/icons' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | plot: null, |
| | | formlist: null, |
| | | baseFormlist: null, |
| | | view: 'normal', |
| | | view: 'base', |
| | | colorColumns: [ |
| | | { |
| | | title: '指标', |
| | |
| | | |
| | | this.setState({ |
| | | visible: true, |
| | | view: 'normal', |
| | | view: 'base', |
| | | plot: fromJS(config.plot).toJS(), |
| | | baseFormlist: getBaseForm(config.plot), |
| | | formlist: config.subtype === 'ratioboard' ? getRadioOptionForm(config.plot, config.columns) : getOptionForm(config.plot, config.columns) |
| | |
| | | this.baseRef.handleConfirm().then(res => { |
| | | let _plot = {...plot, ...res} |
| | | |
| | | if (!plot.valueField && tab === 'color') { |
| | | this.setState({ |
| | | plot: _plot, |
| | | view: 'normal' |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请添加图表设置。', |
| | | duration: 3 |
| | | }) |
| | | return |
| | | } |
| | | this.setState({ |
| | | plot: _plot, |
| | | view: tab |