From d1cd5af5adb53e91efdd278328e1b6f8ad834fb5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 06 二月 2025 21:11:56 +0800
Subject: [PATCH] Merge branch 'positec' into dms

---
 src/components/normalform/modalform/mkTable/index.jsx |   32 +++++++++++++++++---------------
 1 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/src/components/normalform/modalform/mkTable/index.jsx b/src/components/normalform/modalform/mkTable/index.jsx
index 1baf22f..6c9d01f 100644
--- a/src/components/normalform/modalform/mkTable/index.jsx
+++ b/src/components/normalform/modalform/mkTable/index.jsx
@@ -220,21 +220,8 @@
 
   changeMenu = (record) => {
     let MenuId = record.menu
-    if (MenuId === 'IM') {
-      if (!sessionStorage.getItem('instantMessage')) return
 
-      let param = {
-        MenuID: sessionStorage.getItem('instantMessage'),
-        copyMenuId: '',
-        type: 'view'
-      }
-  
-      param = window.btoa(window.encodeURIComponent(JSON.stringify(param)))
-  
-      MKEmitter.emit('changeEditMenu', {routerUrl: '/imdesign/' + param})
-    } else {
-      MKEmitter.emit('changeEditMenu', { ...record, MenuID: MenuId})
-    }
+    MKEmitter.emit('changeEditMenu', { ...record, MenuID: MenuId})
   }
 
   isEditing = record => record.uuid === this.state.editingKey
@@ -276,7 +263,18 @@
     columns.forEach(col => {
       if (col.unique !== true || !unique) return
 
-      let _index = newData.findIndex(item => record.uuid !== item.uuid && record[col.dataIndex] === item[col.dataIndex])
+      let _index = newData.findIndex(item => {
+        if (record.uuid === item.uuid) return false
+
+        if (col.inputType === 'cascader') {
+          if (!Array.isArray(record[col.dataIndex]) || !Array.isArray(item[col.dataIndex])) {
+            return false
+          }
+          return record[col.dataIndex].toString() === item[col.dataIndex].toString()
+        }
+
+        return record[col.dataIndex] === item[col.dataIndex]
+      })
 
       if (_index > -1) {
         notification.warning({
@@ -341,6 +339,10 @@
         if (_options.length) {
           col.extends.forEach(n => {
             record[n.value] = _options.map(o => o[n.key]).join(' / ')
+
+            if (n.mutilLabel && !record[n.mutilLabel]) {
+              record[n.mutilLabel] = _options[_options.length - 1][n.key]
+            }
           })
         }
       } else {

--
Gitblit v1.8.0