king
2025-05-23 24842b40de5cd60700bf69dfd38a0332f5431e36
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -49,8 +49,12 @@
    }
    if (_config.wrap.datatype === 'dynamic') {
      _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true'
      _config.setting.onload = _config.setting.sync === 'true' ? 'false' : _config.setting.onload || 'true'
      if (_config.setting.supModule && !BID) {
        _config.setting.onload = 'false'
      }
      if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) {
        _data = window.GLOB.SyncData.get(_config.dataName) || []
@@ -72,6 +76,14 @@
      this.loaded = true
    } else if (_config.wrap.datatype === 'static') {
      this.loaded = true
      _config.subcards.forEach(card => {
        card.elements.forEach(ele => {
          if (ele.eleType === 'button') return
          if (ele.datatype === 'dynamic' && ele.field) {
            ele.field = ele.field.toLowerCase()
          }
        })
      })
    }
    _data.$$BID = BID || ''
@@ -80,7 +92,7 @@
    if (_config.wrap.datatype === 'static' && BData) {
      Object.keys(BData).forEach(key => {
        if (/\$/.test(key)) return
        _data[key] = BData[key]
        _data[key.toLowerCase()] = BData[key]
      })
    }
@@ -111,7 +123,7 @@
    let selected = _config.wrap.selected || 'false'
    _config.wrap.selStyle = _config.wrap.selStyle || 'active'
    _config.wrap.selStyle = _config.wrap.selStyle || 'none'
    _config.wrap.priKeyType = _config.wrap.priKeyType || 'static'
    _config.wrap.scale = _config.wrap.scale === 'true' ? 'scale' : ''
@@ -149,7 +161,7 @@
      MKEmitter.addListener('searchRefresh', this.searchRefresh)
    }
    if (config.timer && config.wrap.datatype === 'dynamic') {
    if (config.timer && config.wrap.datatype !== 'public') {
      this.timer = new TimerTask()
      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {this.loadData('timer')})
    }
@@ -199,6 +211,8 @@
              this.setState({data: _data}, () => {
                if (selected !== 'false') {
                  this.checkTopLine()
                } else if (config.wrap.empty === 'hidden') {
                  MKEmitter.emit('resetSelectLine', config.uuid, _data.$$uuid || '', _data)
                }
              })
            })
@@ -274,7 +288,7 @@
        } else {
          if (selected !== 'false') {
            this.checkTopLine()
          } else if (data.$$uuid) {
          } else {
            this.transferLine()
          }
          this.autoExec()
@@ -328,7 +342,7 @@
      } else {
        if (selected !== 'false') {
          this.checkTopLine()
        } else if (_data.$$uuid) {
        } else {
          this.transferLine()
        }
        this.autoExec()
@@ -387,8 +401,16 @@
    this.autoTimer && clearTimeout(this.autoTimer)
    if (btn) {
      MKEmitter.emit('triggerBtnId', config.wrap.autoExec, data.$$empty ? [] : [data])
    if (config.setting.supModule && config.wrap.datatype === 'static' && !data.$$BID) {
    } else if (btn) {
      if (config.wrap.execDelay) {
        setTimeout(() => {
          MKEmitter.emit('triggerBtnId', config.wrap.autoExec, data.$$empty ? [] : [data])
        }, config.wrap.execDelay)
      } else {
        MKEmitter.emit('triggerBtnId', config.wrap.autoExec, data.$$empty ? [] : [data])
      }
    } else if (!times || times < 20) {
      times = times ? times + 1 : 1
      this.autoTimer = setTimeout(() => {
@@ -418,7 +440,12 @@
  transferLine = () => {
    const { config, data } = this.state
    if (config.wrap.cardType) return
    if (config.wrap.cardType) {
      if (config.wrap.empty === 'hidden') {
        MKEmitter.emit('resetSelectLine', config.uuid, data.$$uuid || '', data)
      }
      return
    }
    MKEmitter.emit('resetSelectLine', config.uuid, data.$$uuid || '', data)
  }
@@ -461,7 +488,9 @@
    
    if (id !== this.state.BID || id !== '') {
      this.setState({ BID: id, BData: data }, () => {
        this.loadData()
        if (config.wrap.datatype !== 'public') {
          this.loadData()
        }
      })
    }
  }
@@ -506,17 +535,17 @@
      if (BData) {
        Object.keys(BData).forEach(key => {
          if (/\$/.test(key)) return
          _data[key] = BData[key]
          _data[key.toLowerCase()] = BData[key]
        })
      }
      this.setState({
        data: _data,
      }, () => {
        if (!btn) {
          this.autoExec()
        }
      })
      if (!btn) {
        this.autoExec()
      }
      return
    } else if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({