king
2024-02-03 06a670976e2145a10ea05207041d3cf3164cd380
src/tabviews/custom/components/table/base-table/index.jsx
@@ -137,7 +137,7 @@
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID)
    let result = await Api.genericInterface(param)
    let result = await Api.genericInterface(param, setting.js_script)
    if (result.status) {
      if (repage === 'false' && result.data && result.data.length === 0 && result.total > 0 && pageIndex > 1) {
        let _pageIndex = Math.ceil(result.total / pageSize)
@@ -566,8 +566,10 @@
        BID: id,
        BData: data
      }, () => {
        this.loadmaindata(true, 'true')
        this.getStatFieldsValue()
        if (!setting.checkBid) {
          this.loadmaindata(true, 'true')
          this.getStatFieldsValue()
        }
      })
    }
  }
@@ -606,6 +608,25 @@
    })
  }
  autoExec = (times) => {
    const { config } = this.state
    if (!config.wrap.autoExec) return
    let btn = document.getElementById('button' + config.wrap.autoExec)
    this.autoTimer && clearTimeout(this.autoTimer)
    if (btn) {
      MKEmitter.emit('triggerBtnId', config.wrap.autoExec, [])
    } else if (!times || times < 20) {
      times = times ? times + 1 : 1
      this.autoTimer = setTimeout(() => {
        this.autoExec(times)
      }, 1000)
    }
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
@@ -621,6 +642,8 @@
    if (config.setting.useMSearch) {
      MKEmitter.addListener('searchRefresh', this.searchRefresh)
    }
    this.autoExec()
  }
  /**