From 34e7681fd12b1c4e4994d3bea1a553870e10bc50 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 11 三月 2023 17:58:54 +0800
Subject: [PATCH] 2023-03-11

---
 src/tabviews/custom/popview/index.jsx |   70 +++++++++++++++++++++++++++++++----
 1 files changed, 62 insertions(+), 8 deletions(-)

diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx
index 6862c55..6149fc0 100644
--- a/src/tabviews/custom/popview/index.jsx
+++ b/src/tabviews/custom/popview/index.jsx
@@ -20,6 +20,7 @@
 const AntvScatter = asyncComponent(() => import('../components/chart/antv-scatter'))
 const DataCard = asyncComponent(() => import('../components/card/data-card'))
 const PropCard = asyncComponent(() => import('../components/card/prop-card'))
+const DoubleDataCard = asyncComponent(() => import('../components/card/double-data-card'))
 const SimpleForm = asyncComponent(() => import('../components/form/simple-form'))
 const StepForm = asyncComponent(() => import('../components/form/step-form'))
 const TabForm = asyncComponent(() => import('../components/form/tab-form'))
@@ -362,7 +363,7 @@
       if (item.wrap && item.wrap.supType === 'multi') { // 鏁版嵁鍗″涓婄骇缁勪欢
         mutil = true
         item.setting.supModule = item.supNodes[0].componentId
-      } else if (item.setting && item.setting.supModule) {
+      } else if (item.setting && item.setting.supModule && typeof(item.setting.supModule) !== 'string') {
         let pid = item.setting.supModule.pop()
         if (pid && pid !== 'empty') {
           item.setting.supModule = pid
@@ -384,11 +385,22 @@
 
           if (!mutil && cell.syncComponentId === item.setting.supModule) {
             cell.syncComponentId = ''
+            if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
+              cell.execSuccess = 'mainline'
+            }
           }
 
           if (cell.btnstyle) { // 鍏煎
             cell.style = cell.style || {}
             cell.style = {...cell.style, ...cell.btnstyle}
+          }
+
+          if (cell.controlField) {
+            if (/,/ig.test(cell.controlVal)) {
+              cell.controlVals = cell.controlVal.split(',')
+            } else {
+              cell.controlVals = [(cell.controlVal || '')]
+            }
           }
 
           return true
@@ -416,10 +428,16 @@
 
               if (!mutil && cell.syncComponentId === item.setting.supModule) {
                 cell.syncComponentId = ''
+                if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
+                  cell.execSuccess = 'mainline'
+                }
               }
-              if (card.btnstyle) { // 鍏煎
-                card.style = card.style || {}
-                card.style = {...card.style, ...card.btnstyle}
+              if (cell.controlField) {
+                if (/,/ig.test(cell.controlVal)) {
+                  cell.controlVals = cell.controlVal.split(',')
+                } else {
+                  cell.controlVals = [(cell.controlVal || '')]
+                }
               }
             } else if (['text', 'number', 'formula'].includes(cell.eleType)) {
               if (!cell.height) {
@@ -450,11 +468,17 @@
 
               if (!mutil && cell.syncComponentId === item.setting.supModule) {
                 cell.syncComponentId = ''
+                if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
+                  cell.execSuccess = 'mainline'
+                }
               }
 
-              if (card.btnstyle) { // 鍏煎
-                card.style = card.style || {}
-                card.style = {...card.style, ...card.btnstyle}
+              if (cell.controlField) {
+                if (/,/ig.test(cell.controlVal)) {
+                  cell.controlVals = cell.controlVal.split(',')
+                } else {
+                  cell.controlVals = [(cell.controlVal || '')]
+                }
               }
             } else if (['text', 'number', 'formula'].includes(cell.eleType)) {
               if (!cell.height) {
@@ -490,6 +514,16 @@
 
             if (cell.syncComponentId === item.wrap.supModule) {
               cell.syncComponentId = ''
+              if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
+                cell.execSuccess = 'mainline'
+              }
+            }
+            if (cell.controlField) {
+              if (/,/ig.test(cell.controlVal)) {
+                cell.controlVals = cell.controlVal.split(',')
+              } else {
+                cell.controlVals = [(cell.controlVal || '')]
+              }
             }
           } else if (['text', 'number', 'formula'].includes(cell.eleType)) {
             if (!cell.height) {
@@ -519,11 +553,22 @@
 
             if (cell.syncComponentId === item.setting.supModule) {
               cell.syncComponentId = ''
+              if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
+                cell.execSuccess = 'mainline'
+              }
             }
 
             if (cell.btnstyle) { // 鍏煎
               cell.style = cell.style || {}
               cell.style = {...cell.style, ...cell.btnstyle}
+            }
+
+            if (cell.controlField) {
+              if (/,/ig.test(cell.controlVal)) {
+                cell.controlVals = cell.controlVal.split(',')
+              } else {
+                cell.controlVals = [(cell.controlVal || '')]
+              }
             }
 
             return true
@@ -552,6 +597,9 @@
 
           if (group.subButton.syncComponentId === item.setting.supModule) {
             group.subButton.syncComponentId = ''
+            if (group.subButton.execSuccess === 'grid') {
+              group.subButton.execSuccess = 'mainline'
+            }
           }
 
           group.fields = group.fields.map(cell => {
@@ -712,7 +760,7 @@
 
       // dataName 绯荤粺鐢熸垚鐨勬暟鎹簮鍚嶇О
       if (component.setting.sync === 'true') {
-        component.dataName = Utils.getdataName()
+        component.dataName = 'mk' + component.uuid.slice(-18)
       }
 
       // floor    缁勪欢鐨勫眰绾�
@@ -864,6 +912,12 @@
             <PropCard config={item} data={data} mainSearch={mainSearch}/>
           </Col>
         )
+      } else if (item.type === 'card' && item.subtype === 'dualdatacard') {
+        return (
+          <Col span={item.width} style={style} key={item.uuid}>
+            <DoubleDataCard config={item} mainSearch={mainSearch}/>
+          </Col>
+        )
       } else if (item.type === 'table' && item.subtype === 'basetable') {
         return (
           <Col span={item.width} style={style} key={item.uuid}>

--
Gitblit v1.8.0