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/basetable/index.jsx |   38 +++++++++++++++++++++++++-------------
 1 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx
index f2dd7d0..83f496c 100644
--- a/src/tabviews/basetable/index.jsx
+++ b/src/tabviews/basetable/index.jsx
@@ -208,7 +208,7 @@
           }
         })
       }
-      
+
       // 鑾峰彇涓绘悳绱㈡潯浠�
       config.components.forEach(component => {
         if (component.type === 'tabs') return
@@ -346,11 +346,6 @@
         item.name = (MenuName || '')
       }
 
-      // 鎼滅储鏉′欢鍒濆鍖�
-      Utils.initSearchVal(item)
-
-      item.$searches = Utils.initMainSearch(item.search)
-
       if (item.setting.supModule) {
         let pid = item.setting.supModule.pop()
         if (pid && pid !== 'empty') {
@@ -359,6 +354,11 @@
           item.setting.supModule = ''
         }
       }
+
+      // 鎼滅储鏉′欢鍒濆鍖�
+      Utils.initSearchVal(item)
+
+      item.$searches = Utils.initMainSearch(item.search)
 
       let statFields = []
       let getCols = (cols) => {
@@ -484,7 +484,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'
@@ -506,12 +506,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
       }
     }
 

--
Gitblit v1.8.0