king
2020-11-13 8190d6e5ac14616d85e3992169ecef6d99d03b76
src/tabviews/verupmanage/subtabtable/index.jsx
@@ -10,6 +10,7 @@
import Utils from '@/utils/utils.js'
import options from '@/store/options.js'
import { buttonConfig, tabConfig } from '../config'
import MKEmitter from '@/utils/events.js'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
import SubAction from '../actionList'
@@ -43,7 +44,6 @@
    setting: null,        // 页面全局设置:数据源、按钮及显示列固定、主键等
    data: null,           // 列表数据集
    selectedData: [],     // 已选表格数据
    resetTable: false,    // 表格重置,值在true与false之间切换,切换时表格重置
    total: 0,             // 总数
    loading: false,       // 列表数据加载中
    pageIndex: 1,         // 页码
@@ -63,9 +63,9 @@
    if (this.state.config && this.props.Tab.supMenu && !is(fromJS(this.props.BID), fromJS(nextProps.BID))) {
      this.setState({
        pageIndex: 1,
        selectedData: [],
        resetTable: !this.state.resetTable,
        selectedData: []
      }, () => {
        MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
        this.loadmaindata(nextProps.BID, 'refresh')
      })
    } else if (this.state.config && nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) {
@@ -303,12 +303,12 @@
   * 含有初始不加载的页面,修改设置
   */
  refreshbysearch = (searches) => {
    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
    this.setState({
      loading: true,
      pageIndex: 1,
      selectedData: [],
      search: searches,
      resetTable: !this.state.resetTable
      search: searches
    }, () => {
      this.loadmaindata()
    })
@@ -341,11 +341,11 @@
   * @description 表格刷新
   */
  reloadtable = () => {
    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
    this.setState({
      loading: true,
      pageIndex: 1,
      selectedData: [],
      resetTable: !this.state.resetTable
      selectedData: []
    }, () => {
      this.loadmaindata()
    })
@@ -488,7 +488,6 @@
              refreshdata={this.refreshbytable}
              buttonTrigger={() => {}}
              handleTableId={this.handleTableId}
              resetTable={this.state.resetTable}
              chgSelectData={this.changeSelectedData}
            />
          </div> : null