From 7206e6caf674b51aab5239141bda586733ae9da6 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 26 Jun 2023 11:41:26 +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=8Dcase=E6=89=A7=E8=A1=8C=E5=90=8E=E7=AB=8B?= =?UTF-8?q?=E5=8D=B3=E6=9F=A5=E7=9C=8B=E6=89=A7=E8=A1=8C=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=EF=BC=8C=E7=BB=93=E6=9E=9C=E8=BF=98=E6=98=AF=E4=B8=8A=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E6=89=A7=E8=A1=8C=E7=BB=93=E6=9E=9C=E7=9A=84=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1027128 --user=王孝刚 【接口测试】接口case-列表执行接口case-第一次成功,第二次失败,立即查看执行结果是第一次的成功信息 https://www.tapd.cn/55049933/s/1386046 --- .../src/business/definition/components/case/EditApiCase.vue | 3 ++- .../definition/components/list/ApiCaseSimpleList.vue | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api-test/frontend/src/business/definition/components/case/EditApiCase.vue b/api-test/frontend/src/business/definition/components/case/EditApiCase.vue index a7f2b307f4..3d84ba61ae 100644 --- a/api-test/frontend/src/business/definition/components/case/EditApiCase.vue +++ b/api-test/frontend/src/business/definition/components/case/EditApiCase.vue @@ -442,11 +442,12 @@ export default { this.apiCaseList[0].execResult = status; this.apiCaseList[0].responseData = data; this.apiCaseList[0].passRate = passRate; + this.apiCaseList[0].reportId = data.threadName; this.$refs.apiCaseItem.runLoading = false; if (this.$refs.apiCaseItem && this.$refs.apiCaseItem[0]) { this.$refs.apiCaseItem[0].reload(); } - store.currentApiCase = { refresh: true, id: data.id, status: status, passRate: passRate }; + store.currentApiCase = { refresh: true, id: data.id, status: status, passRate: passRate, reportId: data.threadName }; }); } }, 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 8cff0f2637..b150161652 100644 --- a/api-test/frontend/src/business/definition/components/list/ApiCaseSimpleList.vue +++ b/api-test/frontend/src/business/definition/components/list/ApiCaseSimpleList.vue @@ -663,7 +663,7 @@ export default { }, storeCurrentApiCaseRefresh() { if (store.currentApiCase && store.currentApiCase.refresh) { - this.setStatus(store.currentApiCase.id, store.currentApiCase.status, store.currentApiCase.passRate); + this.setStatus(store.currentApiCase.id, store.currentApiCase.status, store.currentApiCase.passRate, store.currentApiCase.reportId); } store.currentApiCase = {}; }, @@ -743,12 +743,13 @@ export default { customHeader() { this.$refs.caseTable.openCustomHeader(); }, - setStatus(id, status, passRate) { + setStatus(id, status, passRate, reportId) { this.tableData.forEach((item) => { if (id && id === item.id) { item.status = status; item.execResult = status; item.passRate = passRate; + item.lastResultId = reportId; } }); },