From 140adf41ca32aafcbc1f0d32dace9da81aa5ef3f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 02 三月 2023 17:57:05 +0800
Subject: [PATCH] Merge branch 'develop'

---
 public/options.json                    |   10 
 src/tabviews/commontable/index.jsx     |    3 
 src/templates/formtabconfig/index.jsx  |   86 ++-----
 src/templates/calendarconfig/index.jsx |   65 ++---
 src/templates/comtableconfig/index.jsx |  117 ++++------
 src/templates/subtableconfig/index.jsx |  227 +++++++-------------
 src/templates/treepageconfig/index.jsx |  102 ++------
 7 files changed, 217 insertions(+), 393 deletions(-)

diff --git a/public/options.json b/public/options.json
index 4e405d0..bedcbee 100644
--- a/public/options.json
+++ b/public/options.json
@@ -1,12 +1,12 @@
 {
-  "appId": "201912040924165801464FF1788654BC5AC73",
-  "appkey": "20191106103859640976D6E924E464D029CF0",
+  "appId": "202108312122504607B107A83F55B40C98CCF",
+  "appkey": "20210831212235413F287EC3BF489424496C8",
   "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
   "systemType": "",
   "externalDatabase": "",
   "lineColor": "",
   "filter": "false",
-  "defaultApp": "mk",
+  "defaultApp": "mkindustry",
   "defaultLang": "zh-CN",
   "WXAppID": "",
   "WXminiAppID": "",
@@ -17,6 +17,6 @@
   "transfer": "false",
   "keepPassword": "true",
   "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"],
-  "host": "http://qingqiumarket.cn",
-  "service": "MKWMS/"
+  "host": "http://demo.mk9h.cn",
+  "service": "erp_new/"
 }
\ No newline at end of file
diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx
index 1133667..fb62900 100644
--- a/src/tabviews/commontable/index.jsx
+++ b/src/tabviews/commontable/index.jsx
@@ -177,7 +177,8 @@
             }
             tab.ContainerId = this.state.ContainerId
 
-            return window.GLOB.mkActions[tab.linkTab]
+            // return window.GLOB.mkActions[tab.linkTab]
+            return tab
           })
         })
       } else {
diff --git a/src/templates/calendarconfig/index.jsx b/src/templates/calendarconfig/index.jsx
index 2284223..2bb9117 100644
--- a/src/templates/calendarconfig/index.jsx
+++ b/src/templates/calendarconfig/index.jsx
@@ -422,19 +422,19 @@
         return
       }
 
-      let tabParam = { // 娣诲姞鑿滃崟tab椤�
-        func: 'sPC_sMenusTab_AddUpt',
-        MenuID: menu.MenuID
-      }
+      // let tabParam = { // 娣诲姞鑿滃崟tab椤�
+      //   func: 'sPC_sMenusTab_AddUpt',
+      //   MenuID: menu.MenuID
+      // }
 
-      if (_config.tab) {
-        tabParam.LText = Utils.formatOptions(`select '${menu.MenuID}' as MenuID ,'${_config.tab.linkTab}' as Tabid,'${_config.tab.label}' as TabName ,'0' as Sort`)
-      } else {
-        tabParam.LText = Utils.formatOptions(`select '${menu.MenuID}' as MenuID ,'' as Tabid,'' as TabName ,'0' as Sort`)
-      }
+      // if (_config.tab) {
+      //   tabParam.LText = Utils.formatOptions(`select '${menu.MenuID}' as MenuID ,'${_config.tab.linkTab}' as Tabid,'${_config.tab.label}' as TabName ,'0' as Sort`)
+      // } else {
+      //   tabParam.LText = Utils.formatOptions(`select '${menu.MenuID}' as MenuID ,'' as Tabid,'' as TabName ,'0' as Sort`)
+      // }
 
-      tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-      tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
+      // tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+      // tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
 
       let _vals = this.getFuncNames(_config.funcs, [], [])
       let _tables = Array.from(new Set(_vals.table))
@@ -478,41 +478,14 @@
           this.setState({
             config: _config,
             openEdition: response.open_edition || '',
-            originMenu: fromJS(_config).toJS()
+            originMenu: fromJS(_config).toJS(),
+            menuloading: false,
+            menucloseloading: false
           }, () => {
             reload && MKEmitter.emit('revert')
           })
 
           this.props.reloadmenu()
-
-          // 鏍囩淇℃伅淇濆瓨
-          Api.getSystemConfig(tabParam).then(result => {
-            if (result.status) {
-              notification.success({
-                top: 92,
-                message: '淇濆瓨鎴愬姛',
-                duration: 2
-              })
-              if (this.state.closeVisible) {
-                this.handleViewBack()
-              } else {
-                this.setState({
-                  menuloading: false,
-                  menucloseloading: false
-                })
-              }
-            } else {
-              notification.warning({
-                top: 92,
-                message: result.message,
-                duration: 5
-              })
-              this.setState({
-                menuloading: false,
-                menucloseloading: false
-              })
-            }
-          })
 
           localParam.func = 'sPC_TrdMenu_AddUpt_For_Local'
           delete localParam.LongParam
@@ -523,6 +496,16 @@
           delete localParam.open_edition
 
           Api.genericInterface(localParam)
+
+          notification.success({
+            top: 92,
+            message: '淇濆瓨鎴愬姛',
+            duration: 2
+          })
+          
+          if (this.state.closeVisible) {
+            this.handleViewBack()
+          }
         } else {
           this.setState({
             menuloading: false,
diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx
index 2f79d57..0a1e76b 100644
--- a/src/templates/comtableconfig/index.jsx
+++ b/src/templates/comtableconfig/index.jsx
@@ -380,7 +380,7 @@
     }
 
     let _sort = 0
-    let btntabs = []
+    // let btntabs = []
 
     let btnParam = {             // 娣诲姞鑿滃崟鎸夐挳
       func: 'sPC_Button_AddUpt',
@@ -396,14 +396,14 @@
     _config.action.forEach(item => {
       if (item.hidden === 'true') return
       _sort++
-      if (item.OpenType === 'popview') {
-        btntabs.push({
-          uuid: item.uuid,
-          linkTab: item.linkTab,
-          label: item.label,
-          sort: _sort
-        })
-      }
+      // if (item.OpenType === 'popview') {
+      //   btntabs.push({
+      //     uuid: item.uuid,
+      //     linkTab: item.linkTab,
+      //     label: item.label,
+      //     sort: _sort
+      //   })
+      // }
       
       btnParam.LText.push(`select '${item.uuid}' as menuid, '${item.label}' as menuname, '${_sort * 10}' as Sort`)
     })
@@ -413,33 +413,33 @@
     btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
     btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
     
-    let tabParam = { // 娣诲姞鑿滃崟tab椤�
-      func: 'sPC_sMenusTab_AddUpt',
-      MenuID: menu.MenuID
-    }
+    // let tabParam = { // 娣诲姞鑿滃崟tab椤�
+    //   func: 'sPC_sMenusTab_AddUpt',
+    //   MenuID: menu.MenuID
+    // }
 
-    let _LText = []
+    // let _LText = []
 
-    btntabs.forEach(item => {
-      _LText.push(`select '${item.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${item.sort * 10}' as Sort`)
-    })
-    _config.tabgroups.forEach(group => {
-      group.sublist.forEach(item => {
-        _sort++
-        _LText.push(`select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`)
-      })
-    })
+    // btntabs.forEach(item => {
+    //   _LText.push(`select '${item.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${item.sort * 10}' as Sort`)
+    // })
+    // _config.tabgroups.forEach(group => {
+    //   group.sublist.forEach(item => {
+    //     _sort++
+    //     _LText.push(`select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`)
+    //   })
+    // })
 
-    _LText = _LText.join(' union all ')
+    // _LText = _LText.join(' union all ')
 
     // 娓呯┖鑿滃崟涓嬪叧鑱旂殑鏍囩
-    if (!_LText) {
-      _LText = `select '${menu.MenuID}' as MenuID ,'' as Tabid,'' as TabName ,'0' as Sort`
-    }
+    // 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')
-    tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
+    // tabParam.LText = Utils.formatOptions(_LText)
+    // tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+    // tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
 
     let _vals = this.getFuncNames(_config)
 
@@ -596,7 +596,7 @@
             delete localParam.EasyCode
             delete localParam.open_edition
 
-            this.submitAction(btnParam, tabParam, localParam)
+            this.submitAction(btnParam, localParam)
           } else {
             this.setState({
               menuloading: false,
@@ -616,52 +616,29 @@
   /**
    * @description 淇濆瓨鎴栦慨鏀硅彍鍗曟寜閽泦
    */
-  submitAction = (btnParam, tabParam, localParam) => {
+  submitAction = (btnParam, localParam) => {
     const { config } = this.state
 
     new Promise(resolve => {
-      let deffers = []
-
-      let defer = new Promise(resolve => {
-        Api.getSystemConfig(tabParam).then(result => {
-          resolve(result)
-        })
-      })
-      deffers.push(defer)
-
       if (btnParam.LText) {
-        let defer = new Promise(resolve => {
-          Api.getSystemConfig(btnParam).then(result => {
-            if (result.status) {
-              this.setState({ // 淇濆瓨鎴愬姛鍚庢竻绌哄鍒跺垪琛�
-                copyActions: []
-              })
-            }
+        Api.getSystemConfig(btnParam).then(result => {
+          if (result.status) {
+            this.setState({ // 淇濆瓨鎴愬姛鍚庢竻绌哄鍒跺垪琛�
+              copyActions: []
+            })
             resolve(result)
-          })
-        })
-        deffers.push(defer)
-      }
-
-      Promise.all(deffers).then(result => {
-        let error = false
-        result.forEach(res => {
-          if (!res.status) {
-            error = res
+          } else {
+            notification.warning({
+              top: 92,
+              message: result.message,
+              duration: 5
+            })
+            resolve(false)
           }
         })
-
-        if (error) {
-          notification.warning({
-            top: 92,
-            message: error.message,
-            duration: 5
-          })
-          resolve(false)
-        } else {
-          resolve(true)
-        }
-      })
+      } else {
+        resolve(true)
+      }
     }).then(response => {
       if (response === false) return response
 
diff --git a/src/templates/formtabconfig/index.jsx b/src/templates/formtabconfig/index.jsx
index 851fb46..7e9a3b1 100644
--- a/src/templates/formtabconfig/index.jsx
+++ b/src/templates/formtabconfig/index.jsx
@@ -951,26 +951,26 @@
         btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
         
-        let tabParam = { // 娣诲姞鑿滃崟tab椤�
-          func: 'sPC_sMenusTab_AddUpt',
-          MenuID: btnTab.uuid
-        }
+        // let tabParam = { // 娣诲姞鑿滃崟tab椤�
+        //   func: 'sPC_sMenusTab_AddUpt',
+        //   MenuID: btnTab.uuid
+        // }
         
-        let _LText = []
+        // let _LText = []
 
-        config.tabgroups.forEach(group => {
-          group.sublist.forEach(item => {
-            _sort++
-            _LText.push(`select '${btnTab.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`)
-          })
-        })
+        // config.tabgroups.forEach(group => {
+        //   group.sublist.forEach(item => {
+        //     _sort++
+        //     _LText.push(`select '${btnTab.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`)
+        //   })
+        // })
 
-        _LText = _LText.join(' union all ')
+        // _LText = _LText.join(' union all ')
 
-        tabParam.LText = Utils.formatOptions(_LText)
+        // tabParam.LText = Utils.formatOptions(_LText)
 
-        tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-        tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
+        // tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        // tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
   
         let param = {
           func: 'sPC_ButtonParam_AddUpt',
@@ -1042,7 +1042,7 @@
                 originMenu: _config
               })
     
-              this.submitAction(btnParam, tabParam)
+              this.submitAction(btnParam)
             } else {
               this.setState({
                 menuloading: false,
@@ -1069,43 +1069,14 @@
   /**
    * @description 淇濆瓨鎴栦慨鏀硅彍鍗曟寜閽�
    */
-  submitAction = (btnParam, tabParam) => {
+  submitAction = (btnParam) => {
     new Promise(resolve => {
-      let deffers = []
-
-      if (tabParam.LText) {
-        let defer = new Promise(resolve => {
-          Api.getSystemConfig(tabParam).then(result => {
-            resolve(result)
-          })
-        })
-        deffers.push(defer)
-      }
-
       if (btnParam.LText) {
-        let defer = new Promise(resolve => {
-          Api.getSystemConfig(btnParam).then(result => {
-            resolve(result)
-          })
-        })
-        deffers.push(defer)
-      }
-
-      if (deffers.length === 0) {
-        resolve(true)
-      } else {
-        Promise.all(deffers).then(result => {
-          let error = false
-          result.forEach(res => {
-            if (!res.status) {
-              error = res
-            }
-          })
-
-          if (error) {
+        Api.getSystemConfig(btnParam).then(result => {
+          if (!result.status) {
             notification.warning({
               top: 92,
-              message: error.message,
+              message: result.message,
               duration: 5
             })
             resolve(false)
@@ -1113,8 +1084,15 @@
             resolve(true)
           }
         })
+      } else {
+        resolve(true)
       }
     }).then(response => {
+      this.setState({
+        menuloading: false,
+        menucloseloading: false
+      })
+
       if (response) {
         notification.success({
           top: 92,
@@ -1123,17 +1101,7 @@
         })
         if (this.state.closeVisible) {
           this.handleViewBack()
-        } else {
-          this.setState({
-            menuloading: false,
-            menucloseloading: false
-          })
         }
-      } else {
-        this.setState({
-          menuloading: false,
-          menucloseloading: false
-        })
       }
     })
   }
diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx
index 1912281..37ec63e 100644
--- a/src/templates/subtableconfig/index.jsx
+++ b/src/templates/subtableconfig/index.jsx
@@ -5,7 +5,7 @@
 import HTML5Backend from 'react-dnd-html5-backend'
 import { Button, Card, Modal, Collapse, notification, Spin, Switch, Tooltip, Col } from 'antd'
 import { QuestionCircleOutlined, RedoOutlined } from '@ant-design/icons'
-import moment from 'moment'
+// import moment from 'moment'
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
@@ -365,41 +365,41 @@
       return
     }
 
-    let btnParam = {
-      func: 'sPC_Button_AddUpt',
-      Type: 40,
-      ParentID: _config.uuid,
-      MenuNo: _config.tabNo,
-      Template: 'SubTable',
-      PageParam: '',
-      LongParam: '',
-      LText: []
-    }
+    // let btnParam = {
+    //   func: 'sPC_Button_AddUpt',
+    //   Type: 40,
+    //   ParentID: _config.uuid,
+    //   MenuNo: _config.tabNo,
+    //   Template: 'SubTable',
+    //   PageParam: '',
+    //   LongParam: '',
+    //   LText: []
+    // }
 
-    let btntabs = []
+    // 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`)
-      }
-      btnParam.LText.push(`select '${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort`)
-    })
+    // _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`)
+    //   }
+    //   btnParam.LText.push(`select '${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort`)
+    // })
 
-    btnParam.LText = btnParam.LText.join(' union all ')
-    btnParam.LText = Utils.formatOptions(btnParam.LText)
-    btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-    btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
+    // btnParam.LText = btnParam.LText.join(' union all ')
+    // btnParam.LText = Utils.formatOptions(btnParam.LText)
+    // btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+    // btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
 
-    let tabParam = { // 娣诲姞鏍囩鎸夐挳tab椤�
-      func: 'sPC_sMenusTab_AddUpt',
-      MenuID: _config.uuid,
-      LText: btntabs.join(' union all ')
-    }
+    // let tabParam = { // 娣诲姞鏍囩鎸夐挳tab椤�
+    //   func: 'sPC_sMenusTab_AddUpt',
+    //   MenuID: _config.uuid,
+    //   LText: btntabs.join(' union all ')
+    // }
 
-    tabParam.LText = Utils.formatOptions(tabParam.LText)
-    tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-    tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
+    // tabParam.LText = Utils.formatOptions(tabParam.LText)
+    // tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+    // tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
 
     let param = {
       func: 'sPC_Tab_AddUpt',
@@ -530,8 +530,16 @@
               menuloading: false,
               menucloseloading: false
             })
-            this.submitAction(btnParam, tabParam)
+            notification.success({
+              top: 92,
+              message: '淇濆瓨鎴愬姛',
+              duration: 2
+            })
+            if (this.state.closeVisible) {
+              this.handleViewBack()
+            }
           })
+          this.submitAction()
         } else {
           this.setState({
             menuloading: false,
@@ -550,131 +558,56 @@
   /**
    * @description 淇濆瓨鎴栦慨鏀硅彍鍗曟寜閽�
    */
-  submitAction = (btnParam, tabParam) => {
+  submitAction = () => {
     const { config } = this.state
 
-    new Promise(resolve => {
-      let deffers = []
+    let oriActions = []
+    this.state.originActions.forEach(item => {
+      let curBtn = config.action.filter(cell => item.curuuid === cell.uuid)[0] // 鏌ョ湅鍒濆鍖栨寜閽槸鍚﹀瓨鍦�
+      if (!curBtn) return
+      if (curBtn.OpenType !== item.prebtn.OpenType) return
+      if (curBtn.OpenType === 'funcbutton' && curBtn.execMode !== 'pop') return
 
-      if (tabParam.LText) {
-        let defer = new Promise(resolve => {
-          Api.getSystemConfig(tabParam).then(result => {
-            resolve(result)
-          })
-        })
-        deffers.push(defer)
-      }
-
-      if (btnParam.LText) {
-        let defer = new Promise(resolve => {
-          Api.getSystemConfig(btnParam).then(result => {
-            if (result.status) {
-              this.setState({ // 淇濆瓨鎴愬姛鍚庢竻绌哄鍒跺垪琛�
-                copyActions: []
-              })
-            }
-            resolve(result)
-          })
-        })
-        deffers.push(defer)
-      }
-
-      if (deffers.length === 0) {
-        resolve(true)
-      } else {
-        Promise.all(deffers).then(result => {
-          let error = false
-          result.forEach(res => {
-            if (!res.status) {
-              error = res
-            }
-          })
-
-          if (error) {
-            notification.warning({
-              top: 92,
-              message: error.message,
-              duration: 5
-            })
-            resolve(false)
-          } else {
-            resolve(true)
-          }
-        })
-      }
-    }).then(response => {
-      if (response === false) return response
-
-      let oriActions = []
-      this.state.originActions.forEach(item => {
-        let curBtn = config.action.filter(cell => item.curuuid === cell.uuid)[0] // 鏌ョ湅鍒濆鍖栨寜閽槸鍚﹀瓨鍦�
-        if (!curBtn) return
-        if (curBtn.OpenType !== item.prebtn.OpenType) return
-        if (curBtn.OpenType === 'funcbutton' && curBtn.execMode !== 'pop') return
-
-        oriActions.push({
-          prebtn: item.prebtn,
-          curBtn: curBtn
-        })
+      oriActions.push({
+        prebtn: item.prebtn,
+        curBtn: curBtn
       })
+    })
 
-      if (oriActions.length === 0) return 'true'
+    if (oriActions.length === 0) return
 
-      oriActions.forEach(action => {
-        Api.getSystemConfig({
-          func: 'sPC_Get_LongParam',
-          MenuID: action.prebtn ? action.prebtn.uuid : ''
-        }).then(result => {
-          if (result.status && result.LongParam) {
-            let _LongParam = ''
-  
-            if (result.LongParam) {
-              try {
-                _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
-              } catch (e) {
-                console.warn('Parse Failure')
-                _LongParam = ''
-              }
-            }
+    oriActions.forEach(action => {
+      Api.getSystemConfig({
+        func: 'sPC_Get_LongParam',
+        MenuID: action.prebtn ? action.prebtn.uuid : ''
+      }).then(result => {
+        if (result.status && result.LongParam) {
+          let _LongParam = ''
 
-            if (_LongParam) {
-              let param = {
-                func: 'sPC_ButtonParam_AddUpt',
-                ParentID: config.uuid,
-                MenuID: action.curBtn.uuid,
-                MenuNo: config.tabNo,
-                Template: _LongParam.type,
-                MenuName: action.curBtn.label,
-                PageParam: JSON.stringify({Template: _LongParam.type}),
-                LongParam: result.LongParam
-              }
-              Api.getSystemConfig(param).then(() => {})
+          if (result.LongParam) {
+            try {
+              _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
+            } catch (e) {
+              console.warn('Parse Failure')
+              _LongParam = ''
             }
           }
-        })
-      })
-      return 'true'
-    }).then(response => {
-      if (response === 'true') {
-        notification.success({
-          top: 92,
-          message: '淇濆瓨鎴愬姛',
-          duration: 2
-        })
-        if (this.state.closeVisible) {
-          this.handleViewBack()
-        } else {
-          this.setState({
-            menuloading: false,
-            menucloseloading: false
-          })
+
+          if (_LongParam) {
+            let param = {
+              func: 'sPC_ButtonParam_AddUpt',
+              ParentID: config.uuid,
+              MenuID: action.curBtn.uuid,
+              MenuNo: config.tabNo,
+              Template: _LongParam.type,
+              MenuName: action.curBtn.label,
+              PageParam: JSON.stringify({Template: _LongParam.type}),
+              LongParam: result.LongParam
+            }
+            Api.getSystemConfig(param).then(() => {})
+          }
         }
-      } else {
-        this.setState({
-          menuloading: false,
-          menucloseloading: false
-        })
-      }
+      })
     })
   }
 
diff --git a/src/templates/treepageconfig/index.jsx b/src/templates/treepageconfig/index.jsx
index eab9619..f5c1eba 100644
--- a/src/templates/treepageconfig/index.jsx
+++ b/src/templates/treepageconfig/index.jsx
@@ -283,31 +283,31 @@
       return
     }
 
-    let _sort = 0
-    let btntabs = []
+    // let _sort = 0
+    // let btntabs = []
     
-    let tabParam = { // 娣诲姞鑿滃崟tab椤�
-      func: 'sPC_sMenusTab_AddUpt',
-      MenuID: menu.MenuID
-    }
+    // let tabParam = { // 娣诲姞鑿滃崟tab椤�
+    //   func: 'sPC_sMenusTab_AddUpt',
+    //   MenuID: menu.MenuID
+    // }
 
-    let _LText = []
+    // let _LText = []
 
-    btntabs.forEach(item => {
-      _LText.push(`select '${item.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${item.sort * 10}' as Sort`)
-    })
-    _config.tabgroups.forEach(group => {
-      group.sublist.forEach(item => {
-        _sort++
-        _LText.push(`select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`)
-      })
-    })
+    // btntabs.forEach(item => {
+    //   _LText.push(`select '${item.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${item.sort * 10}' as Sort`)
+    // })
+    // _config.tabgroups.forEach(group => {
+    //   group.sublist.forEach(item => {
+    //     _sort++
+    //     _LText.push(`select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`)
+    //   })
+    // })
 
-    _LText = _LText.join(' union all ')
+    // _LText = _LText.join(' union all ')
 
-    tabParam.LText = Utils.formatOptions(_LText)
-    tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-    tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
+    // tabParam.LText = Utils.formatOptions(_LText)
+    // tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+    // tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
 
     let _funcs = []
     let _tables = []
@@ -414,60 +414,22 @@
           this.setState({
             config: _config,
             openEdition: response.open_edition || '',
-            originMenu: fromJS(_config).toJS()
+            originMenu: fromJS(_config).toJS(),
+            menuloading: false,
+            menucloseloading: false
           })
 
-          // 瀛樺湪鏍囩椤垫椂
-          if (tabParam.LText) {
-            Api.getSystemConfig(tabParam).then(result => {
-              if (result.status) {
-                notification.success({
-                  top: 92,
-                  message: '淇濆瓨鎴愬姛',
-                  duration: 2
-                })
+          notification.success({
+            top: 92,
+            message: '淇濆瓨鎴愬姛',
+            duration: 2
+          })
 
-                this.props.reloadmenu()
-                Api.genericInterface(localParam)
+          this.props.reloadmenu()
+          Api.genericInterface(localParam)
 
-                if (this.state.closeVisible) {
-                  this.props.handleView()
-                } else {
-                  this.setState({
-                    menuloading: false,
-                    menucloseloading: false
-                  })
-                }
-              } else {
-                notification.warning({
-                  top: 92,
-                  message: result.message,
-                  duration: 5
-                })
-                this.setState({
-                  menuloading: false,
-                  menucloseloading: false
-                })
-              }
-            })
-          } else {
-            notification.success({
-              top: 92,
-              message: '淇濆瓨鎴愬姛',
-              duration: 2
-            })
-
-            this.props.reloadmenu()
-            Api.genericInterface(localParam)
-
-            if (this.state.closeVisible) {
-              this.props.handleView()
-            } else {
-              this.setState({
-                menuloading: false,
-                menucloseloading: false
-              })
-            }
+          if (this.state.closeVisible) {
+            this.props.handleView()
           }
         } else {
           this.setState({

--
Gitblit v1.8.0