From 4c775de9de07291b345fd5c975a87230ddedd5ca Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 20 五月 2020 09:27:13 +0800
Subject: [PATCH] 2020-05-20

---
 src/templates/sharecomponent/chartgroupcomponent/index.jsx |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/templates/sharecomponent/chartgroupcomponent/index.jsx b/src/templates/sharecomponent/chartgroupcomponent/index.jsx
index d67cd4d..ea90177 100644
--- a/src/templates/sharecomponent/chartgroupcomponent/index.jsx
+++ b/src/templates/sharecomponent/chartgroupcomponent/index.jsx
@@ -77,6 +77,8 @@
    * @description 娣诲姞鎴栦慨鏀瑰浘琛�
    */
   handleChart = (item) => {
+    const { config } = this.props
+
     let _type = 'editChart'
     if (!item) {
       _type = 'addChart'
@@ -91,10 +93,19 @@
       }
     }
 
+    let _columns = config.columns.filter(col => ['text', 'number'].includes(col.type) && col.marks && col.marks.filter(_mark => _mark.signType === 'card').length > 0)
+    _columns = _columns.map(col => {
+      return {
+        uuid: col.uuid,
+        value: col.field,
+        text: col.label
+      }
+    })
+
     this.setState({
       card: item,
       modaltype: _type,
-      formlist: getChartViewForm(item, this.props.sysRoles)
+      formlist: getChartViewForm(item, this.props.sysRoles, _columns)
     })
   }
 

--
Gitblit v1.8.0