king
2024-12-24 2998f413a5e196e99df887787aa4b250cd9f3b78
src/tabviews/custom/components/interfaces/interItem/index.jsx
@@ -1,4 +1,4 @@
import {Component} from 'react'
import { Component } from 'react'
import PropTypes from 'prop-types'
import Api from '@/api'
@@ -15,6 +15,7 @@
  }
  loading = false
  loadTimer = null
  
  state = {
    BID: ''
@@ -39,9 +40,7 @@
    }
    if (config.setting.onload !== 'false') {
      setTimeout(() => {
        this.loadData()
      }, config.setting.delay)
      this.loadData()
    } else {
      MKEmitter.addListener('initFinish', this.initFinish)
    }
@@ -84,9 +83,7 @@
    if (config.MenuID !== MenuID) return
    if (config.setting.onload === 'false') {
      setTimeout(() => {
        this.loadData()
      }, config.setting.delay)
      this.loadData()
    }
  }
@@ -107,13 +104,25 @@
    this.loadData()
  }
  async loadData () {
  loadData = () => {
    const { config } = this.props
    this.loadTimer && clearTimeout(this.loadTimer)
    this.loadTimer = setTimeout(() => {
      this.execLoadData()
    }, config.setting.delay)
  }
  async execLoadData () {
    const { config } = this.props
    const { BID } = this.state
    if (config.setting.supModule && !BID) {
      MKEmitter.emit('mkPublicData', config.uuid, { $$empty: true, $$uuid: '' })
      MKEmitter.emit('resetSelectLine', config.uuid, '', { $$empty: true, $$uuid: '' })
      setTimeout(() => {
        MKEmitter.emit('mkPublicData', config.uuid, { $$empty: true, $$uuid: '' })
        MKEmitter.emit('resetSelectLine', config.uuid, '', { $$empty: true, $$uuid: '' })
      }, 20)
      this.loading = false
      return
    }