From 92108e6c93de657838bbd766a9eb4f27d85e1c2d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 05 五月 2020 16:41:28 +0800
Subject: [PATCH] 2020-05-05

---
 src/templates/subtableconfig/index.jsx |   37 +++++--------------------------------
 1 files changed, 5 insertions(+), 32 deletions(-)

diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx
index 5ee3d8c..2747162 100644
--- a/src/templates/subtableconfig/index.jsx
+++ b/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>
                     )

--
Gitblit v1.8.0