From b6e8966b84a0641a29de57e3e7240e1227406765 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 05 一月 2021 11:30:42 +0800 Subject: [PATCH] 2021-01-05 --- src/tabviews/custom/index.jsx | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index 57a77d4..199533b 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -25,6 +25,7 @@ const TableCard = asyncComponent(() => import('./components/card/table-card')) const MainSearch = asyncComponent(() => import('@/tabviews/zshare/topSearch')) const NormalTable = asyncComponent(() => import('./components/table/normal-table')) +const NormalGroup = asyncComponent(() => import('./components/group/normal-group')) class CustomPage extends Component { static propTpyes = { @@ -205,6 +206,15 @@ }) }) item.parentIds = supIds + } else if (item.type === 'group') { + if ( + item.setting.blacklist && item.setting.blacklist.length > 0 && + item.setting.blacklist.filter(v => roleId.indexOf(v) > -1).length > 0 + ) { + return false + } + + item.components = this.filterComponent(item.components, roleId, permAction, permMenus) } else if (item.type === 'pie' || item.type === 'bar' || item.type === 'line') { if ( item.plot.blacklist && item.plot.blacklist.length > 0 && @@ -366,6 +376,11 @@ tab = {...tab, ...inherit} return tab }) + return component + } else if (component.type === 'group') { + component.components = this.formatSetting(component.components, [], [], inherit) + component = {...component, ...inherit} + return component } if (!component.setting) return component // 涓嶄娇鐢ㄧ郴缁熷嚱鏁版椂 @@ -712,6 +727,12 @@ <NormalTable config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> </Col> ) + } else if (item.type === 'group' && item.subtype === 'normalgroup') { + return ( + <Col span={item.width} key={item.uuid}> + <NormalGroup config={item} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + </Col> + ) } else { return null } -- Gitblit v1.8.0