From a1e9b18a4dbfd21e1bf4d5cb60974ac2f0115efd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 30 五月 2025 15:18:44 +0800
Subject: [PATCH] 2025-05-30

---
 src/tabviews/basetable/index.jsx |   40 ++++++++++++++++++++++++----------------
 1 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx
index d53e693..2c95369 100644
--- a/src/tabviews/basetable/index.jsx
+++ b/src/tabviews/basetable/index.jsx
@@ -55,6 +55,10 @@
       func: 'sPC_Get_LongParam',
       MenuID: MenuID
     }
+
+    if (window.GLOB.mkHS) {
+      _param.lang = 'zh-CN'
+    }
     
     let result = await Api.getCacheConfig(_param)
 
@@ -180,21 +184,19 @@
         }
       }
 
+      if (config.urlFields && config.urlFields.length) {
+        config.urlFields.forEach(field => {
+          let key = field.toLowerCase()
+          if (urlparam[key] !== undefined) return
+
+          urlparam[key] = ''
+        })
+      }
+
       window.GLOB.CacheData.set(MenuID, urlparam)
 
       if (window.backend && config.allSqls) {
         let keys = Object.keys(urlparam)
-
-        if (config.urlFields && config.urlFields.length) {
-          config.urlFields.forEach(field => {
-            let key = field.toLowerCase()
-            if (keys.includes(key)) return
-
-            keys.push(key)
-            urlparam[key] = ''
-          })
-        }
-        
         config.allSqls.forEach(item => {
           item.id = md5(window.GLOB.appkey + item.v_id)
           if (['datasource', 'interface', 'excelOut'].includes(item.type)) {
@@ -224,7 +226,7 @@
       }
       if (config.urlFields) {
         config.urlFields.forEach(field => {
-          let val = `'${urlparam[field.toLowerCase()] || ''}'`
+          let val = `'${urlparam[field.toLowerCase()]}'`
           regs.push({
             reg: new RegExp('@' + field + '@', 'ig'),
             value: val
@@ -694,9 +696,6 @@
       if (!component.setting.execute) {
         component.setting.dataresource = ''
       }
-      if (/\s/.test(component.setting.dataresource)) {
-        component.setting.dataresource = '(' + component.setting.dataresource + ') tb'
-      }
   
       if (sessionStorage.getItem('dataM') === 'true') { // 鏁版嵁鏉冮檺
         component.setting.dataresource = component.setting.dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
@@ -716,8 +715,17 @@
 
       component.setting.customScript = _customScript // 鏁寸悊鍚庤嚜瀹氫箟鑴氭湰
       component.setting.tailScript = _tailScript     // 鍚庣疆鑷畾涔夎剼鏈�
+      component.setting.custompage = false
 
-      component.setting.custompage = /@pageSize@|@orderBy@|@mk_total/i.test(component.setting.dataresource + component.setting.customScript)
+      if (/order\s+by\s+sort_id\s*$/i.test(component.setting.dataresource)) {
+        component.setting.custompage = true
+      } else if (/@pageSize@|@orderBy@|@mk_total/i.test(component.setting.dataresource + component.setting.customScript)) {
+        component.setting.custompage = true
+      }
+
+      if (/\s/.test(component.setting.dataresource)) {
+        component.setting.dataresource = '(' + component.setting.dataresource + ') tb'
+      }
 
       if (!component.setting.execute || component.setting.custompage) {
         component.forbidLine = true

--
Gitblit v1.8.0