From af6486b3629d23e426ce85b87dbc20dfa15b1afe Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 07 十一月 2022 18:50:27 +0800 Subject: [PATCH] 2022-11-07 --- src/tabviews/basetable/index.jsx | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx index f788565..7ec750a 100644 --- a/src/tabviews/basetable/index.jsx +++ b/src/tabviews/basetable/index.jsx @@ -17,6 +17,7 @@ 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 { @@ -42,7 +43,8 @@ data: null, // 鍒楄〃鏁版嵁闆� loading: false, // 鍒楄〃鏁版嵁鍔犺浇涓� visible: false, // 鏍囩椤垫帶鍒� - shortcuts: null // 蹇嵎閿� + shortcuts: null, // 蹇嵎閿� + autoMatic: null } /** @@ -155,6 +157,20 @@ } 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 = [] @@ -181,6 +197,7 @@ BID: BID, shortcuts: shortcuts.length > 0 ? shortcuts : null, config, + autoMatic, mainSearch }, () => { setTimeout(() => { // 寤舵椂鍔犺浇鐘舵�� @@ -266,6 +283,9 @@ 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 }) @@ -586,13 +606,14 @@ } 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} -- Gitblit v1.8.0