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/comtableconfig/index.jsx |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx
index 276f105..f36afd9 100644
--- a/src/templates/comtableconfig/index.jsx
+++ b/src/templates/comtableconfig/index.jsx
@@ -135,7 +135,7 @@
     }
 
     this.setState({
-      chartview: _config.charts[0].uuid,
+      chartview: _config.charts ? _config.charts[0].uuid : '',
       config: _config,
       openEdition: menu.open_edition || '',
       activeKey: menu.activeKey || '0',
@@ -1112,7 +1112,7 @@
           config: null
         }, () => {
           this.setState({
-            chartview: _config.charts[0].uuid,
+            chartview: _config.charts ? _config.charts[0].uuid : '',
             config: _config,
             openEdition: res.open_edition || '',
             activeKey: menu.activeKey || '0',
@@ -1265,12 +1265,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 ''
 
@@ -1315,7 +1315,21 @@
                     )
                   }
                 })}
-              </div>
+              </div> : <>
+                <ActionComponent
+                  type="main"
+                  menu={{ MenuID: this.props.menu.MenuID, MenuName: config.MenuName, MenuNo: config.MenuNo, fstMenuList: this.props.menu.fstMenuList }}
+                  config={config}
+                  tabs={this.state.tabviews}
+                  setSubConfig={(_btn) => this.setSubConfig(_btn, 'button')}
+                  updateaction={this.updateaction}
+                />
+                <ColumnComponent
+                  config={config}
+                  menu={this.props.menu}
+                  updatecolumn={this.updateconfig}
+                />
+              </>}
               {/* 鏍囩缁� */}
               <TabsComponent
                 config={config}

--
Gitblit v1.8.0