From c10fc10d5fd307a7b334bcde6af5c1175aaa0410 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 28 八月 2024 17:47:28 +0800
Subject: [PATCH] 2024-08-28

---
 src/tabviews/basetable/index.jsx |   90 +++++++++++++++++++++++++++------------------
 1 files changed, 54 insertions(+), 36 deletions(-)

diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx
index a8c9ff9..c613378 100644
--- a/src/tabviews/basetable/index.jsx
+++ b/src/tabviews/basetable/index.jsx
@@ -174,6 +174,20 @@
 
       window.GLOB.CacheData.set(MenuID, urlparam)
 
+      if (window.backend && config.allSqls) {
+        let keys = Object.keys(urlparam)
+        config.allSqls.forEach(item => {
+          if (item.type === 'datasource') {
+            item.urlkeys = keys
+            item.urlparam = urlparam
+            if (config.flow_code) {
+              item.works_flow_code = config.flow_code
+            }
+          }
+          window.GLOB.CacheData.set('sql_' + item.uuid, item)
+        })
+      }
+
       let userName = sessionStorage.getItem('User_Name') || ''
       let fullName = sessionStorage.getItem('Full_Name') || ''
 
@@ -504,45 +518,47 @@
 
     if (cell.OpenType === 'excelOut') { // 瀵煎嚭
       cell.$menuName = item.$menuname
-
-      if (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0) {
-        cell.errorType = 'error1'
-      } else if (cell.intertype === 'system' && cell.verify.dataType !== 'custom' && item.setting.interType !== 'system') {
-        cell.errorType = 'error2'
-      }
+    } else if (cell.OpenType === 'pop' && cell.modal) {
+      cell.modal.uuid = cell.uuid + 'pop'
     }
 
-    if (cell.verify && cell.verify.invalid === 'true') {
-      if (item.setting.maxScript && item.setting.maxScript >= 300) {
-        cell.verify.invalid = 'false'
-      } else if (cell.intertype !== 'system' && cell.procMode !== 'system') {
-        cell.verify.invalid = 'false'
-      } else if (cell.sqlType === 'insert') {
-        cell.verify.invalid = 'false'
-      } else if (cell.Ot === 'notRequired') {
-        cell.verify.invalid = 'false'
-      }
-    }
-
-    if (cell.verify && cell.verify.preHandle === 'true') {
-      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 (cell.verify) {
+      if (cell.verify.invalid === 'true') {
+        if (item.setting && item.setting.maxScript && item.setting.maxScript >= 300) {
+          cell.verify.invalid = 'false'
+        } else if (cell.intertype !== 'system' && cell.procMode !== 'system') {
+          cell.verify.invalid = 'false'
+        } else if (cell.sqlType === 'insert') {
+          cell.verify.invalid = 'false'
+        } else if (cell.Ot === 'notRequired') {
+          cell.verify.invalid = 'false'
         }
       }
-      if (/#position-inner/.test(script)) {
-        cell.$innerScript = script
+
+      if (cell.verify.linkEnable === 'true' && /@/.test(cell.verify.linkUrl)) {
+        cell.returnValue = 'true'
       }
-      if (/#position-outer/.test(script)) {
-        cell.$outerScript = script
-      }
-      if (/#position-callback/.test(script)) {
-        cell.$callbackScript = script
+
+      if (cell.verify.preHandle === 'true') {
+        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
+        }
       }
     }
 
@@ -624,6 +640,8 @@
         return component
       }
 
+      component.setting.uuid = component.uuid
+
       let _customScript = ''
       let _tailScript = ''
       component.scripts && component.scripts.forEach(script => {
@@ -669,13 +687,13 @@
       component.setting.customScript = _customScript // 鏁寸悊鍚庤嚜瀹氫箟鑴氭湰
       component.setting.tailScript = _tailScript     // 鍚庣疆鑷畾涔夎剼鏈�
 
-      component.setting.custompage = /@pageSize@|@orderBy@/i.test(component.setting.dataresource + component.setting.customScript)
+      component.setting.custompage = /@pageSize@|@orderBy@|@mk_total/i.test(component.setting.dataresource + component.setting.customScript)
 
       if (!component.setting.execute || component.setting.custompage) {
         component.forbidLine = true
       }
       
-      component.setting.delay = delay
+      component.setting.delay = delay + (component.setting.delay || 0)
       delay += 20
 
       return component

--
Gitblit v1.8.0