From fb3ec146a9e1444ece749d0bcf232a554e933fb0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 17 五月 2022 22:56:16 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/templates/subtableconfig/index.jsx |   29 ++++++++++++++++++++++-------
 1 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx
index c7f9293..78e573a 100644
--- a/src/templates/subtableconfig/index.jsx
+++ b/src/templates/subtableconfig/index.jsx
@@ -118,7 +118,7 @@
 
     this.setState({
       openEdition: editSubTab ? (editSubTab.open_edition || '') : (editTab.open_edition || ''),
-      chartview: _config.charts[0].uuid,
+      chartview: _config.charts ? _config.charts[0].uuid : '',
       originActions: _oriActions,
       config: _config,
       activeKey: _activeKey || '0',
@@ -361,6 +361,7 @@
     let btntabs = []
 
     _config.action.forEach((item, index) => {
+      if (item.hidden === 'true') return
       if (item.OpenType === 'popview') {
         btntabs.push(`select '${item.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${(index + 1) * 10}' as Sort`)
       }
@@ -986,7 +987,7 @@
           config: null
         }, () => {
           this.setState({
-            chartview: _config.charts[0].uuid,
+            chartview: _config.charts ? _config.charts[0].uuid : '',
             config: _config,
             openEdition: res.open_edition || '',
             activeKey: '0',
@@ -1108,12 +1109,12 @@
                 config={config}
                 updatesearch={this.updatesearch}
               />
-              <div className="chart-view" style={{position: 'relative'}}>
-                {/* 瑙嗗浘缁� 鏉冮檺 浼氬憳绛夌骇20+ */}
-                {this.props.memberLevel >= 20 ? <ChartGroupComponent
+              {config.charts ? <div className="chart-view" style={{position: 'relative'}}>
+                {/* 瑙嗗浘缁� 宸插純鐢� */}
+                <ChartGroupComponent
                   config={config}
                   updatechartgroup={this.updatechartgroup}
-                /> : null}
+                />
                 {config.charts.map(item => {
                   if (!config.expand && chartview !== item.uuid) return ''
 
@@ -1158,7 +1159,21 @@
                     )
                   }
                 })}
-              </div>
+              </div> : <>
+                <ActionComponent
+                  type="subtable"
+                  menu={{MenuID: config.uuid, MenuName: config.tabName, MenuNo: config.tabNo, fstMenuList: this.props.menu.fstMenuList}}
+                  config={config}
+                  tabs={this.state.tabviews}
+                  setSubConfig={this.setSubConfig}
+                  updateaction={this.updateaction}
+                />
+                <ColumnComponent
+                  config={config}
+                  menu={this.props.menu}
+                  updatecolumn={this.updateconfig}
+                />
+              </>}
             </Card>
           </div>
         </DndProvider>

--
Gitblit v1.8.0