From 7449eee8fa9f8a251e9c4e9162030f1e004bae0f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 15 十月 2020 09:17:04 +0800
Subject: [PATCH] 2020-10-15

---
 src/templates/formtabconfig/index.jsx |   44 ++------------------------------------------
 1 files changed, 2 insertions(+), 42 deletions(-)

diff --git a/src/templates/formtabconfig/index.jsx b/src/templates/formtabconfig/index.jsx
index f8b0e1b..3d0de8a 100644
--- a/src/templates/formtabconfig/index.jsx
+++ b/src/templates/formtabconfig/index.jsx
@@ -38,7 +38,6 @@
 class ComTableConfig extends Component {
   static propTpyes = {
     menu: PropTypes.any,
-    optionLibs: PropTypes.any,
     btnTab: PropTypes.object,
     config: PropTypes.any,
     handleView: PropTypes.func
@@ -67,7 +66,6 @@
     profileVisible: false,   // 楠岃瘉淇℃伅妯℃�佹
     editgroup: null,         // 褰撳墠缂栬緫缁�
     groupVisible: false,     // 缂栬緫缁勬ā鎬佹
-    optionLibs: null,        // 鑷畾涔変笅鎷夐�夐」搴�
     activeKey: '0',          // 榛樿灞曞紑鍩烘湰淇℃伅
     pasteVisible: false,     // 绮樿创妯℃�佹
     sqlVerifing: false,      // sql楠岃瘉
@@ -80,7 +78,7 @@
    * 2銆佽缃搷浣滅被鍨嬨�佸師濮嬭彍鍗曚俊鎭紙姣忔淇濆瓨鍚庨噸缃級銆佸凡浣跨敤琛ㄥ強鍩烘湰淇℃伅琛ㄥ崟
    */
   UNSAFE_componentWillMount () {
-    const { menu, btnTab, config, optionLibs } = this.props
+    const { menu, btnTab, config } = this.props
 
     let _config = ''
     let columns = []
@@ -104,24 +102,6 @@
       if (menu && menu.LongParam && menu.LongParam.setting) {
         _config.setting.primaryKey = menu.LongParam.setting.primaryKey
       }
-
-      _config.groups.forEach(group => {
-        group.sublist.forEach(item => {
-          if (
-            (item.type === 'select' || item.type === 'multiselect' || item.type === 'link') &&
-            item.resourceType === '0' &&
-            item.options && item.options.length > 0
-          ) {
-            optionLibs.set(btnTab.uuid + item.uuid, {
-              uuid: btnTab.uuid + item.uuid,
-              label: item.label,
-              parname: btnTab.label,
-              type: 'Modal',
-              options: item.options
-            })
-          }
-        })
-      })
     }
 
     if (!_config.tabgroups) {
@@ -153,7 +133,6 @@
       config: _config,
       activeKey: btnTab.activeKey || '0',
       openEdition: btnTab.open_edition || '',
-      optionLibs: optionLibs,
       columns: columns,
       originMenu: JSON.parse(JSON.stringify(_config)),
       selectedTables: _config.tables,
@@ -355,7 +334,6 @@
     let _tabview = menu ? menu.LongParam.Template : ''
     let param = {
       editMenu: menu,
-      optionLibs: this.state.optionLibs,
       editTab: null,
       tabConfig: null,
       editSubTab: null,
@@ -534,8 +512,7 @@
    * 3銆佹坊鍔犳垨缂栬緫鍒楋紝淇濆瓨鏃讹紝濡傛寜閽綅缃缃负琛ㄦ牸锛屽垯淇敼鎿嶄綔鍒楁樉绀虹姸鎬�
    */
   handleSubmit = () => {
-    const { btnTab } = this.props
-    const { config, modaltype, optionLibs, card } = this.state
+    const { config, modaltype, card } = this.state
 
     if (modaltype === 'search') {
       this.modalFormRef.handleConfirm().then(res => {
@@ -548,19 +525,6 @@
             duration: 5
           })
           return
-        }
-        if ( // 鏇存柊涓嬫媺瀛楀吀
-          (res.type === 'select' || res.type === 'multiselect' || res.type === 'link') &&
-          res.resourceType === '0' &&
-          res.options && res.options.length > 0
-        ) {
-          optionLibs.set(btnTab.uuid + res.uuid, {
-            uuid: btnTab.uuid + res.uuid,
-            label: res.label,
-            parname: btnTab.label,
-            type: 'Modal',
-            options: res.options
-          })
         }
 
         let _groups = null
@@ -654,7 +618,6 @@
               this.setState({
                 sqlVerifing: false,
                 config: {..._config, groups: _groups},
-                optionLibs: optionLibs,
                 modaltype: ''
               })
             } else {
@@ -668,7 +631,6 @@
         } else {
           this.setState({
             config: {..._config, groups: _groups},
-            optionLibs: optionLibs,
             modaltype: ''
           })
         }
@@ -1560,7 +1522,6 @@
 
           let param = {
             editMenu: menu,
-            optionLibs: this.state.optionLibs,
             editTab: btn,
             tabConfig: null,
             editSubTab: null,
@@ -2005,7 +1966,6 @@
             card={this.state.card}
             formlist={this.state.formlist}
             inputSubmit={this.handleSubmit}
-            optionLibs={this.state.optionLibs}
             wrappedComponentRef={(inst) => this.modalFormRef = inst}
           />
         </Modal>

--
Gitblit v1.8.0