king
2022-09-06 bdfec44c9f3a37dbbe05bf14a252ffec04132a86
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)
        })