king
2024-05-16 b69b5f6329ca5f87932436b7a6c1ddfc3377e10f
src/tabviews/custom/popview/index.jsx
@@ -62,7 +62,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { Tab } = this.props
    const { Tab, param } = this.props
    let config = Tab.config || ''
@@ -106,9 +106,18 @@
    // 权限过滤
    let roleId = sessionStorage.getItem('role_id') || '' // 角色ID
    let balMap = new Map()
    let param = this.props.param || {} // url参数
    let urlparam = {} // url参数
    if (param) {
      Object.keys(param).forEach(key => {
        if (/^\$/.test(key)) {
          urlparam[key] = param[key]
        } else {
          urlparam[key.toLowerCase()] = param[key]
        }
      })
    }
    window.GLOB.CacheData.set(Tab.uuid, param)
    window.GLOB.CacheData.set(Tab.uuid, urlparam)
    let userName = sessionStorage.getItem('User_Name') || ''
    let fullName = sessionStorage.getItem('Full_Name') || ''
@@ -130,7 +139,7 @@
      regs.push({ reg: /@works_flow_code@/ig, value: `'${flow.flow_code || ''}'` })
    }
    config.components = this.filterComponent(config.components, roleId, balMap, param, Tab, Tab.uuid, Tab.uuid)
    config.components = this.filterComponent(config.components, roleId, balMap, urlparam, Tab, Tab.uuid, Tab.uuid)
    
    // 获取主搜索条件
    config.components.forEach(component => {
@@ -144,7 +153,7 @@
    })
    let params = []
    let BID = param.$BID || ''
    let BID = urlparam.$BID || ''
    config.components = this.formatSetting(config.components, params, regs, balMap)
@@ -227,12 +236,7 @@
          if (item.setting.supModule === 'preview') {
            item.setting.supModule = ''
            let val = ''
            Object.keys(urlparam).forEach(key => {
              if (key.toLowerCase() === item.setting.controlField) {
                val = urlparam[key]
              }
            })
            let val = urlparam[item.setting.controlField] || ''
            item.subtabs = item.subtabs.filter(tab => {
              if (tab.$pass) return true
@@ -245,12 +249,7 @@
        if (item.setting.selectField) {
          item.setting.selectField = item.setting.selectField.toLowerCase()
          let val = ''
          Object.keys(urlparam).forEach(key => {
            if (key.toLowerCase() === item.setting.selectField) {
              val = urlparam[key]
            }
          })
          let val = urlparam[item.setting.selectField] || ''
          let activeKey = ''