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(() => {