From 06a670976e2145a10ea05207041d3cf3164cd380 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 03 二月 2024 18:13:25 +0800
Subject: [PATCH] Merge branch 'positec' into dms

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

diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index 5af3787..aa98810 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -249,7 +249,7 @@
 
       let initInters = []
 
-      config.interfaces = this.formatInterSetting(config.interfaces, regs, MenuID, initInters)
+      config.interfaces = this.formatInterSetting(config.interfaces, regs, MenuID, initInters, config.MenuName)
       config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, skip, param, MenuID, config.interfaces, config.$cache, config.$time, config.MenuName, MenuID, MenuID, config.process === 'true')
 
       let params = []
@@ -563,13 +563,6 @@
         item.type = 'card'
       }
 
-      // 鎼滅储鏉′欢鍒濆鍖�
-      if (item.search) {
-        Utils.initSearchVal(item)
-
-        item.$searches = Utils.initMainSearch(item.search)
-      }
-
       if (item.wrap && item.wrap.supType === 'multi') { // 鏁版嵁鍗″涓婄骇缁勪欢
         item.setting.supModule = item.supNodes[0].componentId
       } else if (item.setting && item.setting.supModule && typeof(item.setting.supModule) !== 'string') {
@@ -579,6 +572,13 @@
         } else {
           item.setting.supModule = ''
         }
+      }
+
+      // 鎼滅储鏉′欢鍒濆鍖�
+      if (item.search) {
+        Utils.initSearchVal(item)
+
+        item.$searches = Utils.initMainSearch(item.search)
       }
 
       let pass = skip
@@ -887,7 +887,7 @@
     }
 
     if (cell.OpenType === 'excelOut') { // 瀵煎嚭
-      cell.$menuName = item.name
+      cell.$menuName = item.$menuname
 
       if (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0) {
         cell.errorType = 'error1'
@@ -919,12 +919,24 @@
     }
 
     if (cell.verify && cell.verify.preHandle === 'true') {
-      try {
-        // eslint-disable-next-line
-        let func = new Function('btn', 'systemType', cell.verify.pre_func)
-        func(cell, window.GLOB.systemType)
-      } catch (e) {
-        console.warn(e)
+      let script = cell.verify.pre_func
+      if (!/#position-/.test(script) || /#position-init/.test(script)) {
+        try {
+          // eslint-disable-next-line
+          let func = new Function('btn', 'position', 'systemType', script)
+          func(cell, 'init', window.GLOB.systemType)
+        } catch (e) {
+          console.warn(e)
+        }
+      }
+      if (/#position-inner/.test(script)) {
+        cell.$innerScript = script
+      }
+      if (/#position-outer/.test(script)) {
+        cell.$outerScript = script
+      }
+      if (/#position-callback/.test(script)) {
+        cell.$callbackScript = script
       }
     }
 
@@ -1175,7 +1187,7 @@
   }
 
   // 鏍煎紡鍖栭粯璁よ缃�
-  formatInterSetting = (inters, regs, MenuID, initInters) => {
+  formatInterSetting = (inters, regs, MenuID, initInters, MenuName) => {
     if (!inters) return []
 
     let initlimit = false
@@ -1233,7 +1245,7 @@
       })
       delete inter.scripts
 
-      inter.setting.$name = '鍏叡鏁版嵁婧�-' + inter.setting.name
+      inter.setting.$name = (MenuName || '') + '-鍏叡鏁版嵁婧�-' + inter.setting.name
       inter.setting.execute = inter.setting.execute !== 'false'
 
       if (!inter.setting.execute) {

--
Gitblit v1.8.0