king
2023-06-25 5025901e459ae49d85210573ad38fb3f3c1d9230
src/tabviews/custom/components/card/data-card/index.jsx
@@ -215,6 +215,7 @@
    MKEmitter.addListener('mkCheckAll', this.mkCheckAll)
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshLineData', this.refreshLineData)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
    
    if (config.timer) {
@@ -305,6 +306,7 @@
    MKEmitter.removeListener('mkCheckAll', this.mkCheckAll)
    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()
@@ -375,6 +377,23 @@
    if (position === 'popclose') { // 执行启动弹窗的按钮所选择的刷新项
      btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId)
    }
  }
  refreshLineData = (menuId, btn, uuid, count) => {
    const { config, data } = this.state
    if (config.uuid !== menuId) return
    let _data = fromJS(data).toJS().map(item => {
      if (item.$$uuid === uuid) {
        item[btn.field] = count
      }
      return item
    })
    this.setState({
      data: _data
    })
  }
  checkTopLine = (id) => {
@@ -749,16 +768,31 @@
          this.timer && this.timer.stop()
        }
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else {
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,