From c986f2f56bb153a9b6cebc74b4d9334c85ddfdda Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 04 一月 2021 18:54:02 +0800 Subject: [PATCH] 2020-01-04 --- src/menu/pastecontroller/index.jsx | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx index 1578179..f7dc92b 100644 --- a/src/menu/pastecontroller/index.jsx +++ b/src/menu/pastecontroller/index.jsx @@ -23,12 +23,15 @@ 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 } @@ -134,8 +137,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 +164,7 @@ return } - res = this.resetconfig(res, Tab) + res = this.resetconfig(res, Tab, isgroup) delete res.copyType -- Gitblit v1.8.0