| | |
| | | mainSearch: PropTypes.any, // 主表搜索条件 |
| | | ContainerId: PropTypes.any, // 三级菜单Container(html) ID |
| | | handleTableId: PropTypes.func, // 控制表格数据切换时,更新在主表中的id |
| | | userConfig: PropTypes.any, // 用户自定义设置 |
| | | } |
| | | |
| | | state = { |
| | |
| | | * @description 获取页面配置信息 |
| | | */ |
| | | async loadconfig () { |
| | | const { permAction, permMenus, Tab, BID, userConfig } = this.props |
| | | const { permAction, permMenus, Tab, BID } = this.props |
| | | |
| | | let param = { |
| | | func: 'sPC_Get_LongParam', |
| | |
| | | } |
| | | |
| | | let chartId = config.charts[0] ? config.charts[0].uuid : '' |
| | | let userConfig = null |
| | | if (window.GLOB.UserCacheMap.has(Tab.uuid)) { |
| | | userConfig = window.GLOB.UserCacheMap.get(Tab.uuid) |
| | | } |
| | | |
| | | if (userConfig) { |
| | | config.action = config.action.map(item => { |
| | | if (userConfig.action[item.uuid]) { |
| | | delete userConfig.action[item.uuid].label |
| | | if (userConfig[item.uuid]) { |
| | | item = {...item, ...userConfig.action[item.uuid]} |
| | | } |
| | | |
| | |
| | | valid = false |
| | | } |
| | | }) |
| | | |
| | | // 添加用户显示列设置 |
| | | if (userConfig) { |
| | | _columns = _columns.map(item => { |
| | | if (userConfig.columns[item.uuid]) { |
| | | delete userConfig.columns[item.uuid].label |
| | | item = {...item, ...userConfig.columns[item.uuid]} |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | |
| | | _columns.sort((pre, next) => { |
| | | return pre.sort - next.sort |
| | | }) |
| | | } |
| | | |
| | | config.setting.tabType = 'sub' |
| | | // 数据源信息预处理 |