king
2024-10-15 aebfe9b957afbf36f45108eebc127ec9e8fe1d0c
src/utils/utils.js
@@ -71,6 +71,7 @@
      uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1))
    }
    uuid = timestamp + uuid.join('')
    uuid = uuid.replace(/minke/ig, 'mnkie')
    return uuid
  }
@@ -416,7 +417,11 @@
          item.$first = true
        }
      }
      if (window.backend && ['select', 'link', 'multiselect', 'checkcard', 'radio'].includes(item.type) && item.resourceType === '1') {
        item.uuid = md5(config.uuid + item.uuid)
      }
      item.oriInitval = item.initval
      if (values) {
@@ -714,6 +719,15 @@
  static getSearchkeys (searches) {
    let searchText = []
    let matchs = {
      'like': '01',
      'not like': '02',
      '=': '03',
      '>': '04',
      '<': '05',
      '>=': '06',
      '<=': '07',
    }
    searches.forEach(item => {
      if (item.forbid || !item.value) return
@@ -834,12 +848,12 @@
        searchText.push({
          key: item.key,
          match: '>=',
          type: 'number',
          type: 'text',
          value: val[0] || -999999999
        }, {
          key: item.key,
          match: '<=',
          type: 'number',
          type: 'text',
          value: val[1] || 999999999
        })
      } else {
@@ -847,6 +861,10 @@
      }
    })
    searchText.forEach(item => {
      item.match = matchs[item.match] || '01'
    })
    return searchText
  }