From 71d4765ba3cdc4a004687cd37a529b565e9ea9fd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 06 七月 2021 16:26:29 +0800
Subject: [PATCH] 2021-07-06

---
 src/templates/zshare/editcomponent/index.jsx |   30 ++----------------------------
 1 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/src/templates/zshare/editcomponent/index.jsx b/src/templates/zshare/editcomponent/index.jsx
index 9ed56dc..3501574 100644
--- a/src/templates/zshare/editcomponent/index.jsx
+++ b/src/templates/zshare/editcomponent/index.jsx
@@ -141,26 +141,10 @@
             config: _config
           })
         })
-      } else if (options.includes('search') && (res.copyType === 'search' || res.copyType === 'form')) {
+      } else if (options.includes('search') && res.copyType === 'search') {
         res.uuid = Utils.getuuid()
         _config.search = _config.search.filter(item => !item.origin)
         let keys = _config.search.map(item => item.field.toLowerCase())
-
-        // search锛� text select multiselect link date dateweek datemonth daterange group
-        // form锛� text number select multiselect link switch checkbox radio checkcard
-        //       fileupload date datemonth datetime textarea hint color funcvar
-        if (res.copyType === 'form') {
-          if (['number', 'switch', 'textarea', 'fileupload', 'hint', 'color', 'funcvar'].includes(res.type)) {
-            res.type = 'text'
-          } else if (res.type === 'radio') {
-            res.type = 'select'
-          } else if (res.type === 'checkbox') {
-            res.type = 'multiselect'
-          } else if (res.type === 'datetime') {
-            res.type = 'date'
-          }
-        }
-        res.copyType = 'search'
 
         _config.search.push(res)
 
@@ -206,20 +190,10 @@
             config: _config
           })
         })
-      } else if (options.includes('form') && (res.copyType === 'form' || res.copyType === 'search')) {
+      } else if (options.includes('form') && res.copyType === 'form') {
         let fields = []
         let labels = []
         res.uuid = Utils.getuuid()
-
-        // search锛� text select multiselect link date dateweek datemonth daterange group
-        // form锛� text number select multiselect link switch checkbox radio checkcard
-        //       fileupload date datemonth datetime textarea hint color funcvar
-        if (res.copyType === 'search') {
-          if (res.type === 'dateweek' || res.type === 'daterange' || res.type === 'group') {
-            res.type = 'date'
-          }
-        }
-        res.copyType = 'form'
 
         _config.fields.forEach(item => {
           item.field && fields.push(item.field.toLowerCase())

--
Gitblit v1.8.0