From 6f2b0cab4c9a4dacfebb2d6fbd4ec2fdc14e22ba Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 29 四月 2024 15:29:58 +0800
Subject: [PATCH] 2024-04-29

---
 src/tabviews/custom/index.jsx |   45 ++++++++++++++++++++++++++++-----------------
 1 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index b8acc23..da25be6 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -267,18 +267,6 @@
       config.components.forEach(component => {
         if (component.type !== 'search') return
 
-        if (param.$searchkey) {
-          component.search = component.search.map(item => {
-            if (['text', 'select', 'link', 'checkcard'].includes(item.type) && param.$searchkey === item.field.toLowerCase()) {
-              item.initval = param.$searchval
-            }
-  
-            return item
-          })
-
-          component.$searches = Utils.initMainSearch(component.search)
-        }
-
         window.GLOB.SearchBox.set(MenuID, component.$searches)
 
         if (component.$s_req) {
@@ -566,8 +554,14 @@
         item.type = 'card'
       }
 
-      if (item.wrap && item.wrap.supType === 'multi') { // 鏁版嵁鍗″涓婄骇缁勪欢
-        item.setting.supModule = item.supNodes[0].componentId
+      if (item.wrap && item.wrap.supType === 'multi') { // 鏁版嵁鍗°�乼able澶氫笂绾х粍浠�
+        item.supNodes = item.supNodes.map(node => node.componentId)
+        if (item.supNodes[0]) {
+          item.setting.supModule = item.supNodes[0]
+        } else {
+          item.supNodes = null
+          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') {
@@ -584,6 +578,14 @@
       // 鎼滅储鏉′欢鍒濆鍖�
       if (item.search) {
         Utils.initSearchVal(item)
+
+        if (urlparam.$searchkey) {
+          item.search.forEach(cell => {
+            if (urlparam.$searchkey === cell.field.toLowerCase() && ['text', 'select', 'link', 'checkcard'].includes(cell.type)) {
+              cell.initval = urlparam.$searchval
+            }
+          })
+        }
 
         item.$searches = Utils.initMainSearch(item.search)
 
@@ -958,7 +960,7 @@
     if (cell.syncComponentId) {
       if (cell.syncComponentId === item.setting.supModule) {
         cell.syncComponentId = ''
-        if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
+        if (['line', 'grid', 'line_grid'].includes(cell.execSuccess)) {
           cell.execSuccess = 'mainline'
         }
       } else if (cell.syncComponentId === 'multiComponent') {
@@ -966,8 +968,17 @@
           return m.syncComId.pop() || ''
         })
 
-        if (item.setting.supModule && ids.includes(item.setting.supModule)) {
-          if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
+        if (item.supNodes) {
+          item.supNodes.forEach(node => {
+            if (!ids.includes(node)) return
+
+            if (['line', 'grid', 'line_grid'].includes(cell.execSuccess)) {
+              cell.execSuccess = 'mainline'
+            }
+            ids = ids.filter(id => id !== node)
+          })
+        } else if (item.setting.supModule && ids.includes(item.setting.supModule)) {
+          if (['line', 'grid', 'line_grid'].includes(cell.execSuccess)) {
             cell.execSuccess = 'mainline'
           }
           ids = ids.filter(id => id !== item.setting.supModule)

--
Gitblit v1.8.0