From cb8c83978177a8d3de769fca12d2aa3642eb0275 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 16 十一月 2021 12:42:32 +0800
Subject: [PATCH] 2021-11-16

---
 src/tabviews/custom/index.jsx |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index 420caa2..d4bc44a 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -39,6 +39,7 @@
 const SettingComponent = asyncComponent(() => import('@/tabviews/zshare/settingcomponent'))
 const PagemsgComponent = asyncComponent(() => import('@/tabviews/zshare/pageMessage'))
 const CustomChart = asyncComponent(() => import('./components/chart/custom-chart'))
+const TimeLine = asyncComponent(() => import('./components/timeline/normal-timeline'))
 
 class CustomPage extends Component {
   static propTpyes = {
@@ -70,7 +71,7 @@
    * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅
    */
   async loadconfig () {
-    const { permAction, permMenus, param } = this.props
+    const { permAction, param } = this.props
 
     let _param = {
       func: 'sPC_Get_LongParam',
@@ -135,7 +136,7 @@
       let roleId = sessionStorage.getItem('role_id') || '' // 瑙掕壊ID
       let balMap = new Map()
       let skip = config.permission === 'false' || this.props.menuType === 'HS'
-      config.components = this.filterComponent(config.components, roleId, permAction, permMenus, balMap, skip)
+      config.components = this.filterComponent(config.components, roleId, permAction, balMap, skip)
       
       // 鑾峰彇涓绘悳绱㈡潯浠�
       let mainSearch = []
@@ -448,7 +449,7 @@
     })
   }
 
-  filterComponent = (components, roleId, permAction, permMenus, balMap, skip) => {
+  filterComponent = (components, roleId, permAction, balMap, skip) => {
     return components.filter(item => {
       
       if (item.style && item.style.boxShadow) {
@@ -479,7 +480,7 @@
         })
 
         item.subtabs = item.subtabs.map(tab => {
-          tab.components = this.filterComponent(tab.components, roleId, permAction, permMenus, balMap, skip)
+          tab.components = this.filterComponent(tab.components, roleId, permAction, balMap, skip)
           return tab
         })
 
@@ -502,7 +503,7 @@
           return false
         }
 
-        item.components = this.filterComponent(item.components, roleId, permAction, permMenus, balMap, skip)
+        item.components = this.filterComponent(item.components, roleId, permAction, balMap, skip)
       } else if (['pie', 'bar', 'line', 'dashboard', 'scatter', 'chart'].includes(item.type)) {
         if (
           item.plot.blacklist && item.plot.blacklist.length > 0 &&
@@ -555,7 +556,7 @@
       
             if (col.linkmenu && col.linkmenu.length > 0) {
               let menu_id = col.linkmenu.pop()
-              col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || ''
+              col.linkThdMenu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
             } else {
               col.linkThdMenu = ''
             }
@@ -676,7 +677,7 @@
 
           return cell.eleType !== 'button' || skip || permAction[cell.uuid]
         })
-      } else if ((item.type === 'table' && item.subtype === 'tablecard') || item.type === 'carousel') {
+      } else if ((item.type === 'table' && item.subtype === 'tablecard') || item.type === 'carousel' || item.type === 'timeline') {
         item.subcards && item.subcards.forEach(card => {
           let _hasheight = card.style.height && card.style.height !== 'auto'
           card.elements = card.elements.filter(cell => {
@@ -1091,6 +1092,12 @@
             <Balcony config={item} data={data} BID={_bid} menuType={menuType} />
           </Col>
         )
+      } else if (item.type === 'timeline') {
+        return (
+          <Col span={item.width} key={item.uuid}>
+            <TimeLine config={item} data={data} BID={_bid} menuType={menuType} />
+          </Col>
+        )
       } else if (item.type === 'carousel' && item.subtype === 'datacard') {
         return (
           <Col span={item.width} key={item.uuid}>

--
Gitblit v1.8.0