| | |
| | | * @description 获取页面配置信息 |
| | | */ |
| | | async loadconfig () { |
| | | const { MenuID, MenuName } = this.props |
| | | const { MenuID, MenuName, param } = this.props |
| | | |
| | | let _param = { |
| | | func: 'sPC_Get_LongParam', |
| | |
| | | let roleId = sessionStorage.getItem('role_id') || '' // 角色ID |
| | | let balMap = new Map() |
| | | let skip = config.permission === 'false' || window.GLOB.mkHS |
| | | 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(MenuID, param) |
| | | window.GLOB.CacheData.set(MenuID, urlparam) |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | |
| | | } |
| | | if (config.urlFields) { |
| | | config.urlFields.forEach(field => { |
| | | let val = `'${param[field] || ''}'` |
| | | let val = `'${urlparam[field.toLowerCase()] || ''}'` |
| | | regs.push({ |
| | | reg: new RegExp('@' + field + '@', 'ig'), |
| | | value: val |
| | |
| | | let initInters = [] |
| | | |
| | | config.interfaces = this.formatInterSetting(config.interfaces, regs, MenuID, initInters, config.MenuName) |
| | | config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, skip, param, MenuID, config.interfaces, config.$cache, config.$time, config.MenuName, MenuID, MenuID, config.process === 'true') |
| | | config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, skip, urlparam, MenuID, config.interfaces, config.$cache, config.$time, config.MenuName, MenuID, MenuID, config.process === 'true') |
| | | |
| | | let params = [] |
| | | let BID = param.$BID || '' |
| | | let BID = urlparam.$BID || '' |
| | | let inherit = {} |
| | | |
| | | if (config.cacheUseful === 'true') { // 缓存继承 |
| | |
| | | |
| | | 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 |
| | |
| | | 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 = '' |
| | | |