From 3b103caa6bfc9ed410e67156c3ca1785bf1cecc9 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 19 八月 2022 01:15:31 +0800
Subject: [PATCH] 2022-08-19

---
 src/tabviews/zshare/topSearch/index.jsx |   31 +++++++++++++++++++------------
 1 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx
index 421f356..829e546 100644
--- a/src/tabviews/zshare/topSearch/index.jsx
+++ b/src/tabviews/zshare/topSearch/index.jsx
@@ -398,26 +398,33 @@
     let _searchlist = fromJS(this.state.searchlist).toJS().map(item => {
       if (['select', 'link', 'multiselect', 'checkcard'].includes(item.type) && result[item.field] && result[item.field].length > 0) {
         let options = []
+        let map = new Map()
         result[item.field].forEach(cell => {
           let _item = {
-            key: Utils.getuuid()
-          }
-
-          if (item.type !== 'checkcard') {
-            _item.Value = cell[item.valueField]
-            _item.Text = cell[item.valueText]
-            if (!_item.Text && _item.Text !== 0) {
-              return
-            }
-          } else {
-            _item.$value = cell[item.cardValField]
-            _item = {..._item, ...cell}
+            key: Utils.getuuid(),
+            ParentID: ''
           }
 
           if (item.linkField) {
             _item.ParentID = cell[item.linkField]
           }
 
+          if (item.type !== 'checkcard') {
+            _item.Value = cell[item.valueField]
+            _item.Text = cell[item.valueText] + ''
+            
+            if (!_item.Text || map.has(_item.ParentID + _item.Value)) return
+            
+            map.set(_item.ParentID + _item.Value, 0)
+          } else {
+            _item.$value = cell[item.cardValField]
+            _item = {..._item, ...cell}
+
+            if (map.has(_item.ParentID + _item.$value)) return
+            
+            map.set(_item.ParentID + _item.$value, 0)
+          }
+
           options.push(_item)
         })
 

--
Gitblit v1.8.0