From 6ca240a14ccf55d4e0a94fff77e95f64db2cdfcc Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 11 十月 2024 17:34:25 +0800
Subject: [PATCH] 2024-10-11

---
 src/tabviews/basetable/index.jsx |   34 +++++++++++++++++++++++-----------
 1 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx
index b02c94b..9af687c 100644
--- a/src/tabviews/basetable/index.jsx
+++ b/src/tabviews/basetable/index.jsx
@@ -2,6 +2,7 @@
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
 import { notification, Spin, Row, Col } from 'antd'
+import md5 from 'md5'
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
@@ -173,6 +174,21 @@
       }
 
       window.GLOB.CacheData.set(MenuID, urlparam)
+
+      if (window.backend && config.allSqls) {
+        let keys = Object.keys(urlparam)
+        config.allSqls.forEach(item => {
+          item.id = md5(window.GLOB.appkey + item.v_id)
+          if (item.type === 'datasource' || item.type === 'excelOut') {
+            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,19 +520,13 @@
 
     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) {
       if (cell.verify.invalid === 'true') {
-        if (item.wrap && (item.wrap.datatype === 'static' || item.wrap.datatype === 'public')) {
-          cell.verify.invalid = 'false'
-        } else if (item.setting && item.setting.maxScript && item.setting.maxScript >= 300) {
+        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'
@@ -632,6 +642,8 @@
         return component
       }
 
+      component.setting.uuid = component.uuid
+
       let _customScript = ''
       let _tailScript = ''
       component.scripts && component.scripts.forEach(script => {
@@ -677,13 +689,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