From 823c72bc5918bf9d2fdd8415607908b68ebcd399 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 11 五月 2022 08:34:15 +0800
Subject: [PATCH] 2022-05-11

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

diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx
index 48109a9..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',
@@ -987,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',
@@ -1109,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 ''
 
@@ -1159,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