king
2023-07-25 54700ad91869ba468190e1462f2aeef3a9d9a5b7
src/tabviews/custom/index.jsx
@@ -204,11 +204,12 @@
      }
      config.$cache = config.cacheLocal === 'true'
      config.$time = config.localCacheTime || 0
      let initInters = []
      config.interfaces = this.formatInterSetting(config.interfaces, regs, MenuID, initInters)
      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, skip, param, MenuID, config.interfaces, popview, config.$cache, config.MenuName, MenuID, MenuID)
      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, skip, param, MenuID, config.interfaces, popview, config.$cache, config.$time, config.MenuName, MenuID, MenuID)
      let params = []
      let BID = param.$BID || ''
@@ -342,10 +343,11 @@
    }
  }
  filterComponent = (components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, popview, cache, MenuName, searchId, syncId) => {
  filterComponent = (components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, popview, cache, time, MenuName, searchId, syncId) => {
    return components.filter(item => {
      item.$pageId = pageId
      item.$cache = cache
      item.$time = time
      item.$searchId = searchId
      item.$syncId = syncId
      
@@ -439,6 +441,8 @@
        item.subtabs = item.subtabs.map(tab => {
          tab.$pageId = pageId
          tab.$cache = cache
          tab.$time = time
          let _searchId = searchId
@@ -451,7 +455,7 @@
            }
          })
          tab.components = this.filterComponent(tab.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, popview, cache, MenuName, _searchId, tab.uuid)
          tab.components = this.filterComponent(tab.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, popview, cache, time, MenuName, _searchId, tab.uuid)
          return tab
        })
@@ -464,7 +468,7 @@
          return false
        }
        item.components = this.filterComponent(item.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, popview, cache, MenuName, searchId, syncId)
        item.components = this.filterComponent(item.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, popview, cache, time, MenuName, searchId, syncId)
        return true
      } else if (['pie', 'bar', 'line', 'dashboard', 'scatter', 'chart', 'antvG6', 'antvX6'].includes(item.type)) {
@@ -1125,6 +1129,22 @@
    this.setState({loading: true, loadingview: false})
    if (config.$cache && config.$time) {
      Api.getLCacheConfig(params[0].uuid, config.$time).then(res => {
        if (!res) {
          this.getMainData(param, params, config.MenuID)
        } else {
          this.setState({
            loading: false
          })
        }
      })
    } else {
      this.getMainData(param, params, config.MenuID)
    }
  }
  getMainData = (param, params, MenuID) => {
    Api.genericInterface(param).then(result => {
      this.setState({
        loading: false
@@ -1153,9 +1173,9 @@
          window.GLOB.SyncData.set(item.name, _data)
        })
        MKEmitter.emit('transferSyncData', config.MenuID)
        MKEmitter.emit('transferSyncData', MenuID)
      } else {
        MKEmitter.emit('transferSyncData', config.MenuID)
        MKEmitter.emit('transferSyncData', MenuID)
        if (!result.message) return
        if (result.ErrCode === 'N') {