| | |
| | | const Iframe = asyncComponent(() => import('./components/iframe')) |
| | | const Calendar = asyncComponent(() => import('./components/calendar')) |
| | | const DebugTable = asyncComponent(() => import('@/tabviews/debugtable')) |
| | | const FlowFloat = asyncComponent(() => import('@/tabviews/zshare/flowFloat')) |
| | | const TableNodes = asyncComponent(() => import('@/tabviews/zshare/tablenodes')) |
| | | const MkInterfaces = asyncComponent(() => import('@/tabviews/custom/components/interfaces')) |
| | | |
| | |
| | | return |
| | | } |
| | | |
| | | if (config.process === 'true') { |
| | | let unset = true |
| | | if (result.works_flow_code && result.works_long_param) { |
| | | try { // 流程信息解析 |
| | | let flowConfig = JSON.parse(window.decodeURIComponent(window.atob(result.works_long_param))) |
| | | flowConfig.flow_code = result.works_flow_code |
| | | flowConfig.flow_name = result.works_flow_name |
| | | config.flow_code = result.works_flow_code |
| | | config.flow_name = result.works_flow_name |
| | | unset = false |
| | | |
| | | window.GLOB.UserCacheMap.set('flow' + MenuID, flowConfig) |
| | | } catch (e) { |
| | | unset = true |
| | | console.warn('Parse Failure') |
| | | } |
| | | } |
| | | |
| | | if (unset) { |
| | | config.interfaces = [] |
| | | this.setState({ |
| | | config: config, |
| | | viewlost: true, |
| | | loadingview: false, |
| | | lostmsg: '抱歉,您访问的页面未设置工作流,请联系管理员。' |
| | | }) |
| | | return |
| | | } |
| | | } else if (result.works_flow_code) { |
| | | Api.getSystemConfig({ |
| | | func: 's_works_flow_param_sso_menu_upt_v6', |
| | | upt_type: 'del', |
| | | works_flow_code: '', |
| | | works_flow_name: '', |
| | | long_param: '', |
| | | flow_id: '', |
| | | menuid: config.MenuID, |
| | | menuname: config.MenuName, |
| | | username: sessionStorage.getItem('User_Name') || '', |
| | | fullName: sessionStorage.getItem('Full_Name') || '' |
| | | }) |
| | | } |
| | | |
| | | // HS不使用自定义设置 |
| | | if (result.LongParamUser && !window.GLOB.mkHS) { |
| | | try { // 配置信息解析 |
| | |
| | | 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, config.$cache, config.$time, config.MenuName, MenuID, MenuID) |
| | | 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') |
| | | |
| | | let params = [] |
| | | let BID = param.$BID || '' |
| | |
| | | } |
| | | } |
| | | |
| | | filterComponent = (components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, searchId, syncId) => { |
| | | filterComponent = (components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, searchId, syncId, process) => { |
| | | return components.filter(item => { |
| | | item.$pageId = pageId |
| | | item.$searchId = searchId |
| | | item.$syncId = syncId |
| | | |
| | | if (process) { |
| | | item.$process = process |
| | | item.$flowId = 'flow' + this.props.MenuID |
| | | } |
| | | |
| | | if (cache) { |
| | | item.$cache = cache |
| | | item.$time = time |
| | |
| | | _searchId = tab.uuid |
| | | } |
| | | |
| | | tab.components = this.filterComponent(tab.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, _searchId, tab.uuid) |
| | | tab.components = this.filterComponent(tab.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, _searchId, tab.uuid, process) |
| | | |
| | | if (_searchId === tab.uuid) { |
| | | tab.components.forEach(cell => { |
| | |
| | | return false |
| | | } |
| | | |
| | | item.components = this.filterComponent(item.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, searchId, syncId) |
| | | item.components = this.filterComponent(item.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, searchId, syncId, process) |
| | | |
| | | return true |
| | | } else if (['pie', 'bar', 'line', 'dashboard', 'scatter', 'chart', 'antvG6', 'antvX6'].includes(item.type)) { |
| | |
| | | group.subButton.Ot = item.wrap.datatype === 'static' ? 'notRequired' : 'requiredSgl' |
| | | } |
| | | |
| | | if (item.$process) { |
| | | group.subButton.$process = true |
| | | group.subButton.$flowId = 'flow' + this.props.MenuID |
| | | } |
| | | |
| | | if (item.$cache && item.$time) { |
| | | group.$cache = item.$cache |
| | | group.$time = item.$time |
| | |
| | | cell.$menuId = item.uuid |
| | | cell.$MenuID = this.props.MenuID |
| | | cell.$view = 'popview' |
| | | |
| | | if (item.$process) { |
| | | cell.$process = true |
| | | cell.$flowId = 'flow' + this.props.MenuID |
| | | } |
| | | |
| | | if (cell.btnstyle) { // 兼容 |
| | | cell.style = cell.style || {} |
| | |
| | | render() { |
| | | const { loadingview, viewlost, config, loading, shortcuts, BID } = this.state |
| | | |
| | | if (!config || viewlost) { |
| | | return ( |
| | | <div className="custom-page-wrap"> |
| | | {loadingview ? <Spin className="view-spin" size="large" /> : null} |
| | | {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} |
| | | <div className="user-tools"> |
| | | {config && config.process === 'true' ? <FlowFloat init={true} config={config}/> : null} |
| | | </div> |
| | | </div> |
| | | ) |
| | | } |
| | | |
| | | return ( |
| | | <div className={`custom-page-wrap ${config && config.minWidth ? 'mk-scroll' : ''} ${loadingview || loading ? 'loading' : ''} ${config && config.mask === 'false' ? 'mk-no-mask' : ''}`} id={this.state.ContainerId} style={config ? config.style : null}> |
| | | {(loadingview || (loading && !config.$cache)) ? <Spin className="view-spin" size="large" /> : null} |
| | | <Row id={config ? 'menu' + config.uuid : ''} style={config && config.minWidth ? {minWidth: config.minWidth} : null} className="component-wrap">{this.getComponents()}</Row> |
| | | {config && config.interfaces.length > 0 ? <MkInterfaces BID={BID} interfaces={config.interfaces}/> : null} |
| | | {config && window.GLOB.breakpoint ? <DebugTable /> : null} |
| | | {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <TableNodes config={config} /> : null} |
| | | {!window.GLOB.mkHS && config ? <SettingComponent config={config} shortcuts={shortcuts || []}/> : null} |
| | | {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} |
| | | <div className={`custom-page-wrap ${config.minWidth ? 'mk-scroll' : ''} ${loading ? 'loading' : ''} ${config.mask === 'false' ? 'mk-no-mask' : ''}`} id={this.state.ContainerId} style={config.style}> |
| | | {loading && !config.$cache ? <Spin className="view-spin" size="large" /> : null} |
| | | <Row id={'menu' + config.uuid} style={{minWidth: config.minWidth || 'unset'}} className="component-wrap">{this.getComponents()}</Row> |
| | | {config.interfaces.length > 0 ? <MkInterfaces BID={BID} interfaces={config.interfaces}/> : null} |
| | | {window.GLOB.breakpoint ? <DebugTable /> : null} |
| | | <div className="user-tools"> |
| | | {config.process === 'true' ? <FlowFloat config={config}/> : null} |
| | | <SettingComponent config={config} shortcuts={shortcuts || []}/> |
| | | <TableNodes config={config} /> |
| | | </div> |
| | | </div> |
| | | ) |
| | | } |