From 4ad6256c7f45384b43c503d3cf36b0ec4f31c7e6 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 1 Nov 2021 09:39:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9C=BA=E6=99=AF=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96)=20=E5=9C=BA=E6=99=AF=E6=AD=A5=E9=AA=A4=E6=B7=B1?= =?UTF-8?q?=E5=BA=A6=E5=A4=8D=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../automation/scenario/maximize/MaximizeScenario.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frontend/src/business/components/api/automation/scenario/maximize/MaximizeScenario.vue b/frontend/src/business/components/api/automation/scenario/maximize/MaximizeScenario.vue index 187e6504a9..8c6fe042b3 100644 --- a/frontend/src/business/components/api/automation/scenario/maximize/MaximizeScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/maximize/MaximizeScenario.vue @@ -542,6 +542,9 @@ export default { const hashTree = parent.data.hashTree || parent.data; // 深度复制 let obj = JSON.parse(JSON.stringify(row)); + if (obj.hashTree && obj.hashTree.length > 0) { + this.resetResourceId(obj.hashTree); + } obj.resourceId = getUUID(); if (obj.name) { obj.name = obj.name + '_copy'; @@ -555,6 +558,14 @@ export default { this.sort(); this.reload(); }, + resetResourceId(hashTree) { + hashTree.forEach(item => { + item.resourceId = getUUID(); + if (item.hashTree && item.hashTree.length > 0) { + this.resetResourceId(item.hashTree); + } + }) + }, showHide() { this.showHideTree = false this.$nextTick(() => {