king
2024-03-07 cdd5b449130ea4d7223fde4f414a11a7d0c33d6d
src/tabviews/custom/components/table/normal-table/index.jsx
@@ -199,6 +199,8 @@
    }
    this.initExec()
    this.autoExec()
  }
  /**
@@ -301,6 +303,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)
    }
  }
  transferSyncData = (syncId) => {
    const { config } = this.state
@@ -369,6 +390,7 @@
      this.setState({
        data: [],
        selectedData: [],
        loading: false,
        total: 0
      })
      
@@ -379,6 +401,7 @@
      }
      this.loaded = true
      this.requestId = ''
      return
    }
@@ -406,8 +429,12 @@
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID)
    let result = await Api.genericInterface(param)
    this.requestId = config.uuid + new Date().getTime()
    let result = await Api.genericInterface(param, '', '', this.requestId)
    if (result.status) {
      if (result.$requestId && this.requestId !== result.$requestId) return
      this.loaded = true
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [], BID)
@@ -763,7 +790,9 @@
        BID: id,
        BData: data
      }, () => {
        this.loadmaindata(true, 'true')
        if (!setting.checkBid) {
          this.loadmaindata(true, 'true')
        }
      })
    }
  }