From 80deba0c2dcffd9e6b6f07815c7c52199309ce42 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 23 六月 2025 17:36:03 +0800
Subject: [PATCH] 2025-06-23

---
 src/templates/treepageconfig/index.jsx |  593 +++++++++++++++++++++++++++++------------------------------
 1 files changed, 291 insertions(+), 302 deletions(-)

diff --git a/src/templates/treepageconfig/index.jsx b/src/templates/treepageconfig/index.jsx
index 814810f..84da278 100644
--- a/src/templates/treepageconfig/index.jsx
+++ b/src/templates/treepageconfig/index.jsx
@@ -1,28 +1,25 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { connect } from 'react-redux'
 import { is, fromJS } from 'immutable'
 import { DndProvider } from 'react-dnd'
 import HTML5Backend from 'react-dnd-html5-backend'
-import { Button, Card, Modal, Collapse, notification, Spin, Switch, Tooltip, Row, Col, Tree } from 'antd'
+import { Button, Card, Collapse, notification, Spin, Tooltip, Row, Col, Tree } from 'antd'
 import { QuestionCircleOutlined, RedoOutlined, SearchOutlined, FileOutlined, FolderOpenOutlined } from '@ant-design/icons'
-import moment from 'moment'
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
-import zhCN from '@/locales/zh-CN/model.js'
-import enUS from '@/locales/en-US/model.js'
 
 import asyncComponent from '@/utils/asyncComponent'
-
 import MenuForm from '@/templates/comtableconfig/menuform'
 import SourceElement from '@/templates/zshare/dragsource'
 import Source from './source'
 import './index.scss'
 
 const { Panel } = Collapse
-const { confirm } = Modal
+// const { confirm } = Modal
 const { TreeNode } = Tree
+
+const UpdateTable = asyncComponent(() => import('./updatetable'))
 const TreeSettingComponent = asyncComponent(() => import('@/templates/sharecomponent/treesettingcomponent'))
 const TabsComponent = asyncComponent(() => import('@/templates/sharecomponent/tabscomponent'))
 
@@ -34,7 +31,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     config: null,            // 椤甸潰閰嶇疆
     formlist: null,          // 鎼滅储鏉′欢銆佹寜閽�佹樉绀哄垪琛ㄥ崟瀛楁
     menuloading: false,      // 鑿滃崟淇濆瓨涓�
@@ -46,7 +42,7 @@
     delTabs: [],             // 鍒犻櫎鏍囩鍒楄〃
     tabviews: [],            // 鎵�鏈夋爣绛鹃〉
     activeKey: '0',          // 榛樿灞曞紑鍩烘湰淇℃伅
-    openEdition: ''          // 缂栬緫鐗堟湰鏍囪锛岄槻姝㈠浜烘搷浣�
+    openEdition: '',         // 缂栬緫鐗堟湰鏍囪锛岄槻姝㈠浜烘搷浣�
   }
 
   /**
@@ -73,9 +69,9 @@
     _config.MenuName = menu.MenuName || ''
     _config.MenuNo = menu.MenuNo || ''
     _config.OpenType = menu.PageParam ? menu.PageParam.OpenType : ''
+    _config.MenuID = menu.MenuID || ''
 
     // 閰嶇疆榛樿鍊硷紝鍏煎
-    _config.Template = 'TreePage'
     _config.easyCode = _config.easyCode || ''
     
     if (_config.type === 'user') {
@@ -111,6 +107,54 @@
    */
   componentDidMount () {
     this.reloadTab(false)
+    document.onkeydown = (event) => {
+      let e = event || window.event
+      let keyCode = e.keyCode || e.which || e.charCode
+      let preKey = ''
+
+      if (e.ctrlKey) {
+        preKey = 'ctrl'
+      }
+      if (e.shiftKey) {
+        preKey = 'shift'
+      } else if (e.altKey) {
+        preKey = 'alt'
+      }
+      
+      if (!preKey || !keyCode) return
+      
+      let _shortcut = `${preKey}+${keyCode}`
+
+      if (_shortcut === 'ctrl+83') {
+        let modals = document.querySelectorAll('.mk-pop-modal')
+        let msg = null
+        for (let i = 0; i < modals.length; i++) {
+          if (msg) {
+            break
+          }
+
+          let node = modals[i].querySelector('.mk-com-name')
+
+          if (node) {
+            msg = node.innerText
+          }
+        }
+        if (msg) {
+          notification.warning({
+            top: 92,
+            message: '璇蜂繚瀛�' + msg,
+            duration: 5
+          })
+          return false
+        }
+
+        let node = document.getElementById('save-config')
+        if (node && node.click) {
+          node.click()
+        }
+        return false
+      }
+    }
   }
 
   /**
@@ -120,6 +164,7 @@
     this.setState = () => {
       return
     }
+    document.onkeydown = () => {}
   }
 
   /**
@@ -130,7 +175,7 @@
       loading: type,
       tabviews: []
     })
-    Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => {
+    Api.getCloudConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => {
       if (res.status) {
         this.setState({
           loading: false,
@@ -168,302 +213,256 @@
   /**
    * @description 涓夌骇鑿滃崟淇濆瓨
    */
-  submitConfig = () => {
-    const { menu } = this.props
-    const { delTabs, openEdition } = this.state
+  // submitConfig = () => {
+  //   const { menu } = this.props
+  //   const { delTabs, openEdition } = this.state
 
-    let _config = fromJS(this.state.config).toJS()
+  //   let _config = fromJS(this.state.config).toJS()
 
-    // 鍩烘湰淇℃伅楠岃瘉
-    if (!_config.fstMenuId || !_config.ParentId || !_config.MenuName || !_config.MenuNo) {
-      notification.warning({
-        top: 92,
-        message: this.state.dict['model.menu.basemsg'],
-        duration: 5
-      })
-      this.setState({activeKey: '0'})
-      return
-    }
+  //   // 鍩烘湰淇℃伅楠岃瘉
+  //   if (!_config.fstMenuId || !_config.ParentId || !_config.MenuName || !_config.MenuNo) {
+  //     notification.warning({
+  //       top: 92,
+  //       message: '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒',
+  //       duration: 5
+  //     })
+  //     this.setState({activeKey: '0'})
+  //     return
+  //   }
 
-    // 鏂板缓楠岃瘉
-    if (_config.isAdd) {
-      _config.tabgroups[0].sublist = _config.tabgroups[0].sublist.filter(item => !item.origin)
-    }
+  //   // 鏂板缓楠岃瘉
+  //   if (_config.isAdd) {
+  //     _config.tabgroups[0].sublist = _config.tabgroups[0].sublist.filter(item => !item.origin)
+  //   }
 
-    // 浣跨敤宸叉湁鑿滃崟鏃讹紝榛樿娣诲姞鍏宠仈鏍囩id
-    if (_config.type === 'user') {
-      _config.tabgroups.forEach(group => {
-        group.sublist = group.sublist.map(tab => {
-          if (!tab.linkTab) {
-            tab.linkTab = Utils.getuuid()
-          }
-          return tab
-        })
-      })
-    }
+  //   // 浣跨敤宸叉湁鑿滃崟鏃讹紝榛樿娣诲姞鍏宠仈鏍囩id
+  //   if (_config.type === 'user') {
+  //     _config.tabgroups.forEach(group => {
+  //       group.sublist = group.sublist.map(tab => {
+  //         if (!tab.linkTab) {
+  //           tab.linkTab = Utils.getuuid()
+  //         }
+  //         return tab
+  //       })
+  //     })
+  //   }
 
-    // 鏈缃暟鎹簮鎴栨爣绛句笉鍚堟硶鏃讹紝鍚敤鐘舵�佷负false
-    let vresult = this.verifyconfig(_config)
-    if (vresult !== true) {
-      _config.enabled = false
-    }
+  //   // 鏈缃暟鎹簮鎴栨爣绛句笉鍚堟硶鏃讹紝鍚敤鐘舵�佷负false
+  //   let vresult = this.verifyconfig(_config)
+  //   if (vresult !== true) {
+  //     _config.enabled = false
+  //   }
 
-    if (this.state.closeVisible) { // 鏄剧ず鍏抽棴瀵硅瘽妗嗘椂锛屾ā鎬佹涓繚瀛樻寜閽紝鏄剧ず淇濆瓨涓姸鎬�
-      this.setState({
-        menucloseloading: true
-      })
-    } else {
-      this.setState({
-        menuloading: true
-      })
-    }
+  //   if (this.state.closeVisible) { // 鏄剧ず鍏抽棴瀵硅瘽妗嗘椂锛屾ā鎬佹涓繚瀛樻寜閽紝鏄剧ず淇濆瓨涓姸鎬�
+  //     this.setState({
+  //       menucloseloading: true
+  //     })
+  //   } else {
+  //     this.setState({
+  //       menuloading: true
+  //     })
+  //   }
 
-    // 淇濆瓨鏃跺垹闄ら厤缃被鍨嬶紝system 銆乽ser
-    delete _config.type
-    delete _config.isAdd
+  //   // 淇濆瓨鏃跺垹闄ら厤缃被鍨嬶紝system 銆乽ser
+  //   delete _config.type
+  //   delete _config.isAdd
 
-    let _LongParam = ''
+  //   let _LongParam = ''
 
-    try {
-      _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
-    } catch (e) {
-      notification.warning({
-        top: 92,
-        message: '缂栬瘧閿欒',
-        duration: 5
-      })
-      this.setState({
-        menucloseloading: false,
-        menuloading: false
-      })
-      return
-    }
+  //   try {
+  //     _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
+  //   } catch (e) {
+  //     notification.warning({
+  //       top: 92,
+  //       message: '缂栬瘧閿欒',
+  //       duration: 5
+  //     })
+  //     this.setState({
+  //       menucloseloading: false,
+  //       menuloading: false
+  //     })
+  //     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 = []
+  //   let _funcs = []
+  //   let _tables = []
 
-    if (_config.setting.tableName) {
-      _tables.push(_config.setting.tableName)
-    }
-    if (_config.setting.innerFunc) {
-      _funcs.push({func: _config.setting.innerFunc, label: _config.MenuName || ''})
-    }
-    if (_config.setting.outerFunc) {
-      _funcs.push({func: _config.setting.outerFunc, label: _config.MenuName || ''})
-    }
+  //   if (_config.setting.tableName) {
+  //     _tables.push(_config.setting.tableName)
+  //   }
+  //   if (_config.setting.innerFunc) {
+  //     _funcs.push({func: _config.setting.innerFunc, label: _config.MenuName || ''})
+  //   }
+  //   if (_config.setting.outerFunc) {
+  //     _funcs.push({func: _config.setting.outerFunc, label: _config.MenuName || ''})
+  //   }
 
-    let param = {
-      func: 'sPC_TrdMenu_AddUpt',
-      FstID: _config.fstMenuId,
-      SndID: _config.ParentId,
-      ParentID: _config.ParentId,
-      MenuID: menu.MenuID,
-      MenuNo: _config.MenuNo,
-      EasyCode: _config.easyCode,
-      Template: _config.Template,
-      MenuName: _config.MenuName,
-      PageParam: JSON.stringify({...menu.PageParam, Template: _config.Template, OpenType: _config.OpenType}),
-      LongParam: _LongParam,
-      LText: _funcs.map(item => `select '${menu.MenuID}' as MenuID,'${item.func}' as ProcName,'${item.label}' as MenuName`),
-      LTexttb: _tables.map(item => `select '${menu.MenuID}' as MenuID,'${item}' as tbName`)
-    }
+  //   let param = {
+  //     func: 'sPC_TrdMenu_AddUpt',
+  //     FstID: _config.fstMenuId,
+  //     SndID: _config.ParentId,
+  //     ParentID: _config.ParentId,
+  //     MenuID: menu.MenuID,
+  //     MenuNo: _config.MenuNo,
+  //     EasyCode: _config.easyCode,
+  //     Template: _config.Template,
+  //     MenuName: _config.MenuName,
+  //     PageParam: JSON.stringify({...menu.PageParam, Template: _config.Template, OpenType: _config.OpenType}),
+  //     LongParam: _LongParam,
+  //     LText: _funcs.map(item => `select '${menu.MenuID}' as MenuID,'${item.func}' as ProcName,'${item.label}' as MenuName`),
+  //     LTexttb: _tables.map(item => `select '${menu.MenuID}' as MenuID,'${item}' as tbName`)
+  //   }
 
-    if (menu.menuSort) { // 鑿滃崟鏂板缓鏃惰缃帓搴�
-      param.Sort = menu.menuSort
-    }
+  //   if (menu.menuSort) { // 鑿滃崟鏂板缓鏃惰缃帓搴�
+  //     param.Sort = menu.menuSort
+  //   }
 
-    param.LText = param.LText.join(' union all ')
-    param.LText = Utils.formatOptions(param.LText)
-    param.LTexttb = param.LTexttb.join(' union all ')
-    param.LTexttb = Utils.formatOptions(param.LTexttb)
-    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
+  //   param.LText = param.LText.join(' union all ')
+  //   param.LText = Utils.formatOptions(param.LText)
+  //   param.LTexttb = param.LTexttb.join(' union all ')
+  //   param.LTexttb = Utils.formatOptions(param.LTexttb)
+  //   param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+  //   param.secretkey = Utils.encrypt(param.LText, param.timestamp)
 
-    if (openEdition) { // 鐗堟湰绠$悊
-      param.open_edition = openEdition
-    }
+  //   if (openEdition) { // 鐗堟湰绠$悊
+  //     param.open_edition = openEdition
+  //   }
 
-    // 鏈夋寜閽垨鏍囩鍒犻櫎鏃讹紝鍏堣繘琛屽垹闄ゆ搷浣�
-    // 鍒犻櫎鎴愬姛鍚庯紝淇濆瓨椤甸潰閰嶇疆
-    new Promise(resolve => {
-      if (delTabs.length > 0) {
-        let deffers = delTabs.map(item => {
-          let _param = {
-            func: 'sPC_MainMenu_Del',
-            MenuID: item.uuid
-          }
+  //   // 鏈夋寜閽垨鏍囩鍒犻櫎鏃讹紝鍏堣繘琛屽垹闄ゆ搷浣�
+  //   // 鍒犻櫎鎴愬姛鍚庯紝淇濆瓨椤甸潰閰嶇疆
+  //   new Promise(resolve => {
+  //     if (delTabs.length > 0) {
+  //       let deffers = delTabs.map(item => {
+  //         let _param = {
+  //           func: 'sPC_MainMenu_Del',
+  //           MenuID: item.uuid
+  //         }
 
-          return new Promise(resolve => {
-            Api.getSystemConfig(_param).then(response => {
-              resolve(response)
-            })
-          })
-        })
-        Promise.all(deffers).then(result => {
-          let error = null
-          result.forEach(response => {
-            if (!response.status) {
-              error = response
-            }
-          })
+  //         return new Promise(resolve => {
+  //           Api.getCloudConfig(_param).then(response => {
+  //             resolve(response)
+  //           })
+  //         })
+  //       })
+  //       Promise.all(deffers).then(result => {
+  //         let error = null
+  //         result.forEach(response => {
+  //           if (!response.status) {
+  //             error = response
+  //           }
+  //         })
 
-          if (error) {
-            this.setState({
-              menuloading: false,
-              menucloseloading: false
-            })
-            notification.warning({
-              top: 92,
-              message: error.message,
-              duration: 5
-            })
-            resolve(false)
-          } else {
-            this.setState({
-              delTabs: []
-            })
-            resolve(true)
-          }
-        })
-      } else if (delTabs.length === 0) {
-        resolve(true)
-      }
-    }).then(resp => {
-      if (resp === false) return
-      let localParam = fromJS(param).toJS()
-      localParam.func = 'sPC_TrdMenu_AddUpt_For_Local'
-      delete localParam.LongParam
-      delete localParam.PageParam
-      delete localParam.Template
-      delete localParam.Sort
-      delete localParam.EasyCode
-      delete localParam.open_edition
+  //         if (error) {
+  //           this.setState({
+  //             menuloading: false,
+  //             menucloseloading: false
+  //           })
+  //           notification.warning({
+  //             top: 92,
+  //             message: error.message,
+  //             duration: 5
+  //           })
+  //           resolve(false)
+  //         } else {
+  //           this.setState({
+  //             delTabs: []
+  //           })
+  //           resolve(true)
+  //         }
+  //       })
+  //     } else if (delTabs.length === 0) {
+  //       resolve(true)
+  //     }
+  //   }).then(resp => {
+  //     if (resp === false) return
 
-      Api.getSystemConfig(param).then(response => {
-        if (response.status) {
-          this.setState({
-            config: _config,
-            openEdition: response.open_edition || '',
-            originMenu: fromJS(_config).toJS()
-          })
+  //     Api.getCloudConfig(param).then(response => {
+  //       if (response.status) {
+  //         this.setState({
+  //           config: _config,
+  //           openEdition: response.open_edition || '',
+  //           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.getLocalConfig(localParam)
+  //         this.props.reloadmenu()
 
-                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.getLocalConfig(localParam)
-
-            if (this.state.closeVisible) {
-              this.props.handleView()
-            } else {
-              this.setState({
-                menuloading: false,
-                menucloseloading: false
-              })
-            }
-          }
-        } else {
-          this.setState({
-            menuloading: false,
-            menucloseloading: false
-          })
-          notification.warning({
-            top: 92,
-            message: response.message,
-            duration: 5
-          })
-        }
-      })
-    })
-  }
+  //         if (this.state.closeVisible) {
+  //           this.props.handleView()
+  //         }
+  //       } else {
+  //         this.setState({
+  //           menuloading: false,
+  //           menucloseloading: false
+  //         })
+  //         notification.warning({
+  //           top: 92,
+  //           message: response.message,
+  //           duration: 5
+  //         })
+  //       }
+  //     })
+  //   })
+  // }
 
   /**
    * @description 鐐瑰嚮杩斿洖鏃讹紝鍒ゆ柇閰嶇疆淇濆瓨鐘舵��
    */
   cancelConfig = () => {
-    const { config, originMenu } = this.state
-    let _this = this
+    // const { config, originMenu } = this.state
+    // let that = this
 
-    if (config.isAdd) {
-      confirm({
-        content: '鑿滃崟灏氭湭鎻愪氦锛岀‘瀹氭斁寮冧繚瀛樺悧锛�',
-        onOk() {
-          _this.props.handleView()
-        },
-        onCancel() {}
-      })
-    } else {
-      if (!is(fromJS(originMenu), fromJS(config))) {
-        this.setState({
-          closeVisible: true
-        })
-      } else {
-        this.props.handleView()
-      }
-    }
+    // if (config.isAdd) {
+    //   confirm({
+    //     content: '鑿滃崟灏氭湭鎻愪氦锛岀‘瀹氭斁寮冧繚瀛樺悧锛�',
+    //     onOk() {
+    //       that.props.handleView()
+    //     },
+    //     onCancel() {}
+    //   })
+    // } else {
+    //   if (!is(fromJS(originMenu), fromJS(config))) {
+    //     this.setState({
+    //       closeVisible: true
+    //     })
+    //   } else {
+    //     this.props.handleView()
+    //   }
+    // }
+    this.props.handleView()
   }
 
   /**
@@ -476,7 +475,7 @@
     if (config.isAdd) { // menuID涓嶅瓨鍦ㄦ椂锛屼负鏂板缓鑿滃崟锛屾彁绀鸿彍鍗曞皻鏈繚瀛�
       notification.warning({
         top: 92,
-        message: this.state.dict['header.menu.config.notsave'],
+        message: '鑿滃崟灏氭湭淇濆瓨锛岃鍏堜繚瀛樿彍鍗曢厤缃紒',
         duration: 5
       })
     } else {
@@ -484,7 +483,7 @@
       if (!config.fstMenuId || !config.ParentId || !config.MenuName || !config.MenuNo) {
         notification.warning({
           top: 92,
-          message: this.state.dict['model.menu.basemsg'],
+          message: '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒',
           duration: 5
         })
         this.setState({activeKey: '0'})
@@ -495,7 +494,7 @@
       if (!is(fromJS(originMenu), fromJS(config))) {
         notification.warning({
           top: 92,
-          message: this.state.dict['header.menu.config.update'],
+          message: '鑿滃崟閰嶇疆宸蹭慨鏀癸紝璇蜂繚瀛橈紒',
           duration: 5
         })
         return
@@ -534,7 +533,7 @@
         loading: true
       })
 
-      Api.getSystemConfig({
+      Api.getCloudConfig({
         func: 'sPC_Get_LongParam',
         MenuID: item.linkTab
       }).then(res => {
@@ -663,17 +662,16 @@
           <div className="tools">
             <Collapse accordion activeKey={activeKey} bordered={false} onChange={(key) => this.setState({activeKey: key})}>
               {/* 鍩烘湰淇℃伅 */}
-              <Panel forceRender={true} header={this.state.dict['header.menu.basedata']} key="0" id="main-basedata">
+              <Panel forceRender={true} header="鍩烘湰淇℃伅" key="0" id="main-basedata">
                 {/* 鑿滃崟淇℃伅 */}
                 <MenuForm
                   menu={menu}
                   config={config}
-                  dict={this.state.dict}
                   updatemenu={this.updateconfig}
                 />
               </Panel>
               {/* 娣诲姞鏍囩 */}
-              <Panel header={this.state.dict['header.menu.tab']} key="4">
+              <Panel header="鏍囩椤�" key="4">
                 <div className="search-element">
                   {Source.tabItems.map((item, index) => {
                     return (<SourceElement key={index} content={item}/>)
@@ -684,7 +682,7 @@
                     <Tooltip placement="topLeft" title="鐐瑰嚮鎸夐挳锛屽彲瀹屾垚鎴栨煡鐪嬫爣绛鹃厤缃俊鎭��">
                       <QuestionCircleOutlined className="mk-form-tip" />
                     </Tooltip>
-                    {this.state.dict['header.menu.tab.configurable']}
+                    鏍囩閰嶇疆
                   </p> : null
                 }
                 {configTabs.map((item, index) => {
@@ -705,14 +703,15 @@
           <div className="setting">
             <Card title={
               <div>
-                {this.state.dict['header.menu.page.configurable']} 
+                椤甸潰閰嶇疆 
                 <RedoOutlined style={{marginLeft: '10px'}} title="鍒锋柊鏍囩鍒楄〃" onClick={() => this.reloadTab(true)} />
               </div>
             } bordered={false} extra={
               <div>
-                <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={this.state.config.enabled} onChange={this.onEnabledChange} />
-                <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button>
-                <Button onClick={this.cancelConfig}>{this.state.dict['model.back']}</Button>
+                <UpdateTable config={config}/>
+                {/* <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={this.state.config.enabled} onChange={this.onEnabledChange} /> */}
+                {/* <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>淇濆瓨</Button> */}
+                <Button onClick={this.cancelConfig}>鍏抽棴</Button>
               </div>
             } style={{ width: '100%' }}>
               <Row gutter={16}>
@@ -765,35 +764,25 @@
           </div>
         </DndProvider>
         {/* 杩斿洖鏃舵湭淇濆瓨鎻愮ず */}
-        <Modal
+        {/* <Modal
           bodyStyle={{textAlign: 'center', color: '#000000', fontSize: '16px'}}
           closable={false}
           maskClosable={false}
           visible={this.state.closeVisible}
           onCancel={() => { this.setState({closeVisible: false}) }}
           footer={[
-            <Button key="save" className="mk-btn mk-green" loading={this.state.menucloseloading} onClick={this.submitConfig}>{this.state.dict['model.save']}</Button>,
-            <Button key="notsave" className="mk-btn mk-yellow" onClick={this.notsave}>{this.state.dict['model.notsave']}</Button>,
-            <Button key="cancel" onClick={() => { this.setState({closeVisible: false}) }}>{this.state.dict['model.cancel']}</Button>
+            <Button key="save" className="mk-btn mk-green" loading={this.state.menucloseloading} onClick={this.submitConfig}>淇濆瓨</Button>,
+            <Button key="notsave" className="mk-btn mk-yellow" onClick={this.notsave}>涓嶄繚瀛�</Button>,
+            <Button key="cancel" onClick={() => { this.setState({closeVisible: false}) }}>鍙栨秷</Button>
           ]}
           destroyOnClose
         >
-          {this.state.dict['header.menu.config.placeholder']}
-        </Modal>
+          閰嶇疆宸蹭慨鏀癸紝鏄惁淇濆瓨閰嶇疆淇℃伅锛�
+        </Modal> */}
         {this.state.loading && <Spin size="large" />}
       </div>
     )
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    memberLevel: state.memberLevel
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(ComTableConfig)
+export default ComTableConfig

--
Gitblit v1.8.0