| | |
| | | } |
| | | }) |
| | | |
| | | if (plot.correction) { |
| | | delete plot.correction // 数据修正(已弃用) |
| | | plot.barSize = 35 |
| | | } |
| | | |
| | | this.setState({ |
| | | visible: true, |
| | | view: 'normal', |
| | |
| | | const { getFieldDecorator } = this.props.form |
| | | const { plot, fieldName, enabled, colorOptions, shapeOptions } = this.state |
| | | const fields = [] |
| | | |
| | | if (!plot.customs) return null |
| | | |
| | | fields.push(<Col span={12} key="enabled"> |
| | | <Form.Item label="是否启用" style={{marginBottom: 10}}> |
| | |
| | | if (!err) { |
| | | let _plot = {...plot, ...values} |
| | | |
| | | if (_plot.enabled !== 'true') { |
| | | if (_plot.enabled !== 'true' || _plot.customs.map(_cell => _cell.field).sort().toString() !== _plot.Yaxis.sort().toString()) { |
| | | _plot.enabled = 'false' |
| | | _plot.customs = _plot.Yaxis.map((field, i) => { |
| | | let _item = {field: field} |
| | |
| | | } |
| | | |
| | | this.setState({ |
| | | enabled: _plot.enabled || 'false', |
| | | plot: _plot, |
| | | view: _view |
| | | }) |