From 137fb8ea6af2789b3238b22bac31d80bced41dfe Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 28 七月 2021 11:39:39 +0800
Subject: [PATCH] 2021-07-28

---
 src/menu/pastecontroller/index.jsx |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx
index 9df7a55..7b3153c 100644
--- a/src/menu/pastecontroller/index.jsx
+++ b/src/menu/pastecontroller/index.jsx
@@ -60,8 +60,13 @@
         cell = this.resetconfig(cell, item, true, copyBtns)
         return cell
       })
+    } else if (item.type === 'menubar') {
+      item.subMenus = item.subMenus.map(cell => {
+        cell.uuid = Utils.getuuid()
+        return cell
+      })
     } else if (item.type === 'card' || (item.type === 'table' && item.subtype === 'tablecard')) {
-      item.subcards.forEach(card => {
+      item.subcards && item.subcards.forEach(card => {
         card.uuid = Utils.getuuid()
         if (card.elements) {
           if (sessionStorage.getItem('editMenuType') === 'popview') {
@@ -149,12 +154,16 @@
       item.btnlog = []
     }
 
+    let oriUids = {}
     if (item.action) {
       if (sessionStorage.getItem('editMenuType') === 'popview') {
         item.action = item.action.filter(c => c.OpenType !== 'popview' && c.OpenType !== 'funcbutton')
       }
       item.action = item.action.map(cell => {
         let _uuid = Utils.getuuid()
+
+        oriUids[cell.uuid] = _uuid
+
         if (cell.OpenType === 'popview') {
           let _cell = fromJS(cell).toJS()
           _cell.$originUuid = _cell.uuid
@@ -177,6 +186,13 @@
         return cell
       })
     }
+    if (item.setting && item.setting.supModule) {
+      item.setting.supModule = ''
+    }
+    
+    if (item.wrap && item.wrap.doubleClick) {
+      item.wrap.doubleClick = oriUids[item.wrap.doubleClick] || ''
+    }
 
     return item
   }
@@ -185,16 +201,20 @@
     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']
 
+    if (sessionStorage.getItem('appType') === 'mob') {
+      options.push('menubar')
+    }
     this.pasteFormRef.handleConfirm().then(res => {
-      if (!isgroup && !['tabs', 'datacard', 'propcard', 'mainsearch', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie'].includes(res.copyType)) {
+      if (!isgroup && !options.includes(res.copyType)) {
         notification.warning({
           top: 92,
           message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�',
           duration: 5
         })
         return
-      } else if (isgroup && !['datacard', 'propcard', 'normaltable', 'tablecard', 'line', 'bar', 'pie'].includes(res.copyType)) {
+      } else if (isgroup && !['datacard', 'propcard', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter'].includes(res.copyType)) {
         notification.warning({
           top: 92,
           message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�',

--
Gitblit v1.8.0