From 30b6c01972cc74152b733a94edcc0c2a614a2268 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 14 四月 2021 19:15:31 +0800 Subject: [PATCH] 2021-04-14 --- src/tabviews/custom/index.jsx | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index 6fb6711..ed3932d 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -21,6 +21,7 @@ const AntvBarAndLine = asyncComponent(() => import('./components/chart/antv-bar-line')) const AntvPie = asyncComponent(() => import('./components/chart/antv-pie')) const AntvTabs = asyncComponent(() => import('./components/tabs/antv-tabs')) +const AntvDashboard = asyncComponent(() => import('./components/chart/antv-dashboard')) const DataCard = asyncComponent(() => import('./components/card/data-card')) const PropCard = asyncComponent(() => import('./components/card/prop-card')) const NormalForm = asyncComponent(() => import('./components/form/normal-form')) @@ -477,14 +478,14 @@ } item.components = this.filterComponent(item.components, roleId, permAction, permMenus) - } else if (item.type === 'pie' || item.type === 'bar' || item.type === 'line') { + } else if (item.type === 'pie' || item.type === 'bar' || item.type === 'line' || item.type === 'dashboard') { if ( item.plot.blacklist && item.plot.blacklist.length > 0 && item.plot.blacklist.filter(v => roleId.indexOf(v) > -1).length > 0 ) { return false } - } else { + } else if (item.wrap) { if ( item.wrap.blacklist && item.wrap.blacklist.length > 0 && item.wrap.blacklist.filter(v => roleId.indexOf(v) > -1).length > 0 @@ -1005,6 +1006,12 @@ <AntvPie config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> </Col> ) + } else if (item.type === 'dashboard') { + return ( + <Col span={item.width} key={item.uuid}> + <AntvDashboard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + </Col> + ) } else if (item.type === 'form') { return ( <Col span={item.width} key={item.uuid}> -- Gitblit v1.8.0