| | |
| | | Tab: PropTypes.string, // 弹窗标签 |
| | | MenuID: PropTypes.string, // 菜单Id |
| | | MenuNo: PropTypes.string, // 菜单参数 |
| | | MenuName: PropTypes.string // 菜单名称 |
| | | MenuName: PropTypes.string, // 菜单名称 |
| | | changeTemp: PropTypes.func |
| | | } |
| | | |
| | | state = { |
| | |
| | | config = '' |
| | | } |
| | | |
| | | // HS不使用自定义设置 |
| | | if (result.LongParamUser && !window.GLOB.mkHS) { |
| | | try { // 配置信息解析 |
| | | let userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser))) |
| | | if (userConfig) { |
| | | shortcuts = userConfig.action |
| | | userConfig.printers.forEach(item => { |
| | | window.GLOB.UserCacheMap.set(item.parentId + item.uuid, item) |
| | | }) |
| | | } |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | } |
| | | } |
| | | |
| | | // 页面配置解析错误时提示 |
| | | if (!config) { |
| | | this.setState({ |
| | |
| | | lostmsg: this.state.dict['main.view.unenabled'] |
| | | }) |
| | | return |
| | | } |
| | | |
| | | // 模板错误 |
| | | if (config.Template !== 'CustomPage') { |
| | | if (config.Template === 'BaseTable' || config.Template === 'CommonTable') { |
| | | this.props.changeTemp(MenuID, config.Template) |
| | | } else { |
| | | this.setState({ |
| | | viewlost: true, |
| | | loadingview: false, |
| | | lostmsg: '菜单信息错误,可能原因:1、当前用户无权限;2、打开此菜单的按钮需要更新。' |
| | | }) |
| | | } |
| | | |
| | | return |
| | | } |
| | | |
| | | // HS不使用自定义设置 |
| | | if (result.LongParamUser && !window.GLOB.mkHS) { |
| | | try { // 配置信息解析 |
| | | let userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser))) |
| | | if (userConfig) { |
| | | shortcuts = userConfig.action |
| | | userConfig.printers.forEach(item => { |
| | | window.GLOB.UserCacheMap.set(item.parentId + item.uuid, item) |
| | | }) |
| | | } |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | } |
| | | } |
| | | |
| | | // 数据缓存设置 |
| | |
| | | component = {...component, ...inherit} |
| | | return component |
| | | } else if (component.wrap && component.wrap.datatype === 'public') { |
| | | component.setting.useMSearch = false |
| | | |
| | | return component |
| | | } |
| | | |
| | | if (component.setting) { |
| | | component.setting.useMSearch = component.setting.useMSearch === 'true' |
| | | component.setting.syncRefresh = (component.setting.useMSearch && component.setting.syncRefresh === 'true') |
| | | } |
| | | |
| | | if (component.wrap && component.wrap.datatype === 'static') { |
| | | } else if (component.wrap && component.wrap.datatype === 'static') { |
| | | component.format = '' |
| | | component.setting = component.setting || {} |
| | | component.setting.useMSearch = false |
| | | component.setting.syncRefresh = false |
| | | |
| | | return component |
| | | } else if (!component.setting || !component.format) { |
| | | return component |
| | | } |
| | | |
| | | if (!component.setting || !component.format) return component // 1、不使用系统函数时;2、 没有动态数据 数据格式 array 或 object |
| | | component.setting.useMSearch = component.setting.useMSearch === 'true' |
| | | |
| | | if (component.setting.interType !== 'system') { // 不使用系统函数时 |
| | | component.setting.sync = 'false' |
| | | component.setting.laypage = component.setting.laypage === 'true' |