From 2292d1826e69e21c8a411c217faef635fe57d458 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 07 一月 2021 10:48:49 +0800
Subject: [PATCH] Merge branch 'bms' of ssh://39.106.218.81:29418/~jinfei/pc-plat into bms

---
 src/tabviews/custom/index.jsx |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index 57a77d4..10940f8 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 &&
@@ -243,6 +253,7 @@
           item.action = item.action.filter(cell => {
             cell.logLabel = item.name + '-' + cell.label
             cell.ContainerId = this.state.ContainerId
+            cell.$menuId = item.uuid
 
             return permAction[cell.uuid]
           })
@@ -261,6 +272,7 @@
                 cell.logLabel = item.name + '-' + cell.label
                 cell.Ot = 'requiredSgl'
                 cell.ContainerId = this.state.ContainerId
+                cell.$menuId = item.uuid
               } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height && _hasheight) {
                 cell.innerHeight = 'auto'
               }
@@ -272,6 +284,7 @@
                 cell.logLabel = item.name + '-' + cell.label
                 cell.Ot = 'requiredSgl'
                 cell.ContainerId = this.state.ContainerId
+                cell.$menuId = item.uuid
               } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height && _hasheight) {
                 cell.innerHeight = 'auto'
               }
@@ -286,6 +299,7 @@
                 cell.logLabel = item.name + '-' + cell.label
                 cell.Ot = 'requiredSgl'
                 cell.ContainerId = this.state.ContainerId
+                cell.$menuId = item.uuid
               } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height && _hasheight) {
                 cell.innerHeight = 'auto'
               }
@@ -299,6 +313,8 @@
               cell.logLabel = item.name + '-' + cell.label
               cell.Ot = 'requiredSgl'
               cell.ContainerId = this.state.ContainerId
+              cell.$menuId = item.uuid
+
               return permAction[cell.uuid]
             })
             return col.elements.length !== 0
@@ -308,6 +324,7 @@
         if (item.action && item.action.length > 0) {
           item.action = item.action.map(cell => {
             cell.logLabel = item.name + '-' + cell.label
+            cell.$menuId = item.uuid
             return cell
           })
         }
@@ -366,6 +383,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 +734,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