From 753ac5f57b10588e225c1d82203b13a81bc9c9a7 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 03 十二月 2020 18:36:26 +0800 Subject: [PATCH] 2020-12-03 --- src/tabviews/custom/index.jsx | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index e9ac035..54586f4 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -24,6 +24,7 @@ const PropCard = asyncComponent(() => import('./components/card/prop-card')) const TableCard = asyncComponent(() => import('./components/card/table-card')) const MainSearch = asyncComponent(() => import('./components/search/main-search')) +const NormalTable = asyncComponent(() => import('./components/table/normal-table')) class CustomPage extends Component { static propTpyes = { @@ -203,6 +204,18 @@ tab.components = this.filterComponent(tab.components) return tab }) + + let supIds = [] + item.subtabs.forEach(tab => { + tab.components.forEach(comp => { + if (comp.type === 'tabs' && comp.parentIds) { + supIds.push(...comp.parentIds) + } else if (comp.setting.supModule && comp.setting.supModule[0] !== 'empty') { + supIds.push(...comp.setting.supModule.slice(-1)) + } + }) + }) + item.parentIds = supIds } else if (item.type === 'pie' || item.type === 'bar' || item.type === 'line') { if (item.plot.blacklist && item.plot.blacklist.length > 0) { let _black = item.plot.blacklist.filter(v => { @@ -542,7 +555,7 @@ } else if (item.type === 'tabs') { return ( <Col span={item.width} key={item.uuid}> - <AntvTabs config={item} BID={BID} mainSearch={mainSearch} /> + <AntvTabs config={item} mainSearch={mainSearch} /> </Col> ) } else if (item.type === 'card' && item.subtype === 'datacard') { @@ -563,6 +576,12 @@ <TableCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} dataManager={dataManager} /> </Col> ) + } else if (item.type === 'table' && item.subtype === 'normaltable') { + return ( + <Col span={item.width} key={item.uuid}> + <NormalTable config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} dataManager={dataManager} /> + </Col> + ) } else { return null } -- Gitblit v1.8.0