| | |
| | | const MkBaseTable = asyncComponent(() => import('@/tabviews/custom/components/table/base-table')) |
| | | const SettingComponent = asyncComponent(() => import('@/tabviews/zshare/settingcomponent')) |
| | | const TableNodes = asyncComponent(() => import('@/tabviews/zshare/tablenodes')) |
| | | const AutoMatic = asyncComponent(() => import('@/tabviews/zshare/automatic')) |
| | | const DebugTable = asyncComponent(() => import('@/tabviews/debugtable')) |
| | | |
| | | class BasePage extends Component { |
| | |
| | | data: null, // 列表数据集 |
| | | loading: false, // 列表数据加载中 |
| | | visible: false, // 标签页控制 |
| | | shortcuts: null // 快捷键 |
| | | shortcuts: null, // 快捷键 |
| | | autoMatic: null |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, skip, param, MenuID) |
| | | |
| | | let autoMatic = null |
| | | if (config.autoMatic && config.autoMatic.enable === 'true') { |
| | | config.components[0].action.forEach(item => { |
| | | if (item.uuid === config.autoMatic.action) { |
| | | autoMatic = config.autoMatic |
| | | autoMatic.OpenType = item.execMode || item.OpenType |
| | | config.components[0].wrap.selected = 'false' |
| | | config.components[0].MenuID = config.components[0].uuid |
| | | config.components[0].autoMatic = true |
| | | item.autoMatic = true |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 获取主搜索条件 |
| | | let mainSearch = [] |
| | | config.components.forEach(component => { |
| | |
| | | BID: BID, |
| | | shortcuts: shortcuts.length > 0 ? shortcuts : null, |
| | | config, |
| | | autoMatic, |
| | | mainSearch |
| | | }, () => { |
| | | setTimeout(() => { // 延时加载状态 |
| | |
| | | |
| | | item.subtabs = item.subtabs.map(tab => { |
| | | tab.components[0].name = tab.label |
| | | if (tab.permission !== 'true') { // 权限未开启不做权限控制 |
| | | skip = true |
| | | } |
| | | tab.components = this.filterComponent(tab.components, roleId, permAction, skip, urlparam, pageId) |
| | | return tab |
| | | }) |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { loadingview, viewlost, config, loading, shortcuts } = this.state |
| | | const { loadingview, viewlost, config, loading, shortcuts, autoMatic } = this.state |
| | | |
| | | return ( |
| | | <div className={'custom-page-wrap ' + (loadingview || loading ? 'loading' : '')} id={this.state.ContainerId} style={config ? config.style : null}> |
| | | {(loadingview || loading) ? <Spin className="view-spin" size="large" /> : null} |
| | | <Row className="component-wrap">{this.getComponents()}</Row> |
| | | {config && window.GLOB.breakpoint ? <DebugTable /> : null} |
| | | {!window.GLOB.mkHS && config && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config.components[0]} /> : null} |
| | | {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <TableNodes config={config} /> : null} |
| | | {!window.GLOB.mkHS && config ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts || []}/> : null} |
| | | {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} |