From c8804ceb1fe2dea76f9949c5ea04423876ee2c81 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 28 六月 2024 14:02:47 +0800
Subject: [PATCH] 2024-06-28

---
 src/tabviews/custom/components/table/edit-table/index.jsx |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/tabviews/custom/components/table/edit-table/index.jsx b/src/tabviews/custom/components/table/edit-table/index.jsx
index 116551f..fcb0aa5 100644
--- a/src/tabviews/custom/components/table/edit-table/index.jsx
+++ b/src/tabviews/custom/components/table/edit-table/index.jsx
@@ -251,6 +251,7 @@
     config.dataSource = config.dataSource.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
     config.dataSource = config.dataSource.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
     config.dataSource = config.dataSource.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
+    config.dataSource = config.dataSource.replace(/@lang@/ig, `'${sessionStorage.getItem('lang')}'`)
 
     if (/\s/.test(config.dataSource)) { // 鎷兼帴鍒悕
       config.dataSource = '(' + config.dataSource + ') tb'
@@ -338,8 +339,18 @@
 
       if (col.supField) {
         names = []
-        if (BData && BData[col.supField]) {
-          names = BData[col.supField].split(',')
+        let val = ''
+        if (BData) {
+          let field = col.supField.toLowerCase()
+          Object.keys(BData).forEach(key => {
+            if (key.toLowerCase() === field) {
+              val = BData[key] + ''
+            }
+          })
+        }
+
+        if (val) {
+          names = val.split(',')
 
           if (names.length > fields.length) {
             names.length = fields.length
@@ -743,8 +754,8 @@
       } else {
         this.reloadtable(btn)
       }
-    } else if ((position === 'mainline' || position === 'popclose') && config.setting.supModule && BID) { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠�
-      MKEmitter.emit('reloadData', config.setting.supModule, BID)
+    } else if (['mainline', 'maingrid', 'popclose'].includes(position) && config.setting.supModule) {
+      MKEmitter.emit('reloadData', config.setting.supModule, position === 'maingrid' ? '' : BID)
     } else {
       this.reloadtable(btn)
     }

--
Gitblit v1.8.0