From 9e39c53e5cec0f5a98a2d805aeda7c2d87060633 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 29 七月 2021 15:18:12 +0800
Subject: [PATCH] 2021-07-29

---
 src/menu/pastecontroller/index.jsx |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx
index 7b3153c..796dc1c 100644
--- a/src/menu/pastecontroller/index.jsx
+++ b/src/menu/pastecontroller/index.jsx
@@ -65,6 +65,11 @@
         cell.uuid = Utils.getuuid()
         return cell
       })
+    } else if (item.type === 'balcony') {
+      item.elements = item.elements.map(cell => {
+        cell.uuid = Utils.getuuid()
+        return cell
+      })
     } else if (item.type === 'card' || (item.type === 'table' && item.subtype === 'tablecard')) {
       item.subcards && item.subcards.forEach(card => {
         card.uuid = Utils.getuuid()
@@ -201,20 +206,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