From 5afa6791ca4f1f962273f48f61cfc61107d94561 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 22 五月 2020 18:05:23 +0800
Subject: [PATCH] 2020-05-22

---
 src/tabviews/subtabtable/index.jsx |   41 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 40 insertions(+), 1 deletions(-)

diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx
index 062ee45..3e4748e 100644
--- a/src/tabviews/subtabtable/index.jsx
+++ b/src/tabviews/subtabtable/index.jsx
@@ -21,6 +21,7 @@
 
 const { TabPane } = Tabs
 const SubAction = asyncComponent(() => import('@/tabviews/zshare/actionList'))
+const CardComponent = asyncComponent(() => import('@/tabviews/zshare/cardcomponent'))
 
 class SubTabModalTable extends Component {
   static propTpyes = {
@@ -158,6 +159,7 @@
 
         // 瑙嗗浘鏉冮檺
         config.charts = config.charts.filter(item => {
+          if (item.Hide === 'true') return false
           if (!item.blacklist || item.blacklist.length === 0) return true
 
           let _black = item.blacklist.filter(v => {
@@ -170,6 +172,9 @@
             return true
           }
         })
+      } else {
+        // 闅愯棌瑙嗗浘
+        config.charts = config.charts.filter(item => item.Hide !== 'true')
       }
 
       if (config.charts.length <= 1) {
@@ -762,13 +767,47 @@
                   />
                 </Col>
               )
+            } else if (item.chartType === 'card') {
+              return (
+                <Col span={item.width} key={item.uuid}>
+                  <CardComponent
+                    tableId=""
+                    plot={item}
+                    config={config}
+                    data={this.state.data}
+                    loading={this.state.loading}
+                    buttonTrigger={this.buttonTrigger}
+                    handleTableId={() => {}}
+                  />
+                  <div style={{display: 'none'}}>
+                    <SubAction
+                      type="subtab"
+                      triggerBtn={triggerBtn}
+                      menuType={this.props.menuType}
+                      setting={setting}
+                      actions={actions}
+                      BID={this.props.BID}
+                      dict={this.state.dict}
+                      BData={this.props.BData}
+                      MenuID={this.props.SupMenuID}
+                      permRoles={this.props.permRoles}
+                      dataManager={this.props.dataManager}
+                      logcolumns={this.state.logcolumns}
+                      refreshdata={this.refreshbyaction}
+                      ContainerId={this.props.ContainerId}
+                      gettableselected={() => {}}
+                    />
+                  </div>
+                </Col>
+              )
             } else {
               return (
                 <Col span={item.width} key={item.uuid}>
                   <ChartComponent
                     plot={item}
-                    data={this.state.data}
                     config={config}
+                    data={this.state.data}
+                    loading={this.state.loading}
                   />
                 </Col>
               )

--
Gitblit v1.8.0