From 2292d1826e69e21c8a411c217faef635fe57d458 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 07 一月 2021 10:48:49 +0800
Subject: [PATCH] Merge branch 'bms' of ssh://39.106.218.81:29418/~jinfei/pc-plat into bms

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

diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx
index 1578179..e39a687 100644
--- a/src/menu/pastecontroller/index.jsx
+++ b/src/menu/pastecontroller/index.jsx
@@ -23,13 +23,20 @@
     this.setState({visible: true})
   }
 
-  resetconfig = (item, Tab) => {
+  resetconfig = (item, Tab, isgroup) => {
     item.uuid = Utils.getuuid()
     item.floor = Tab ? (Tab.floor + 1) : 1
 
-    if (Tab) {
+    if (Tab && !isgroup) {
       item.tabId = Tab.uuid
       item.parentId = Tab.parentId
+    } else if (Tab) {
+      item.floor = Tab.floor || 1
+      item.parentId = Tab.parentId
+    }
+
+    if (item.dataName) {
+      item.dataName = Utils.getdataName()
     }
 
     if (item.type === 'tabs') {
@@ -134,8 +141,18 @@
 
   pasteSubmit = () => {
     const { Tab } = this.props
+
+    let isgroup = Tab && Tab.type === 'group' ? true : false
+
     this.pasteFormRef.handleConfirm().then(res => {
-      if (!['tabs', 'datacard', 'propcard', 'mainsearch', 'normaltable', 'tablecard', 'line', 'bar', 'pie'].includes(res.copyType)) {
+      if (!isgroup && !['tabs', 'datacard', 'propcard', 'mainsearch', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie'].includes(res.copyType)) {
+        notification.warning({
+          top: 92,
+          message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�',
+          duration: 5
+        })
+        return
+      } else if (isgroup && !['datacard', 'propcard', 'normaltable', 'tablecard', 'line', 'bar', 'pie'].includes(res.copyType)) {
         notification.warning({
           top: 92,
           message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�',
@@ -151,7 +168,7 @@
         return
       }
 
-      res = this.resetconfig(res, Tab)
+      res = this.resetconfig(res, Tab, isgroup)
 
       delete res.copyType
 

--
Gitblit v1.8.0