From e9c48bd7356462ba9257540b130a47a65ad1861d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 26 八月 2021 17:17:11 +0800
Subject: [PATCH] 2021-08-26

---
 src/menu/pastecontroller/index.jsx |   34 ++++++++++++++++++++++++----------
 1 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx
index 7b3153c..2a7aebe 100644
--- a/src/menu/pastecontroller/index.jsx
+++ b/src/menu/pastecontroller/index.jsx
@@ -51,7 +51,7 @@
         }
 
         tab.components = tab.components.map(cell => {
-          cell = this.resetconfig(cell, tab, copyBtns)
+          cell = this.resetconfig(cell, tab, false, copyBtns)
           return cell
         })
       })
@@ -62,6 +62,11 @@
       })
     } else if (item.type === 'menubar') {
       item.subMenus = item.subMenus.map(cell => {
+        cell.uuid = Utils.getuuid()
+        return cell
+      })
+    } else if (item.type === 'balcony') {
+      item.elements = item.elements.map(cell => {
         cell.uuid = Utils.getuuid()
         return cell
       })
@@ -148,6 +153,17 @@
         }
         return col
       })
+    } else if (item.type === 'form') {
+      item.subcards = item.subcards.map(cell => {
+        cell.uuid = Utils.getuuid()
+
+        cell.fields = cell.fields.map(m => {
+          m.uuid = Utils.getuuid()
+  
+          return m
+        })
+        return cell
+      })
     }
 
     if (item.btnlog) {
@@ -201,20 +217,18 @@
     const { Tab } = this.props
 
     let isgroup = Tab && Tab.type === 'group' ? true : false
-    let options = ['tabs', 'datacard', 'propcard', 'mainsearch', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter']
+    let options = ['tabs', 'datacard', 'propcard', 'mainsearch', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter']
 
     if (sessionStorage.getItem('appType') === 'mob') {
       options.push('menubar')
     }
+
+    if (isgroup) {
+      options = options.filter(item => !['tabs', 'mainsearch', 'group'].includes(item))
+    }
+
     this.pasteFormRef.handleConfirm().then(res => {
-      if (!isgroup && !options.includes(res.copyType)) {
-        notification.warning({
-          top: 92,
-          message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�',
-          duration: 5
-        })
-        return
-      } else if (isgroup && !['datacard', 'propcard', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter'].includes(res.copyType)) {
+      if (!options.includes(res.copyType)) {
         notification.warning({
           top: 92,
           message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�',

--
Gitblit v1.8.0