From bdfec44c9f3a37dbbe05bf14a252ffec04132a86 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 九月 2022 21:24:28 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/zshare/topSearch/index.jsx | 39 +++++++++++++++++++++++++-------------- 1 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index 421f356..857e9f1 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -228,7 +228,7 @@ advanceValues, searchlist: _list }, () => { - if (!window.GLOB.mkHS && options.sysType === 'local' && !window.GLOB.systemType) { + if (!window.GLOB.mkHS && options.sysType === 'local' && window.GLOB.systemType !== 'production') { this.improveSimpleSearch(deForms) } else { this.improveSearch(mainItems, localItems) @@ -241,7 +241,7 @@ const { BID } = this.props let deffers = [] - if (!window.GLOB.mkHS && window.GLOB.systemType !== 'production') { + if (!window.GLOB.mkHS && options.sysType !== 'local') { localItems = [...localItems, ...mainItems] mainItems = [] } @@ -360,6 +360,10 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) + if (item.database === 'sso' && window.GLOB.mainSystemApi) { + param.rduri = window.GLOB.mainSystemApi + } + return ( new Promise(resolve => { setTimeout(() => { @@ -398,26 +402,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