From 102d4a9985980b246b6a2ec9e0ac171c37a659a5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 01 一月 2025 13:04:47 +0800
Subject: [PATCH] 2025-01-01

---
 src/utils/utils-custom.js |   64 +++++++++++++++++++------------
 1 files changed, 39 insertions(+), 25 deletions(-)

diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 8058453..db18898 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -1934,6 +1934,10 @@
           })
         }
         let emptys = []
+        if (cell.Ot !== 'notRequired') {
+          forms.push(...columns)
+        }
+
         cell.verify.uniques.forEach(m => {
           if (m.status === 'false') return
 
@@ -1945,7 +1949,11 @@
         })
 
         if (emptys.length) {
-          errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濆敮涓�鎬ч獙璇佸瓧娈�${emptys.join('銆�')}锛屽湪琛ㄥ崟涓笉瀛樺湪锛乣})
+          if (cell.Ot === 'notRequired') {
+            errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濆敮涓�鎬ч獙璇佸瓧娈�${emptys.join('銆�')}锛屽湪琛ㄥ崟涓笉瀛樺湪锛乣})
+          } else {
+            errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濆敮涓�鎬ч獙璇佸瓧娈�${emptys.join('銆�')}锛屽湪琛ㄥ崟涓庡瓧娈甸泦涓笉瀛樺湪锛乣})
+          }
         }
       }
 
@@ -3385,7 +3393,9 @@
           })
         }
 
-        filterComponent(cell.config.components, _mainSearch, '-' + cell.label, true)
+        let label = (item.name ? '-' + item.name : '') + '-' + cell.label
+
+        filterComponent(cell.config.components, _mainSearch, label, true)
       }
     }
   }
@@ -3794,24 +3804,26 @@
           let _val2 = ''
   
           arr.push(_key)
-          if (_key === 'bid') { // 琛ㄥ崟涓病鏈塨id鍒欎娇鐢ㄧ郴缁焍id鍙橀噺
+          if (_key === 'bid') {
             _val = BID
           } else {
-            _val = `'@mk_${_key}_mk@'`
+            // _val = `'@mk_${_key}_mk@'`
+            _val = `@${_field}`
           }
 
           _fieldValue.push(`${_key}=${_val}`)
 
-          if (_key === 'bid') { // 琛ㄥ崟涓病鏈塨id鍒欎娇鐢ㄧ郴缁焍id鍙橀噺
+          if (_key === 'bid') {
             _val2 = `' + ${BID} + '`
           } else {
-            _val2 = `@mk_${_key}_mk@`
+            // _val2 = `@mk_${_key}_mk@`
+            _val2 = `' + @${_field} + '`
           }
 
           _value.push(`${_labels[index] || ''}锛�${_val2}`)
         })
   
-        if (!arr.includes(primaryKey.toLowerCase())) {
+        if (!arr.includes(primaryKey.toLowerCase()) && btn.Ot !== 'notRequired') {
           _fieldValue.push(`${primaryKey} !=${primaryId}`)
         }
   
@@ -6423,25 +6435,27 @@
 
   let keys = sqls.map(item => item.uuid)
   if (keys.length > Array.from(new Set(keys)).length && !window.GLOB.syscheck) {
-    let m = new Map()
-    let n = new Map()
-    sqls.forEach(item => {
-      if (m.has(item.uuid)) {
-        if (!n.has(item.uuid)) {
-          window.mkInfo(m.get(item.uuid))
-          n.set(item.uuid, true)
+    if (window.backend) {
+      let m = new Map()
+      let n = new Map()
+      sqls.forEach(item => {
+        if (m.has(item.uuid)) {
+          if (!n.has(item.uuid)) {
+            window.mkInfo(m.get(item.uuid))
+            n.set(item.uuid, true)
+          }
+          window.mkInfo(item)
+        } else {
+          m.set(item.uuid, item)
         }
-        window.mkInfo(item)
-      } else {
-        m.set(item.uuid, item)
-      }
-    })
-
-    notification.warning({
-      top: 92,
-      message: '瀛樺湪閲嶅鐨勫悗绔剼鏈琁D锛�',
-      duration: 5
-    })
+      })
+  
+      notification.warning({
+        top: 92,
+        message: '瀛樺湪閲嶅鐨勫悗绔剼鏈琁D锛�',
+        duration: 5
+      })
+    }
 
     return []
   }

--
Gitblit v1.8.0