From 41239717c4446af79268b968557274f88a0afaeb Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 15 八月 2020 10:16:07 +0800
Subject: [PATCH] 2020-08-15

---
 src/templates/comtableconfig/index.jsx |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx
index 3c18dcf..dbba872 100644
--- a/src/templates/comtableconfig/index.jsx
+++ b/src/templates/comtableconfig/index.jsx
@@ -541,6 +541,11 @@
 
         _LText = _LText.join(' union all ')
 
+        // 娓呯┖鑿滃崟涓嬪叧鑱旂殑鏍囩
+        if (!_LText) {
+          _LText = `select '${menu.MenuID}' as MenuID ,'' as Tabid,'' as TabName ,'0' as Sort`
+        }
+
         tabParam.LText = Utils.formatOptions(_LText)
         tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
         tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
@@ -751,14 +756,12 @@
     new Promise(resolve => {
       let deffers = []
 
-      if (tabParam.LText) {
-        let defer = new Promise(resolve => {
-          Api.getSystemConfig(tabParam).then(result => {
-            resolve(result)
-          })
+      let defer = new Promise(resolve => {
+        Api.getSystemConfig(tabParam).then(result => {
+          resolve(result)
         })
-        deffers.push(defer)
-      }
+      })
+      deffers.push(defer)
 
       if (btnParam.LText) {
         let defer = new Promise(resolve => {
@@ -978,7 +981,7 @@
     const { menu } = this.props
     const { config, originMenu, optionLibs, activeKey, openEdition } = this.state
 
-    if (!originMenu.MenuID) { // menuID涓嶅瓨鍦ㄦ椂锛屼负鏂板缓鑿滃崟锛屾彁绀鸿彍鍗曞皻鏈繚瀛�
+    if (config.isAdd) { // 鏂板缓鑿滃崟锛屾彁绀鸿彍鍗曞皻鏈繚瀛�
       notification.warning({
         top: 92,
         message: this.state.dict['header.menu.config.notsave'],
@@ -1281,12 +1284,10 @@
   /**
    * @description 鏇存柊鏍囩閰嶇疆淇℃伅
    */
-  updatetabs = (config, delcards) => {
-    const { delActions } = this.state
+  updatetabs = (config) => {
 
     this.setState({
-      config: config,
-      delActions: delcards ? [...delActions, ...delcards] : delActions
+      config: config
     })
   }
 

--
Gitblit v1.8.0