diff --git a/api-test/frontend/src/business/definition/components/list/ApiCaseSimpleList.vue b/api-test/frontend/src/business/definition/components/list/ApiCaseSimpleList.vue index 2599bb2515..6dd9290ccf 100644 --- a/api-test/frontend/src/business/definition/components/list/ApiCaseSimpleList.vue +++ b/api-test/frontend/src/business/definition/components/list/ApiCaseSimpleList.vue @@ -996,6 +996,14 @@ export default { } }); }, + resetResourceId(hashTree) { + hashTree.forEach((item) => { + item.resourceId = getUUID(); + if (item.hashTree && item.hashTree.length > 0) { + this.resetResourceId(item.hashTree); + } + }); + }, getCaseAndOpen(id, apiName, apiId) { getCaseById(id).then((response) => { let data = response.data; @@ -1007,6 +1015,9 @@ export default { } else if (apiCaseRequest.type === 'JDBCSampler') { apiCaseRequest.method = 'SQL'; } + if (apiCaseRequest.hashTree && apiCaseRequest.hashTree.length > 0) { + this.resetResourceId(apiCaseRequest.hashTree); + } apiCaseRequest.name = apiName; let obj = { name: 'copy_' + data.name,