king
2020-11-16 3ca91a731665962918a026f521c556f4745ebf35
src/tabviews/subtabtable/index.jsx
@@ -473,14 +473,21 @@
  /**
   * @description 表格刷新
   */
  reloadtable = () => {
    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
    this.setState({
      pageIndex: 1
    }, () => {
  reloadtable = (btn) => {
    if (!btn || btn.resetPageIndex !== 'false') {
      MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
      this.setState({
        pageIndex: 1
      }, () => {
        this.loadmaindata()
        this.getStatFieldsValue()
      })
    } else {
      MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid, 'false') // 列表重置
      this.loadmaindata()
      this.getStatFieldsValue()
    })
    }
  }
  /**
@@ -491,25 +498,11 @@
  }
  /**
   * @description 页面刷新,重新获取配置
   */
  reloadview = () => {
    this.setState({ loadingview: true, viewlost: false, lostmsg: '', config: null, searchlist: null, actions: null, columns: null,
      arr_field: '', setting: null, data: null, total: 0, loading: false, pageIndex: 1, pageSize: 10, orderBy: '', search: ''
    }, () => {
      this.loadconfig()
    })
  }
  /**
   * @description 按钮操作完成后(成功或失败),页面刷新,重置页码及选择项
   */
  refreshbyaction = (position) => {
    if (position === 'grid' || position === 'maingrid') {
      this.reloadtable()
      this.props.refreshSupView()
    } else if (position === 'view') {
      this.reloadview()
  refreshbyaction = (position, btn) => {
    if (position === 'grid' || position === 'view' || position === 'maingrid') {
      this.reloadtable(btn)
      this.props.refreshSupView()
    } else if (position === 'trigger') { // 日历子表触发标签点击事件
      this.props.closeModalView && this.props.closeModalView()