From 677948fe7e7dd2fe6f945f1ba81e8a2df89e0e97 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Fri, 2 Dec 2022 16:50:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=BA=E6=99=AF=E4=B8=AD=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=8D=E5=88=B6=E7=9A=84case=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E6=97=B6=EF=BC=8C=E5=89=8D=E5=90=8E=E7=BD=AE=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=EF=BC=8C=E6=96=AD=E8=A8=80=E4=B9=9F=E8=A2=AB=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1020598 --user=王孝刚 [接口测试] #20354批量勾选一个场景里面的多个case,做批量删除,会把剩余case的后置脚本和断言清空(特殊场景) https://www.tapd.cn/55049933/s/1311240 --- .../definition/components/list/ApiCaseSimpleList.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) 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,