| | |
| | | import SearchComponent from '@/templates/sharecomponent/searchcomponent' |
| | | import ActionComponent from '@/templates/sharecomponent/actioncomponent' |
| | | import ColumnComponent from '@/templates/sharecomponent/columncomponent' |
| | | import ChartComponent from '@/templates/sharecomponent/chartcomponent' |
| | | |
| | | import MenuForm from '@/templates/zshare/menuform' |
| | | import EditComponent from '@/templates/zshare/editcomponent' |
| | | import SourceElement from '@/templates/zshare/dragsource' |
| | | import ChartComponent from '@/templates/zshare/chartcomponent' |
| | | import Source from './source' |
| | | import './index.scss' |
| | | |
| | |
| | | }) |
| | | } else { |
| | | this.menuformRef.handleConfirm().then(res => { |
| | | let _config = {...config, ...res} |
| | | let _config = {...config, tabName: res.MenuName, tabNo: res.MenuNo, Remark: res.Remark} |
| | | |
| | | if (!is(fromJS(originConfig), fromJS(_config))) { |
| | | this.setState({ |
| | |
| | | }) |
| | | } else { |
| | | this.menuformRef.handleConfirm().then(res => { |
| | | let _config = {...config, ...res} |
| | | let _config = {...config, tabName: res.MenuName, tabNo: res.MenuNo, Remark: res.Remark} |
| | | |
| | | if (!is(fromJS(originConfig), fromJS(_config))) { |
| | | notification.warning({ |
| | |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 图表配置修改后保存 |
| | | */ |
| | | updateChart = (plot) => { |
| | | const { config } = this.state |
| | | let _charts = JSON.parse(JSON.stringify(config.charts)) |
| | | |
| | | _charts = _charts.map(item => { |
| | | if (item.uuid === plot.uuid) { |
| | | if (!is(fromJS(item), fromJS(plot))) { |
| | | let _element = document.getElementById(plot.uuid) |
| | | if (_element) { |
| | | _element.innerHTML = '' |
| | | } |
| | | } |
| | | return plot |
| | | } |
| | | return item |
| | | }) |
| | | |
| | | this.setState({ |
| | | config: {...config, charts: _charts} |
| | | }) |
| | | } |
| | | |
| | | /** |
| | |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <ChartComponent |
| | | type={item.chartType} |
| | | dict={this.state.dict} |
| | | columns={config.columns} |
| | | plotchange={this.updateChart} |
| | | plot={item} |
| | | config={config} |
| | | plotchange={this.updateconfig} |
| | | /> |
| | | </Col> |
| | | ) |