king
2022-03-09 1b913a7b9ceace4909594225a201efe9fbae93d3
src/tabviews/zshare/topSearch/index.jsx
@@ -116,7 +116,15 @@
      }
      if (item.advanced && item.initval) {
        advanceValues.push({field: item.field, type: item.type, label: item.label, value: item.initval})
        let val = item.initval
        if (item.precision === 'hour') {
          if (/,/ig.test(val)) {
            val = val.split(',').map(m => m + ':00').join(',')
          } else {
            val = val + ':00'
          }
        }
        advanceValues.push({field: item.field, type: item.type, label: item.label, value: val})
      }
      if (item.type === 'group') {
@@ -580,7 +588,15 @@
        record[item.field] = item.initval
      }
      if (item.advanced && item.initval) {
        advanceValues.push({field: item.field, type: item.type, label: item.label, value: item.initval})
        let val = item.initval
        if (item.precision === 'hour') {
          if (/,/ig.test(val)) {
            val = val.split(',').map(m => m + ':00').join(',')
          } else {
            val = val + ':00'
          }
        }
        advanceValues.push({field: item.field, type: item.type, label: item.label, value: val})
      }
      return item
@@ -667,6 +683,7 @@
          label: item.label,
          match: item.match,
          required: item.required,
          precision: item.precision || '',
          forbid: item.$forbid
        })
      }
@@ -684,6 +701,13 @@
      let val = this.record[item.field]
      if (val || val === 0) {
        if (item.precision === 'hour') {
          if (/,/ig.test(val)) {
            val = val.split(',').map(m => m + ':00').join(',')
          } else {
            val = val + ':00'
          }
        }
        advanceValues.push({field: item.field, type: item.type, label: item.label, value: val})
      }
    })