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/sharecomponent/searchcomponent/searchform/index.jsx |   28 ++++------------------------
 1 files changed, 4 insertions(+), 24 deletions(-)

diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx
index 1fea449..708b052 100644
--- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx
+++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx
@@ -84,7 +84,6 @@
   static propTpyes = {
     dict: PropTypes.object,     // 瀛楀吀椤�
     formlist: PropTypes.any,    // 琛ㄥ崟
-    optionLibs: PropTypes.any,  // 鑷畾涔変笅鎷夐泦
     card: PropTypes.object,     // 鎼滅储鏉′欢淇℃伅
     inputSubmit: PropTypes.any  // 鍥炶溅鎻愪氦浜嬩欢
   }
@@ -102,7 +101,7 @@
    * 2銆佷笅鎷夐�夋嫨锛屾牴鎹暟鎹簮绫诲瀷鏄剧ず鐩稿叧閰嶇疆
    */
   UNSAFE_componentWillMount () {
-    const { formlist, optionLibs, dict } = this.props
+    const { formlist, dict } = this.props
 
     let type = formlist.filter(cell => cell.key === 'type')[0].initVal
     let _items = formlist.filter(cell => cell.key === 'items')[0].initVal
@@ -110,7 +109,7 @@
     let _options = ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide']                // 榛樿鏄剧ず椤�
 
     if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '0') {        // 涓嬫媺閫夋嫨绫诲瀷銆侀�夐」涓鸿嚜瀹氫箟璧勬簮
-      _options = [..._options, 'resourceType', 'options', 'display', 'quick']
+      _options = [..._options, 'resourceType', 'options', 'display']
     } else if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '1') { // 涓嬫媺閫夋嫨绫诲瀷銆侀�夐」涓哄悗鍙版暟鎹簮涓幏鍙�
       _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'display', 'database']
     } else if (type === 'group') {
@@ -151,13 +150,6 @@
           } else if (type === 'dateweek' || type === 'daterange') {
             form.options = matchReg.daterange
           }
-        } else if (form.key === 'quick') {
-          form.options = [...optionLibs.values()].map(cell => {
-            return {
-              value: cell.uuid,
-              text: cell.label + '(' + cell.parname + ')'
-            }
-          })
         } else if (form.key === 'field' && type === 'text') {
           form.tooltip = this.state.textTooltip
         } else if (form.key === 'field' && type === 'group') {
@@ -193,7 +185,7 @@
       let _options = ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide']
 
       if ((value === 'multiselect' || value === 'select' || value === 'link') && resourceType === '0') {        // 涓嬫媺閫夋嫨绫诲瀷銆侀�夐」涓鸿嚜瀹氫箟璧勬簮
-        _options = [..._options, 'resourceType', 'options', 'display', 'quick']
+        _options = [..._options, 'resourceType', 'options', 'display']
       } else if ((value === 'multiselect' || value === 'select' || value === 'link') && resourceType === '1') { // 涓嬫媺閫夋嫨绫诲瀷銆侀�夐」涓哄悗鍙版暟鎹簮涓幏鍙�
         _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'display', 'database']
       } else if (value === 'group') {
@@ -260,18 +252,6 @@
           this.props.form.setFieldsValue({match: matchs[0].value})
         }
       })
-    } else if (key === 'quick') {
-      let _option = this.props.optionLibs.get(value)
-
-      this.setState({
-        formlist: this.state.formlist.map(form => {
-          if (form.key === 'options') {
-            form.initVal = _option.options
-          }
-
-          return form
-        })
-      })
     }
   }
 
@@ -286,7 +266,7 @@
       let _options = ['label', 'field', 'initval', 'type', 'match', 'resourceType', 'display', 'ratio', 'blacklist', 'required', 'Hide']
 
       if (value === '0') {
-        _options = [..._options, 'options', 'quick']
+        _options = [..._options, 'options']
       } else if (value === '1') {
         _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
       }

--
Gitblit v1.8.0