king
2021-10-10 8cdfdd9914d1c4f6cd59176d61869522f51f39e4
src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -79,21 +79,6 @@
    }
    MKEmitter.removeListener('triggerBtnId', this.actionTrigger)
  }
  /**
   * @description 按钮状态改变
   */
  updateStatus = (type) => {
    if (type === 'start') {
      this.setState({
        loading: true
      })
    } else if (type === 'over') {
      this.setState({
        loading: false
      })
    }
  }
  
  /**
   * @description 触发按钮操作
@@ -257,7 +242,7 @@
        })
      }
      this.updateStatus('over')
      this.setState({ loading: false })
      return
    }
@@ -267,7 +252,7 @@
        message: '未获取到工作表《' + sheetName + '》数据!',
        duration: 5
      })
      this.updateStatus('over')
      this.setState({ loading: false })
      return
    } else if (data.length * btn.verify.columns.length > 30000) {
      notification.warning({
@@ -285,7 +270,7 @@
        message: result.errors,
        duration: 5
      })
      this.updateStatus('over')
      this.setState({ loading: false })
      return
    }
@@ -462,7 +447,7 @@
          className={'mk-btn mk-' + btn.class}
          onClick={() => {this.actionTrigger()}}
        >{btn.label}</Button>
        <ExcelIn btn={btn} triggerExcelIn={() => this.updateStatus('start')} returndata={this.getexceldata} ref="excelIn" />
        <ExcelIn btn={btn} triggerExcelIn={() => this.setState({ loading: true })} returndata={this.getexceldata} ref="excelIn" />
      </div>
    } else { // icon、text、 all 卡片
      let label = ''
@@ -491,7 +476,7 @@
          icon={icon}
          onClick={() => {this.actionTrigger()}}
        >{label}</Button>
        <ExcelIn btn={btn} triggerExcelIn={() => this.updateStatus('start')} returndata={this.getexceldata} ref="excelIn" />
        <ExcelIn btn={btn} triggerExcelIn={() => this.setState({ loading: true })} returndata={this.getexceldata} ref="excelIn" />
      </div>
    }
  }