king
2020-05-05 92108e6c93de657838bbd766a9eb4f27d85e1c2d
src/templates/subtableconfig/index.jsx
@@ -20,11 +20,11 @@
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'
@@ -739,7 +739,7 @@
      })
    } 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({
@@ -771,7 +771,7 @@
      })
    } 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({
@@ -905,31 +905,6 @@
        })
      })
    }
  }
  /**
   * @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}
    })
  }
  /**
@@ -1152,11 +1127,9 @@
                    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>
                    )