king
2023-06-22 79e4981aa6cc9354276fc54cdf6d14eb08ab7fee
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -135,9 +135,15 @@
      }
      if (_config.wrap.datatype === 'dynamic' && this.loaded) {
        this.autoExec()
        if (_config.wrap.goback === 'true' && _data.$$empty) {
          this.timer && this.timer.stop()
          MKEmitter.emit('closeTabView', _config.$pageId)
        } else {
          this.autoExec()
        }
      }
      if (!_config.wrap.cardType && _data.$$uuid) {
      if (_data.$$uuid) {
        setTimeout(() => {
          this.transferLine()
        }, 200)
@@ -151,6 +157,7 @@
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshLineData', this.refreshLineData)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
    if (config.wrap.datatype === 'public') {
@@ -186,6 +193,7 @@
    MKEmitter.removeListener('mkPublicData', this.mkPublicData)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
    MKEmitter.removeListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.removeListener('refreshLineData', this.refreshLineData)
    MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult)
    this.timer && this.timer.stop()
@@ -213,12 +221,18 @@
      this.loaded = true
      this.setState({sync: false, data: _data}, () => {
        if (selected !== 'false') {
          this.checkTopLine()
        } else if (!config.wrap.cardType && _data.$$uuid) {
          this.transferLine()
        if (config.wrap.goback === 'true' && _data.$$empty) {
          this.timer && this.timer.stop()
          MKEmitter.emit('closeTabView', config.$pageId)
        } else {
          if (selected !== 'false') {
            this.checkTopLine()
          } else if (_data.$$uuid) {
            this.transferLine()
          }
          this.autoExec()
        }
        this.autoExec()
      })
    } else if (config.setting.useMSearch && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
      this.setState({}, () => {
@@ -240,10 +254,17 @@
      this.loaded = true
      this.setState({data: _data}, () => {
        if (selected !== 'false') {
          this.checkTopLine()
        if (config.wrap.goback === 'true' && _data.$$empty) {
          this.timer && this.timer.stop()
          MKEmitter.emit('closeTabView', config.$pageId)
        } else {
          this.transferLine()
          if (selected !== 'false') {
            this.checkTopLine()
          } else {
            this.transferLine()
          }
          this.autoExec()
        }
      })
    }
@@ -307,6 +328,19 @@
    }
  }
  refreshLineData = (menuId, btn, uuid, count) => {
    const { config, data } = this.state
    if (config.uuid !== menuId) return
    let _data = fromJS(data).toJS()
    _data[btn.field] = count
    this.setState({
      data: _data
    })
  }
  resetParentParam = (MenuID, id, data) => {
    const { config } = this.state