From 2ff464f30d94235b3ad04475593b75a74a354de9 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 09 四月 2020 19:04:01 +0800
Subject: [PATCH] 2020-04-09

---
 src/templates/subtableconfig/index.jsx | 1180 +++++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 713 insertions(+), 467 deletions(-)

diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx
index d1d9d49..8bab18e 100644
--- a/src/templates/subtableconfig/index.jsx
+++ b/src/templates/subtableconfig/index.jsx
@@ -8,25 +8,30 @@
 import moment from 'moment'
 
 import Api from '@/api'
+import options from '@/store/options.js'
 import zhCN from '@/locales/zh-CN/comtable.js'
 import enUS from '@/locales/en-US/comtable.js'
 import Utils from '@/utils/utils.js'
-import { getSearchForm, getActionForm, getColumnForm } from '@/templates/tableshare/formconfig'
+import { getSearchForm, getActionForm, getColumnForm } from '@/templates/zshare/formconfig'
 import { queryTableSql } from '@/utils/option.js'
 
 import ActionForm from './actionform'
 import SettingForm from './settingform'
-import SearchForm from '@/templates/tableshare/searchform'
-import ColumnForm from '@/templates/tableshare/columnform'
-import DragElement from '@/templates/tableshare/dragelement'
-import ColspanForm from '@/templates/tableshare/colspanform'
-import GridBtnForm from '@/templates/tableshare/gridbtnform'
-import EditCard from '@/templates/tableshare/editcard'
-import VerifyCard from '@/templates/tableshare/verifycard'
-import VerifyCardExcelIn from '@/templates/tableshare/verifycardexcelin'
-import VerifyCardExcelOut from '@/templates/tableshare/verifycardexcelout'
-import MenuForm from '@/templates/tableshare/menuform'
-import SourceElement from '@/templates/tableshare/dragelement/source'
+import SearchForm from '@/templates/zshare/searchform'
+import ColumnForm from '@/templates/zshare/columnform'
+import DragElement from '@/templates/zshare/dragelement'
+import PasteForm from '@/templates/zshare/pasteform'
+import ColspanForm from '@/templates/zshare/colspanform'
+import GridBtnForm from '@/templates/zshare/gridbtnform'
+import EditCard from '@/templates/zshare/editcard'
+import VerifyCard from '@/templates/zshare/verifycard'
+import VerifyCardExcelIn from '@/templates/zshare/verifycardexcelin'
+import VerifyCardExcelOut from '@/templates/zshare/verifycardexcelout'
+import MenuForm from '@/templates/zshare/menuform'
+import TransferForm from '@/components/transferform'
+import SourceElement from '@/templates/zshare/dragelement/source'
+import CreateFunc from '@/templates/zshare/createfunc'
+import CreateInterface from '@/templates/zshare/createinterface'
 import Source from './source'
 import './index.scss'
 
@@ -38,6 +43,7 @@
 class SubTableConfig extends Component {
   static propTpyes = {
     menu: PropTypes.any,
+    optionLibs: PropTypes.any,
     editTab: PropTypes.any,
     tabConfig: PropTypes.any,
     editSubTab: PropTypes.any,
@@ -72,10 +78,14 @@
     originActions: null,     // 鍘熷鎸夐挳淇℃伅锛屼娇鐢ㄥ凡鏈夌敤鎴锋ā鏉�
     delActions: [],          // 鍒犻櫎鎸夐挳鍒楄〃
     copyActions: [],         // 澶嶅埗鎸夐挳缁�
-    funcLoading: false,      // 瀛樺偍杩囩▼鍒涘缓涓�
     showColumnName: false,   // 鏄剧ず鍒楀瓧娈靛悕鎺у埗
     tabviews: [],            // 鎵�鏈夋爣绛鹃〉
-    profileVisible: false    // 楠岃瘉淇℃伅妯℃�佹
+    profileVisible: false,   // 楠岃瘉淇℃伅妯℃�佹
+    optionLibs: null,        // 鑷畾涔変笅鎷夐�夐」搴�
+    thawBtnVisible: false,   // 瑙e喕鎸夐挳寮圭獥
+    thawbtnlist: null,       // 瑙e喕鎸夐挳鍒楄〃
+    thawButtons: [],         // 宸查�夋嫨瑕佽В鍐荤殑鎸夐挳
+    activeKey: '0'           // 榛樿灞曞紑鍩烘湰淇℃伅
   }
 
   /**
@@ -84,7 +94,7 @@
    * 2銆佽缃搷浣滅被鍨嬨�佸師濮嬭彍鍗曚俊鎭紙姣忔淇濆瓨鍚庨噸缃級銆佸凡浣跨敤琛ㄥ強鍩烘湰淇℃伅琛ㄥ崟
    */
   UNSAFE_componentWillMount () {
-    const { config, editTab, editSubTab } = this.props
+    const { config, editTab, editSubTab, optionLibs } = this.props
 
     let _config = null
 
@@ -95,6 +105,22 @@
       _config.isAdd = true
     } else {
       _config = JSON.parse(JSON.stringify(config))
+
+      _config.search.forEach(item => {
+        if (
+          (item.type === 'select' || item.type === 'multiselect' || item.type === 'link') &&
+          item.resourceType === '0' &&
+          item.options && item.options.length > 0
+        ) {
+          optionLibs.set(_config.uuid + item.uuid, {
+            uuid: _config.uuid + item.uuid,
+            label: item.label,
+            parname: _config.tabName,
+            type: 'search',
+            options: item.options
+          })
+        }
+      })
     }
     
     let _oriActions = []
@@ -115,9 +141,13 @@
       })
     }
 
+    let _activeKey =  editSubTab ? editSubTab.activeKey : editTab.activeKey
+
     this.setState({
       originActions: _oriActions,
+      optionLibs: optionLibs,
       config: _config,
+      activeKey: _activeKey || '0',
       originConfig: _config,
       selectedTables: _config.tables || [],
       menuformlist: [
@@ -260,6 +290,52 @@
             }
           })
         })
+      } else {
+        notification.warning({
+          top: 92,
+          message: res.message,
+          duration: 10
+        })
+      }
+    })
+  }
+
+  /**
+   * @description 鍔犺浇鎴栧埛鏂版爣绛句俊鎭�
+   */
+  reloadTab = () => {
+    this.setState({
+      loading: true,
+      tabviews: []
+    })
+    Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => {
+      if (res.status) {
+        this.setState({
+          loading: false,
+          tabviews: res.UserTemp.map(temp => {
+            return {
+              uuid: temp.MenuID,
+              value: temp.MenuID,
+              text: temp.MenuName,
+              type: temp.Template,
+              MenuNo: temp.MenuNo
+            }
+          })
+        })
+        notification.success({
+          top: 92,
+          message: '鍒锋柊鎴愬姛銆�',
+          duration: 2
+        })
+      } else {
+        this.setState({
+          loading: false
+        })
+        notification.warning({
+          top: 92,
+          message: res.message,
+          duration: 10
+        })
       }
     })
   }
@@ -293,6 +369,7 @@
 
     let param = {
       editMenu: menu,
+      optionLibs: this.state.optionLibs,
       editTab: editSubTab ? editTab : null,
       tabConfig: null,
       editSubTab: null,
@@ -303,6 +380,14 @@
       subConfig: _subconfig,
       tabview: _tabview
     }
+
+    this.state.copyActions.forEach(item => {
+      let _param = {
+        func: 'sPC_MainMenu_Del',
+        MenuID: item
+      }
+      Api.getSystemConfig(_param)
+    })
 
     this.props.handleView(param)
   }
@@ -335,7 +420,7 @@
     this.setState({
       modaltype: 'search',
       card: card,
-      formlist: getSearchForm(card)
+      formlist: getSearchForm(card, this.props.sysRoles)
     })
   }
 
@@ -360,12 +445,79 @@
    * @description 鏄剧ず鍒椾笌鍚堝苟鍒楃紪杈戯紝鑾峰彇琛ㄥ崟淇℃伅
    */
   handleColumn = (card) => {
+    const { menu } = this.props
+
     if (card.type !== 'colspan') {
-      this.setState({
-        modaltype: 'columns',
-        card: card,
-        formlist: getColumnForm(card)
+      let menulist = menu.fstMenuList.map(item => {
+        return {
+          value: item.MenuID,
+          label: item.text,
+          isLeaf: false
+        }
       })
+
+      if ((card.type === 'text' || card.type === 'number') && card.linkmenu && card.linkmenu.length > 0) {
+        let _param = {
+          func: 'sPC_Get_FunMenu',
+          ParentID: card.linkmenu[0],
+          systemType: options.systemType,
+          debug: 'Y'
+        }
+
+        this.setState({
+          loading: true
+        })
+    
+        Api.getSystemConfig(_param).then(result => {
+          if (result.status) {
+            menulist = menulist.map(item => {
+              if (item.value === card.linkmenu[0]) {
+                item.children = result.data.map(item => {
+                  let submenu = {
+                    value: item.ParentID,
+                    label: item.MenuNameP,
+                    children: item.FunMenu.map(cell => {
+                      return {
+                        value: cell.MenuID,
+                        label: cell.MenuName,
+                        MenuID: cell.MenuID,
+                        MenuName: cell.MenuName,
+                        MenuNo: cell.MenuNo,
+                        Ot: cell.Ot,
+                        PageParam: cell.PageParam,
+                        LinkUrl: cell.LinkUrl,
+                        disabled: cell.MenuID === menu.MenuID
+                      }
+                    })
+                  }
+
+                  return submenu
+                })
+              }
+              return item
+            })
+          } else {
+            notification.warning({
+              top: 92,
+              message: result.message,
+              duration: 10
+            })
+          }
+
+          this.setState({
+            loading: false,
+            modaltype: 'columns',
+            card: card,
+            formlist: getColumnForm(card, this.props.sysRoles, menulist)
+          })
+        })
+      } else {
+        this.setState({
+          modaltype: 'columns',
+          card: card,
+          formlist: getColumnForm(card, this.props.sysRoles, menulist)
+        })
+      }
     } else {
       this.setState({
         modaltype: 'colspan',
@@ -390,21 +542,64 @@
    * 3銆佹坊鍔犳垨缂栬緫鍒楋紝淇濆瓨鏃讹紝濡傛寜閽綅缃缃负琛ㄦ牸锛屽垯淇敼鎿嶄綔鍒楁樉绀虹姸鎬�
    */
   handleSubmit = () => {
-    const { card, config, modaltype } = this.state
+    const { card, config, modaltype, optionLibs } = this.state
 
     if (modaltype === 'search') {
       this.searchFormRef.handleConfirm().then(res => {
+        if ( // 鏇存柊涓嬫媺瀛楀吀
+          (res.type === 'select' || res.type === 'multiselect' || res.type === 'link') &&
+          res.resourceType === '0' &&
+          res.options && res.options.length > 0
+        ) {
+          optionLibs.set(config.uuid + res.uuid, {
+            uuid: config.uuid + res.uuid,
+            label: res.label,
+            parname: config.tabName,
+            type: 'search',
+            options: res.options
+          })
+        }
+
+        let fieldrepet = false // 瀛楁閲嶅
+        let labelrepet = false // 鎻愮ず鏂囧瓧閲嶅
+
         let _search = config.search.map(item => {
+          if (item.uuid !== res.uuid && res.field && item.field) {
+            if (item.field === res.field) {
+              fieldrepet = true
+            } else if (item.label === res.label) {
+              labelrepet = true
+            }
+          }
+
           if (item.uuid === res.uuid) {
             return res
           } else {
             return item
           }
         })
+
+        if (fieldrepet) {
+          notification.warning({
+            top: 92,
+            message: '瀛楁宸插瓨鍦紒',
+            duration: 10
+          })
+          return
+        } else if (labelrepet) {
+          notification.warning({
+            top: 92,
+            message: '鍚嶇О宸插瓨鍦紒',
+            duration: 10
+          })
+          return
+        }
+
         _search = _search.filter(item => !item.origin)
 
         this.setState({
           config: {...config, search: _search},
+          optionLibs: optionLibs,
           modaltype: ''
         })
       })
@@ -435,9 +630,9 @@
               // 瑙f瀽閰嶇疆锛屼慨鏀规ā鎬佹鏍囬鍚嶇О
               if (result.LongParam) {
                 try {
-                  _LongParam = window.decodeURIComponent(window.atob(result.LongParam))
-                  _LongParam = JSON.parse(_LongParam)
+                  _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
                 } catch (e) {
+                  console.warn('Parse Failure')
                   _LongParam = ''
                 }
               }
@@ -446,6 +641,7 @@
                   _LongParam.setting.title = res.label
                   _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_LongParam)))
                 } catch {
+                  console.warn('Stringify Failure')
                   _LongParam = ''
                 }
               } else {
@@ -506,13 +702,41 @@
       })
     } else if (modaltype === 'columns' || modaltype === 'colspan') {
       this.columnFormRef.handleConfirm().then(res => {
+        let fieldrepet = false // 瀛楁閲嶅
+        let labelrepet = false // 鎻愮ず鏂囧瓧閲嶅
+
         let _columns = config.columns.map(item => {
+          if (item.uuid !== res.uuid && res.field && item.field) {
+            if (item.field === res.field) {
+              fieldrepet = true
+            } else if (item.label === res.label) {
+              labelrepet = true
+            }
+          }
+
           if (item.uuid === res.uuid) {
             return res
           } else {
             return item
           }
         })
+
+        if (fieldrepet) {
+          notification.warning({
+            top: 92,
+            message: '瀛楁宸插瓨鍦紒',
+            duration: 10
+          })
+          return
+        } else if (labelrepet) {
+          notification.warning({
+            top: 92,
+            message: '鍚嶇О宸插瓨鍦紒',
+            duration: 10
+          })
+          return
+        }
+
         _columns = _columns.filter(item => !item.origin)
 
         this.setState({
@@ -574,9 +798,6 @@
       let btn = res         // 鎸夐挳淇℃伅
       let newLText = ''     // 鍒涘缓瀛樺偍杩囩▼sql
       let DelText = ''      // 鍒犻櫎瀛樺偍杩囩▼sql
-      let isExit = false    // 瀛樺偍杩囩▼鏄惁瀛樺湪
-      let sysTVPText = ''   // 宸叉湁鐨勫瓨鍌ㄨ繃绋嬭鍙�(浜戠)
-      let localTVPText = '' // 宸叉湁鐨勫瓨鍌ㄨ繃绋嬭鍙�(鏈湴)
 
       // 鍒涘缓瀛樺偍杩囩▼锛屽繀椤诲~鍐欏唴閮ㄥ嚱鏁板悕
       if (!btn.innerFunc) {
@@ -588,11 +809,6 @@
         return
       }
 
-      // 鍒涘缓涓�
-      this.setState({
-        funcLoading: true
-      })
-
       new Promise(resolve => {
         // 寮圭獥锛堣〃鍗曪級绫绘寜閽紝鍏堣幏鍙栨寜閽厤缃俊鎭紝濡傛灉灏氭湭閰嶇疆鎸夐挳鍒欎細鎶ラ敊骞剁粓姝€��
         // 鑾峰彇淇℃伅鍚庣敓鎴愬垹闄ゅ拰鍒涘缓瀛樺偍杩囩▼鐨勮鍙�
@@ -603,10 +819,10 @@
           }).then(res => {
             let _LongParam = ''
             if (res.status && res.LongParam) {
-              _LongParam = window.decodeURIComponent(window.atob(res.LongParam))
               try {
-                _LongParam = JSON.parse(_LongParam)
+                _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam)))
               } catch (e) {
+                console.warn('Parse Failure')
                 _LongParam = ''
               }
             }
@@ -631,12 +847,12 @@
               DelText = Utils.formatOptions(Utils.dropfunc(_param.funcName))
               resolve(true)
             } else {
-              resolve(false)
               notification.warning({
                 top: 92,
                 message: '寮圭獥锛堣〃鍗曪級鎸夐挳锛岃鍏堥厤缃〃鍗曚俊鎭紒',
                 duration: 10
               })
+              resolve(false)
             }
           })
         } else if (btn.OpenType === 'excelIn') {
@@ -677,207 +893,42 @@
           resolve(true)
         }
       }).then(res => {
-        // 鑾峰彇浜戠鍙婃湰鍦帮紝鏄惁宸插瓨鍦ㄨ瀛樺偍杩囩▼鐨勪俊鎭�
-        if (res === false) return res
+        if (!res) return
 
-        let sysDefer = new Promise(resolve => {
-          Api.getSystemConfig({
-            func: 'sPC_Get_TVP', // 浜戠鑾峰彇瀛樺偍缁撴灉
-            TVPName: btn.innerFunc
-          }).then(result => {
-            resolve(result)
-          })
-        })
+        this.refs.btnCreatFunc.exec(btn.innerFunc, newLText, DelText).then(result => {
+          if (result !== 'success') return
 
-        let localDefer = new Promise(resolve => {
-          let _param = { // 鑾峰彇鏈湴瀛樺偍杩囩▼淇℃伅
-            func: 's_get_userproc',
-            LText: btn.innerFunc
-          }
-          _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
-          _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp)
-          
-          Api.getLocalConfig(_param).then(result => {
-            resolve(result)
-          })
-        })
-        
-        return Promise.all([sysDefer, localDefer])
-      }).then(res => {
-        // 浜戠缁撴灉涓庢柊璇彞涓嶅悓鏃讹紝鏇存柊浜戠淇℃伅
-        if (res === false) return res
-
-        let isError = false
-
-        res.forEach((result, index) => {
-          if (!result.status) {
-            notification.warning({
-              top: 92,
-              message: result.message,
-              duration: 10
-            })
-            isError = true
-          } else if (index === 0) {
-            sysTVPText = result.TVPText
-          } else {
-            if (result.Ltext) { // 鏈湴瀛樺偍杩囩▼鏄惁瀛樺湪
-              isExit = true
+          _config.action = _config.action.map(item => {
+            if (item.uuid === btn.uuid) {
+              return btn
+            } else {
+              return item
             }
-            localTVPText = Utils.formatOptions(result.Ltext)
-          }
-        })
-
-        if (isError) return false
-        
-        if ((newLText === localTVPText) && (newLText === sysTVPText)) {
-          return 'drop'
-        } else if (!localTVPText || (localTVPText === sysTVPText)) {
-          // 鏈湴瀛樺偍杩囩▼涓嶅瓨鍦紝灏嗘柊鐨勫瓨鍌ㄨ繃绋嬫洿鏂拌嚦浜戠
-          return Api.getSystemConfig({
-            func: 'sPC_TVP_InUp',
-            TVPName: btn.innerFunc,
-            TVPText: newLText,
-            TypeName: 'P'
           })
-        } else {
-          return new Promise(resolve => {
-            Api.getSystemConfig({ // 娣诲姞鐜版湁鐨勬湰鍦板瓨鍌ㄨ繃绋嬭嚦浜戠
-              func: 'sPC_TVP_InUp',
-              TVPName: btn.innerFunc,
-              TVPText: localTVPText,
-              TypeName: 'P'
-            }).then(result => {
-              if (result.status) {
-                Api.getSystemConfig({
-                  func: 'sPC_TVP_InUp', // 娣诲姞鏈�鏂扮殑瀛樺偍杩囩▼鑷充簯绔�
-                  TVPName: btn.innerFunc,
-                  TVPText: newLText,
-                  TypeName: 'P'
-                }).then(response => {
-                  resolve(response)
-                })
-              } else {
-                resolve(result)
-              }
-            })
-          })
-        }
-      }).then(res => {
-        // 浜戠淇℃伅鏇存柊鍚庯紝鍒ゆ柇鏄垹闄ゆ垨鏄洿鎺ユ柊寤哄瓨鍌ㄨ繃绋�
-        if (res === false || res === 'drop') return res
+          _config.action = _config.action.filter(item => !item.origin)
 
-        if (!res.status) {
-          notification.warning({
-            top: 92,
-            message: res.message,
-            duration: 10
-          })
-          return false
-        } else if (isExit) {
-          return 'drop'
-        } else {
-          return 'create'
-        }
-      }).then(res => {
-        // 鍒犻櫎瀛樺偍杩囩▼
-        if (res === false || res === 'create') return res
+          // 鍒ゆ柇鏄惁瀛樺湪鎿嶄綔鍒�
+          let _hasGridbtn = _config.action.filter(act => act.position === 'grid').length > 0
 
-        let _param = {
-          func: 'sPC_TableData_InUpDe',
-          LText: DelText,
-          TypeCharOne: 'proc' // 鍒犻櫎鎴栧垱寤哄瓨鍌ㄨ繃绋�
-        }
-
-        _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
-        _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp)
-
-        return Api.getLocalConfig(_param)
-      }).then(res => {
-        // 鏍规嵁涓婅堪鎿嶄綔缁撴灉锛屽垽鏂槸鍚︽柊寤哄瓨鍌ㄨ繃绋�
-        if (res === false || res === 'create') return res
-
-        if (!res.status) {
-          notification.warning({
-            top: 92,
-            message: res.message,
-            duration: 10
-          })
-          return false
-        } else {
-          return 'create'
-        }
-      }).then(res => {
-        // 鏂板缓瀛樺偍杩囩▼
-        if (res === false) return res
-
-        let _param = {
-          func: 'sPC_TableData_InUpDe',
-          LText: newLText,
-          TypeCharOne: 'proc' // 鍒犻櫎鎴栧垱寤哄瓨鍌ㄨ繃绋�
-        }
-        _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
-        _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp)
-
-        return Api.getLocalConfig(_param)
-      }).then(res => {
-        // 澶勭悊鏂板缓缁撴灉
-        if (res === false) return res
-
-        if (!res.status) {
-          notification.warning({
-            top: 92,
-            message: res.message,
-            duration: 10
-          })
-          return false
-        } else {
-          notification.success({
-            top: 92,
-            message: '鍒涘缓鎴愬姛',
-            duration: 2
-          })
-          return true
-        }
-      }).then(res => {
-        // 鏂板缓鎴愬姛鍚庯紝鏇存柊椤甸潰鎸夐挳淇℃伅
-        if (res === false) {
-          this.setState({
-            funcLoading: false
-          })
-          return
-        }
-
-        _config.action = _config.action.map(item => {
-          if (item.uuid === btn.uuid) {
-            return btn
+          if (_config.gridBtn) {
+            _config.gridBtn.display = _hasGridbtn
           } else {
-            return item
+            _config.gridBtn = {
+              display: _hasGridbtn,
+              Align: 'center',
+              IsSort: 'false',
+              uuid: Utils.getuuid(),
+              label: this.state.dict['header.form.column.action'],
+              type: 'action',
+              style: 'button',
+              show: 'horizontal',
+              Width: 120
+            }
           }
-        })
-        _config.action = _config.action.filter(item => !item.origin)
-
-        // 鍒ゆ柇鏄惁瀛樺湪鎿嶄綔鍒�
-        let _hasGridbtn = _config.action.filter(act => act.position === 'grid').length > 0
-
-        if (_config.gridBtn) {
-          _config.gridBtn.display = _hasGridbtn
-        } else {
-          _config.gridBtn = {
-            display: _hasGridbtn,
-            Align: 'center',
-            IsSort: 'false',
-            uuid: Utils.getuuid(),
-            label: this.state.dict['header.form.column.action'],
-            type: 'action',
-            style: 'button',
-            show: 'horizontal',
-            Width: 120
-          }
-        }
-
-        this.setState({
-          config: _config,
-          funcLoading: false
+  
+          this.setState({
+            config: _config,
+          })
         })
       })
     })
@@ -887,10 +938,10 @@
    * @description 鍒涘缓琛ㄦ牸瀛樺偍杩囩▼
    */
   tableCreatFunc = () => {
-    let config = JSON.parse(JSON.stringify(this.state.config))
+    const { config } = this.state
 
-    this.settingRef.handleConfirm().then(res => {
-      const setting = res
+    this.settingRef.handleConfirm().then(setting => {
+
       if (!(setting.interType === 'inner') || !setting.innerFunc) {
         notification.warning({
           top: 92,
@@ -900,210 +951,23 @@
         return
       }
 
-      if (setting.dataresource.length > 50 && config.setting.dataresource !== setting.dataresource) {
-        let param = {
-          func: 's_DataSrc_Save',
-          LText: setting.dataresource,
-          MenuID: config.uuid
-        }
-
-        param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
-        param.secretkey = Utils.encrypt(param.LText, param.timestamp)
-
-        Api.getLocalConfig(param)
-      }
-
-      this.setState({
-        funcLoading: true
-      })
-
-      let newLText = Utils.formatOptions(Utils.getTableFunc(setting, {MenuID: config.uuid, MenuName: config.tabName, MenuNo: config.tabNo}, config)) // 鍒涘缓瀛樺偍杩囩▼sql
+      let _config = {...config, setting: setting}
+      let newLText = Utils.formatOptions(Utils.getTableFunc(setting, {MenuID: _config.uuid, MenuName: _config.tabName, MenuNo: _config.tabNo}, _config)) // 鍒涘缓瀛樺偍杩囩▼sql
       let DelText = Utils.formatOptions(Utils.dropfunc(setting.innerFunc))          // 鍒犻櫎瀛樺偍杩囩▼sql
-
-      new Promise(resolve => {
-        let sysDefer = new Promise(resolve => {
-          Api.getSystemConfig({
-            func: 'sPC_Get_TVP', // 浜戠鑾峰彇瀛樺偍缁撴灉
-            TVPName: setting.innerFunc
-          }).then(result => {
-            if (!result.status) {
-              notification.warning({
-                top: 92,
-                message: result.message,
-                duration: 10
-              })
-              resolve(false)
-            } else {
-              resolve(result)
-            }
-          })
-        })
-
-        let localDefer = new Promise(resolve => {
-          let _param = { // 鑾峰彇鏈湴瀛樺偍杩囩▼淇℃伅
-            func: 's_get_userproc',
-            LText: setting.innerFunc
-          }
-          _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
-          _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp)
-          
-          Api.getLocalConfig(_param).then(result => {
-            if (!result.status) {
-              notification.warning({
-                top: 92,
-                message: result.message,
-                duration: 10
-              })
-              resolve(false)
-            } else {
-              resolve(result)
-            }
-          })
-        })
-        
-        Promise.all([sysDefer, localDefer]).then(result => {
-          resolve(result)
-        })
-      }).then(res => {
-        // 鑾峰彇浜戠鍙婃湰鍦帮紝鏄惁宸插瓨鍦ㄨ瀛樺偍杩囩▼鐨勪俊鎭�
-        if (res === false) return res
-        if (res[0] === false || res[1] === false) return false
-
-        let cloudfunc = ''
-        let localfunc = ''
-        res.forEach((item, index) => {
-          if (index === 0 && item.TVPText) {
-            cloudfunc = item.TVPText
-          } else if (index === 1 && item.Ltext) {
-            localfunc = Utils.formatOptions(item.Ltext)
-          }
-        })
-
-        if ((newLText === localfunc) && (newLText === cloudfunc)) {
-          return 'drop'
-        } else if (!localfunc || (cloudfunc === localfunc)) {
-          // 鏈湴瀛樺偍杩囩▼涓嶅瓨鍦紝鎴栦簯绔拰鏈湴瀛樺偍杩囩▼涓�鑷存椂锛屽皢鏂扮殑瀛樺偍杩囩▼鏇存柊鑷充簯绔�
-          return Api.getSystemConfig({
-            func: 'sPC_TVP_InUp',
-            TVPName: setting.innerFunc,
-            TVPText: newLText,
-            TypeName: 'P'
-          })
-        } else {
-          return new Promise(resolve => {
-            Api.getSystemConfig({ // 娣诲姞鐜版湁鐨勬湰鍦板瓨鍌ㄨ繃绋嬭嚦浜戠
-              func: 'sPC_TVP_InUp',
-              TVPName: setting.innerFunc,
-              TVPText: localfunc,
-              TypeName: 'P'
-            }).then(result => {
-              if (result.status) {
-                Api.getSystemConfig({
-                  func: 'sPC_TVP_InUp', // 娣诲姞鏈�鏂扮殑瀛樺偍杩囩▼鑷充簯绔�
-                  TVPName: setting.innerFunc,
-                  TVPText: newLText,
-                  TypeName: 'P'
-                }).then(response => {
-                  resolve(response)
-                })
-              } else {
-                resolve(result)
-              }
-            })
-          })
-        }
-      }).then(res => {
-        // 浜戠淇℃伅鏇存柊鍚庯紝鍒ゆ柇鏄垹闄ゆ垨鏄洿鎺ユ柊寤哄瓨鍌ㄨ繃绋�
-        if (res === false || res === 'drop') return res
-
-        if (!res.status) {
-          notification.warning({
-            top: 92,
-            message: res.message,
-            duration: 10
-          })
-          return false
-        } else {
-          return 'create'
-        }
-      }).then(res => {
-        // 鍒犻櫎瀛樺偍杩囩▼
-        if (res === false || res === 'create') return res
-
-        let _param = {
-          func: 'sPC_TableData_InUpDe',
-          LText: DelText,
-          TypeCharOne: 'proc' // 鍒犻櫎鎴栧垱寤哄瓨鍌ㄨ繃绋�
-        }
-
-        _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
-        _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp)
-
-        return Api.getLocalConfig(_param)
-      }).then(res => {
-        // 鏍规嵁涓婅堪鎿嶄綔缁撴灉锛屽垽鏂槸鍚︽柊寤哄瓨鍌ㄨ繃绋�
-        if (res === false || res === 'create') return res
-
-        if (!res.status) {
-          notification.warning({
-            top: 92,
-            message: res.message,
-            duration: 10
-          })
-          return false
-        } else {
-          return 'create'
-        }
-      }).then(res => {
-        // 鏂板缓瀛樺偍杩囩▼
-        if (res === false) return res
-
-        let _param = {
-          func: 'sPC_TableData_InUpDe',
-          LText: newLText,
-          TypeCharOne: 'proc' // 鍒犻櫎鎴栧垱寤哄瓨鍌ㄨ繃绋�
-        }
-        _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
-        _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp)
-
-        return Api.getLocalConfig(_param)
-      }).then(res => {
-        // 澶勭悊鏂板缓缁撴灉
-        if (res === false) return res
-
-        if (!res.status) {
-          notification.warning({
-            top: 92,
-            message: res.message,
-            duration: 10
-          })
-          return false
-        } else {
-          notification.success({
-            top: 92,
-            message: '鍒涘缓鎴愬姛',
-            duration: 2
-          })
-          return true
-        }
-      }).then(res => {
-        // 鏂板缓鎴愬姛鍚庯紝鏇存柊椤甸潰鎸夐挳淇℃伅
-        if (res === false) {
+      
+      this.refs.tableCreatFunc.exec(setting.innerFunc, newLText, DelText).then(result => {
+        if (result === 'success') {
           this.setState({
-            funcLoading: false
+            config: _config
           })
-          return
         }
-
-        this.setState({
-          config: {...config, setting: setting}
-        })
       })
     })
   }
 
   deleteElement = (element) => {
+    const { thawButtons } = this.state
+
     let _this = this
     confirm({
       content: `纭畾鍒犻櫎<<${element.card.label}>>鍚楋紵`,
@@ -1122,12 +986,13 @@
         // 鍒犻櫎鎸夐挳鍏冪礌
         let _delActions = _this.state.delActions
         if (element.type === 'action') {
-          _delActions.push(element.card.uuid)
+          _delActions.push(element)
         }
 
         _this.setState({
           config: _config,
-          delActions: _delActions
+          delActions: _delActions,
+          thawButtons: thawButtons.filter(key => key !== element.card.uuid)
         })
       },
       onCancel() {}
@@ -1142,6 +1007,21 @@
       profileVisible: true,
       card: element
     })
+  }
+
+  /**
+   * @description 鎸夐挳鍙屽嚮瑙﹀彂瀛愰厤缃�
+   */
+  btnDoubleClick = (element) => {
+    if (!element.origin && (element.OpenType === 'pop' || element.OpenType === 'popview' || element.OpenType === 'blank' || element.OpenType === 'tab')) {
+      this.setSubConfig(element)
+    } else {
+      notification.warning({
+        top: 92,
+        message: '姝ゆ寜閽棤瀛愰厤缃」锛�',
+        duration: 10
+      })
+    }
   }
 
   /**
@@ -1168,6 +1048,23 @@
           card: ''
         })
       })
+    } else if (card.execMode) {
+      this.verifyRef.handleConfirm().then(res => {
+        
+        config.action = config.action.map(item => {
+          if (item.uuid === card.uuid) {
+            item.verify = res
+          }
+    
+          return item
+        })
+    
+        this.setState({
+          profileVisible: false,
+          config: config,
+          card: '',
+        })
+      })
     } else {
       let _verify = this.verifyRef.state.verify
 
@@ -1178,6 +1075,18 @@
           duration: 10
         })
         return
+      } else if (card.OpenType === 'excelOut') {
+        let _cols = _verify.columns.map(col => col.Column)
+        let _vcols = Array.from(new Set(_cols))
+        if (_cols.length > _vcols.length) {
+          notification.warning({
+            top: 92,
+            message: 'Excel鍒楀瓧娈靛悕锛屼笉鍙噸澶�!',
+            duration: 10
+          })
+          
+          return
+        }
       }
 
       config.action = config.action.map(item => {
@@ -1200,7 +1109,7 @@
    * @description 鏍囩椤典繚瀛�
    */
   submitConfig = () => {
-    const { delActions, originConfig } = this.state
+    const { delActions, thawButtons, originConfig } = this.state
     let config = JSON.parse(JSON.stringify(this.state.config))
 
     this.menuformRef.handleConfirm().then(res => {
@@ -1261,7 +1170,7 @@
             subtype: 'btn',
             uuid: item.uuid,
             label: item.label,
-            tablename: tablename,
+            tableName: tablename,
             intertype: item.intertype,
             interface: item.interface || '',
             innerFunc: item.innerFunc || '',
@@ -1295,9 +1204,9 @@
         
                   if (result.LongParam) {
                     try {
-                      _LongParam = window.decodeURIComponent(window.atob(result.LongParam))
-                      _LongParam = JSON.parse(_LongParam)
+                      _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
                     } catch (e) {
+                      console.warn('Parse Failure')
                       _LongParam = ''
                     }
                   }
@@ -1327,7 +1236,7 @@
         // 淇濆瓨鏃跺垹闄ら厤缃被鍨嬶紝system 銆乽ser
         delete _config.type
         delete _config.isAdd
-  
+
         try {
           _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
         } catch (e) {
@@ -1352,15 +1261,32 @@
           Template: 'SubTable',
           PageParam: '',
           LongParam: '',
-          LText: config.action.map((item, index) => {
-            return `select '${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort`
-          })
+          LText: []
         }
+
+        let btntabs = []
+
+        config.action.forEach((item, index) => {
+          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') + '.000'
         btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
+
+        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') + '.000'
+        tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
   
         let param = {
           func: 'sPC_Tab_AddUpt',
@@ -1381,8 +1307,22 @@
             let deffers = delActions.map(item => {
               let _param = {
                 func: 'sPC_MainMenu_Del',
-                MenuID: item
+                MenuID: item.card.uuid
               }
+
+              let _ParentParam = null
+
+              try {
+                _ParentParam = window.btoa(window.encodeURIComponent(JSON.stringify(item.card)))
+              } catch (e) {
+                console.warn('Stringify Failure')
+                _ParentParam = null
+              }
+
+              if (_ParentParam) { // 鍒犻櫎鎸夐挳鏃讹紝淇濆瓨鎸夐挳閰嶇疆淇℃伅锛岀敤浜庢仮澶嶆寜閽�
+                _param.ParentParam = _ParentParam
+              }
+
               return new Promise(resolve => {
                 Api.getSystemConfig(_param).then(response => {
                   resolve(response)
@@ -1420,6 +1360,46 @@
           }
         }).then(resp => {
           if (resp === false) return
+
+          if (thawButtons.length > 0) {
+            let defers = thawButtons.map(item => {
+              return new Promise((resolve) => {
+                Api.getSystemConfig({
+                  func: 'sPC_MainMenu_ReDel',
+                  MenuID: item
+                }).then(res => {
+                  if (res.status) {
+                    resolve('')
+                  } else {
+                    resolve(res.message)
+                  }
+                })
+              })
+            })
+
+            return Promise.all(defers)
+          } else {
+            return true
+          }
+        }).then(res => {
+          if (res === true || res === false) return res
+
+          let msg = res.filter(Boolean)[0]
+          if (msg) {
+            notification.warning({
+              top: 92,
+              message: msg,
+              duration: 10
+            })
+            return false
+          } else {
+            this.setState({
+              thawButtons: []
+            })
+            return true
+          }
+        }).then(resp => {
+          if (resp === false) return
   
           Api.getSystemConfig(param).then(response => {
             if (response.status) {
@@ -1431,7 +1411,7 @@
                   menuloading: false,
                   menucloseloading: false
                 })
-                this.submitAction(btnParam)
+                this.submitAction(btnParam, tabParam)
               })
             } else {
               this.setState({
@@ -1459,24 +1439,57 @@
   /**
    * @description 淇濆瓨鎴栦慨鏀硅彍鍗曟寜閽�
    */
-  submitAction = (param) => {
+  submitAction = (btnParam, tabParam) => {
     const { config } = this.state
+
     new Promise(resolve => {
-      if (param.LText) {
-        Api.getSystemConfig(param).then(res => {
-          if (res.status) {
-            resolve(true)
-          } else {
+      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 => {
+            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: res.message,
+              message: error.message,
               duration: 10
             })
             resolve(false)
+          } else {
+            resolve(true)
           }
         })
-      } else {
-        resolve(true)
       }
     }).then(response => {
       if (response === false) return response
@@ -1504,10 +1517,10 @@
             let _LongParam = ''
   
             if (result.LongParam) {
-              _LongParam = window.decodeURIComponent(window.atob(result.LongParam))
               try {
-                _LongParam = JSON.parse(_LongParam)
+                _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
               } catch (e) {
+                console.warn('Parse Failure')
                 _LongParam = ''
               }
             }
@@ -1859,7 +1872,7 @@
       if (
         res.interType === 'inner' &&
         !res.innerFunc &&
-        res.dataresource.length > 50 &&
+        /[^\s]+\s+[^\s]+/ig.test(res.dataresource) &&
         config.setting.dataresource !== res.dataresource
       ) {
         let param = {
@@ -1887,7 +1900,7 @@
    */
   setSubConfig = (btn) => {
     const {menu, editTab, tabConfig, editSubTab, btnTab, btnTabConfig} = this.props
-    const { config, originConfig } = this.state
+    const { config, originConfig, activeKey } = this.state
 
     if (originConfig.isAdd) {
       notification.warning({
@@ -1921,8 +1934,15 @@
             _subtab = btn
           }
 
+          if (editSubTab) {
+            editSubTab.activeKey = activeKey
+          } else {
+            editTab.activeKey = activeKey
+          }
+
           let param = {
             editMenu: menu,
+            optionLibs: this.state.optionLibs,
             editTab: editTab,
             tabConfig: editSubTab ? tabConfig : originConfig,
             editSubTab: _subtab,
@@ -1944,10 +1964,10 @@
               })
               let _LongParam = ''
               if (res.LongParam) {
-                _LongParam = window.decodeURIComponent(window.atob(res.LongParam))
                 try {
-                  _LongParam = JSON.parse(_LongParam)
+                  _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam)))
                 } catch (e) {
+                  console.warn('Parse Failure')
                   _LongParam = ''
                 }
               }
@@ -2034,20 +2054,191 @@
     })
   }
 
+  /**
+   * @description 瑙e喕鎸夐挳
+   */
+  handleThaw = () => {
+    const { config } = this.state
+
+    this.setState({
+      thawBtnVisible: true
+    })
+
+    Api.getSystemConfig({
+      func: 'sPC_Get_FrozenMenu',
+      ParentID: config.uuid,
+      TYPE: 40
+    }).then(res => {
+      if (res.status) {
+        let _list = []
+
+        res.data.forEach(menu => {
+          let _conf = ''
+
+          if (menu.ParentParam) {
+            try {
+              _conf = JSON.parse(window.decodeURIComponent(window.atob(menu.ParentParam)))
+            } catch (e) {
+              console.warn('Parse Failure')
+              _conf = ''
+            }
+          }
+
+          if (_conf) {
+            _list.push({
+              key: menu.MenuID,
+              title: menu.MenuName,
+              btnParam: _conf
+            })
+          }
+        })
+
+        this.setState({
+          thawbtnlist: _list
+        })
+      } else {
+        notification.warning({
+          top: 92,
+          message: res.message,
+          duration: 10
+        })
+      }
+    })
+  }
+
+  /**
+   * @description 瑙e喕鎸夐挳鎻愪氦
+   */
+  thawBtnSubmit = () => {
+    const { thawButtons, config, thawbtnlist } = this.state
+    // 涓夌骇鑿滃崟瑙i櫎鍐荤粨
+    if (this.refs.trawmenu.state.targetKeys.length === 0) {
+      notification.warning({
+        top: 92,
+        message: this.state.dict['form.required.select'] + this.state.dict['header.form.thawbutton'],
+        duration: 10
+      })
+    } else {
+
+      thawbtnlist.forEach(item => {
+        if (this.refs.trawmenu.state.targetKeys.includes(item.key)) {
+          config.action.push(item.btnParam)
+        }
+      })
+
+      this.setState({
+        thawButtons: [...thawButtons, ...this.refs.trawmenu.state.targetKeys],
+        config: config,
+        thawBtnVisible: false
+      })
+    }
+  }
+
+  /**
+   * @description 鍒涘缓鎸夐挳鎺ュ彛锛堝啓鍏ワ級
+   */
+  btnCreatInterface = () => {
+    const { config } = this.state
+
+    this.menuformRef.handleConfirm().then(res => {
+      this.actionFormRef.handleConfirm().then(result => {
+        if (!['pop', 'exec', 'prompt'].includes(result) || result.funcType || result.intertype !== 'inner' || result.innerFunc ) {
+          notification.warning({
+            top: 92,
+            message: '鎵撳紑鏂瑰紡涓� 寮圭獥锛堣〃鍗曪級銆佹彁绀烘鎴栫洿鎺ユ墽琛岋紝涓斾娇鐢ㄧ郴缁熷嚱鏁版椂锛屾墠鍙互鍒涘缓鎺ュ彛锛�',
+            duration: 10
+          })
+          return
+        }
+        
+        let _menu = {
+          type: 'subtable',
+          MenuID: config.uuid,
+          menuName: res.tabName,
+          menuNo: res.tabNo
+        }
+        
+        this.refs.btnCreatInterface.triggerInInterface(result, config, _menu)
+      })
+    })
+  }
+
+  /**
+   * @description 鍒涘缓琛ㄦ牸鎺ュ彛
+   */
+  tableCreatInterface = () => {
+    const { config } = this.state
+
+    this.menuformRef.handleConfirm().then(res => {
+      this.settingRef.handleConfirm().then(setting => {
+        if (setting.interType !== 'inner' || setting.innerFunc) {
+          notification.warning({
+            top: 92,
+            message: '鎺ュ彛绫诲瀷涓�-鍐呴儴锛屼笖涓嶅瓨鍦ㄥ唴閮ㄥ嚱鏁版椂锛屾墠鍙互鍒涘缓鎺ュ彛锛�',
+            duration: 10
+          })
+          return
+        }
+  
+        let _config = {...config, setting: setting}
+        let _menu = {
+          type: 'subtable',
+          MenuID: config.uuid,
+          menuName: res.tabName,
+          menuNo: res.tabNo
+        }
+  
+        this.refs.tableCreatInterface.triggerOutInterface(_menu, _config)
+      })
+    })
+  }
+
+  pasteSubmit = () => {
+    this.pasteFormRef.handleConfirm().then(res => {
+      if (res.copyType !== 'action') {
+        notification.warning({
+          top: 92,
+          message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�',
+          duration: 10
+        })
+        return
+      } else if (!['pop', 'prompt', 'exec', 'excelIn', 'excelOut', 'popview'].includes(res.OpenType)) {
+        notification.warning({
+          top: 92,
+          message: '涓嶆敮鎸佹鎵撳紑鏂瑰紡锛�',
+          duration: 10
+        })
+        return
+      }
+
+      this.setState({
+        modaltype: ''
+      }, () => {
+        this.handleAction(res, 'copy')
+      })
+    })
+  }
+
   render () {
-    const { modaltype } = this.state
-    const configAction = this.state.config.action.filter(_action =>
+    const { modaltype, activeKey, config } = this.state
+
+    const configAction = config.action.filter(_action =>
       !_action.origin && (_action.OpenType === 'pop' || _action.OpenType === 'popview' || _action.OpenType === 'blank' || _action.OpenType === 'tab')
     )
+
+    let hasbtncrtinter = false
+    if (modaltype === 'actionEdit' && config.setting.interType === 'inner' && !config.setting.innerFunc && config.setting.dataresource) {
+      hasbtncrtinter = true
+    }
 
     return (
       <div className="common-table-board">
         <DndProvider backend={HTML5Backend}>
           {/* 宸ュ叿鏍� */}
           <div className="tools">
-            <Collapse accordion defaultActiveKey="0" bordered={false}>
+            <Collapse accordion defaultActiveKey={activeKey} bordered={false} onChange={(key) => this.setState({activeKey: key})}>
               {/* 鍩烘湰淇℃伅 */}
-              <Panel header={'鏍囩鍩烘湰淇℃伅'} key="0" id="common-basedata">
+              <Panel forceRender={true} header={'鏍囩鍩烘湰淇℃伅'} key="0" id="common-basedata">
                 {/* 鑿滃崟淇℃伅 */}
                 <MenuForm
                   dict={this.state.dict}
@@ -2108,14 +2299,19 @@
                     return (<SourceElement key={index} content={item}/>)
                   })}
                 </div>
-                {configAction.length > 0 ?
-                  <p className="config-btn-title">
-                    <Tooltip placement="topLeft" title="鐐瑰嚮鎸夐挳锛屽彲瀹屾垚鎴栨煡鐪嬫寜閽厤缃俊鎭��">
-                      <Icon type="question-circle" />
-                    </Tooltip>
-                    {this.state.dict['header.menu.action.configurable']}
-                  </p> : null
-                }
+                <div className="config-btn">
+                  {configAction.length > 0 ?
+                    <p className="config-btn-title">
+                      <Tooltip placement="topLeft" title="鐐瑰嚮鎸夐挳锛屽彲瀹屾垚鎴栨煡鐪嬫寜閽厤缃俊鎭��">
+                        <Icon type="question-circle" />
+                      </Tooltip>
+                      {this.state.dict['header.menu.action.configurable']}
+                    </p> : null
+                  }
+                  <div className="thawbutton" title={this.state.dict['header.form.thawbutton']} onClick={this.handleThaw}>
+                    <Icon type="unlock" />
+                  </div>
+                </div>
                 {configAction.map((item, index) => {
                   return (
                     <div key={index}>
@@ -2141,7 +2337,12 @@
             </Collapse>
           </div>
           <div className="setting">
-            <Card title={'鏍囩锛堝瓙琛級椤甸潰閰嶇疆'} bordered={false} extra={
+            <Card title={
+              <div>
+                鏍囩锛堝瓙琛級椤甸潰閰嶇疆 
+                <Icon type="redo" style={{marginLeft: '10px'}} title="鍒锋柊鏍囩鍒楄〃" onClick={this.reloadTab} />
+              </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['header.save']}</Button>
@@ -2166,14 +2367,19 @@
                 <Tooltip placement="bottomLeft" overlayClassName="middle" title="鍦ㄥ乏渚у伐鍏锋爮銆婃寜閽�嬩腑锛岄�夋嫨瀵瑰簲绫诲瀷鐨勬寜閽嫋鑷虫澶勬坊鍔狅紝濡傞�夋嫨鎸夐挳绫诲瀷涓鸿〃鍗曘�佹柊鏍囩椤电瓑鍚湁閰嶇疆椤甸潰鐨勬寜閽紝鍙湪宸︿晶宸ュ叿鏍�-鎸夐挳-鍙厤缃寜閽锛岀偣鍑绘寜閽畬鎴愮浉鍏抽厤缃�傛敞锛氬綋璁剧疆鎸夐挳鏄剧ず浣嶇疆涓鸿〃鏍兼椂锛屾樉绀哄垪浼氬鍔犳搷浣滃垪銆�">
                   <Icon type="question-circle" />
                 </Tooltip>
+                <div className="copybutton" title={this.state.dict['header.form.paste']} onClick={() => {this.setState({modaltype: 'paste'})}}>
+                  <Icon type="snippets" />
+                </div>
                 <DragElement
                   type="action"
                   list={this.state.config.action}
+                  setting={this.state.config.setting}
                   handleList={this.handleList}
                   handleMenu={this.handleAction}
                   copyElement={(val) => this.handleAction(val, 'copy')}
                   deleteMenu={this.deleteElement}
                   profileMenu={this.profileAction}
+                  doubleClickCard={this.btnDoubleClick}
                   placeholder={this.state.dict['header.form.action.placeholder']}
                 />
               </div>
@@ -2212,6 +2418,8 @@
             dict={this.state.dict}
             card={this.state.card}
             formlist={this.state.formlist}
+            inputSubmit={this.handleSubmit}
+            optionLibs={this.state.optionLibs}
             wrappedComponentRef={(inst) => this.searchFormRef = inst}
           />
         </Modal>
@@ -2223,7 +2431,8 @@
           maskClosable={false}
           onCancel={this.editModalCancel}
           footer={[
-            modaltype === 'actionEdit' ? <Button key="delete" className="mk-btn mk-purple" onClick={this.creatFunc} loading={this.state.funcLoading}>{this.state.dict['header.menu.func.create']}</Button> : null,
+            hasbtncrtinter ? <CreateInterface key="interface" dict={this.state.dict} ref="btnCreatInterface" trigger={this.btnCreatInterface}/> : null,
+            modaltype === 'actionEdit' ? <CreateFunc key="create" dict={this.state.dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null,
             <Button key="cancel" onClick={this.editModalCancel}>{this.state.dict['header.cancel']}</Button>,
             <Button key="confirm" type="primary" onClick={this.handleSubmit}>{this.state.dict['header.confirm']}</Button>
           ]}
@@ -2234,6 +2443,7 @@
             card={this.state.card}
             tabs={this.state.tabviews}
             formlist={this.state.formlist}
+            inputSubmit={this.handleSubmit}
             setting={this.state.config.setting}
             wrappedComponentRef={(inst) => this.actionFormRef = inst}
           />
@@ -2251,6 +2461,8 @@
           <ColumnForm
             dict={this.state.dict}
             card={this.state.card}
+            MenuID={this.props.menu.MenuID}
+            inputSubmit={this.handleSubmit}
             formlist={this.state.formlist}
             wrappedComponentRef={(inst) => this.columnFormRef = inst}
           />
@@ -2268,6 +2480,7 @@
           <ColspanForm
             dict={this.state.dict}
             card={this.state.card}
+            inputSubmit={this.handleSubmit}
             columns={this.state.config.columns}
             wrappedComponentRef={(inst) => this.columnFormRef = inst}
           />
@@ -2284,6 +2497,7 @@
         >
           <GridBtnForm
             dict={this.state.dict}
+            inputSubmit={this.handleSubmit}
             card={this.state.config.gridBtn}
             wrappedComponentRef={(inst) => this.gridBtnFormRef = inst}
           />
@@ -2338,6 +2552,7 @@
             <VerifyCardExcelIn
               card={this.state.card}
               dict={this.state.dict}
+              columns={this.state.config.columns}
               wrappedComponentRef={(inst) => this.verifyRef = inst}
             /> : null
           }
@@ -2361,7 +2576,8 @@
             })
           }}
           footer={[
-            <Button key="delete" className="mk-btn mk-purple" onClick={this.tableCreatFunc} loading={this.state.funcLoading}>{this.state.dict['header.menu.func.create']}</Button>,
+            <CreateInterface key="interface" dict={this.state.dict} ref="tableCreatInterface" trigger={this.tableCreatInterface}/>,
+            <CreateFunc key="create" dict={this.state.dict} ref="tableCreatFunc" trigger={this.tableCreatFunc}/>,
             <Button key="cancel" onClick={() => { this.setState({ settingVisible: false }) }}>{this.state.dict['header.cancel']}</Button>,
             <Button key="confirm" type="primary" onClick={this.settingSave}>{this.state.dict['header.confirm']}</Button>
           ]}
@@ -2370,6 +2586,7 @@
           <SettingForm
             dict={this.state.dict}
             tabId={this.state.config.uuid}
+            inputSubmit={this.settingSave}
             data={this.state.config.setting}
             columns={this.state.config.columns}
             usefulFields={this.props.permFuncField}
@@ -2391,6 +2608,34 @@
         >
           {this.state.dict['header.menu.config.placeholder']}
         </Modal>
+        {/* 瑙e喕鎸夐挳妯℃�佹 */}
+        <Modal
+          title={this.state.dict['header.form.thawbutton']}
+          okText={this.state.dict['header.confirm']}
+          cancelText={this.state.dict['header.cancel']}
+          visible={this.state.thawBtnVisible}
+          onOk={this.thawBtnSubmit}
+          onCancel={() => {this.setState({thawBtnVisible: false, thawbtnlist: null})}}
+          destroyOnClose
+        >
+          {!this.state.thawbtnlist && <Spin style={{marginLeft: 'calc(50% - 22px)', marginTop: '70px', marginBottom: '70px'}} size="large" />}
+          {this.state.thawbtnlist && <TransferForm ref="trawmenu" menulist={this.state.thawbtnlist}/>}
+        </Modal>
+        {/* 鎸夐挳閰嶇疆淇℃伅绮樿创澶嶅埗 */}
+        <Modal
+          title={this.state.dict['header.form.paste']}
+          visible={modaltype === 'paste'}
+          width={600}
+          maskClosable={false}
+          onOk={this.pasteSubmit}
+          onCancel={() => {this.setState({modaltype: ''})}}
+          destroyOnClose
+        >
+          <PasteForm
+            dict={this.state.dict}
+            wrappedComponentRef={(inst) => this.pasteFormRef = inst}
+          />
+        </Modal>
         {this.state.loading && <Spin size="large" />}
       </div>
     )
@@ -2399,6 +2644,7 @@
 
 const mapStateToProps = (state) => {
   return {
+    sysRoles: state.sysRoles,
     permFuncField: state.permFuncField
   }
 }

--
Gitblit v1.8.0