From a878688929e553d8cad82e86632ad6294572aafe Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 17 Jan 2022 16:24:13 +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=E6=8F=92=E4=BB=B6=E8=B0=83=E8=AF=95=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=BB=93=E6=9E=9C=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/automation/report/SysnApiReportDetail.vue | 3 ++- .../components/api/automation/scenario/EditApiScenario.vue | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue b/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue index fe12998399..391a2eeb7f 100644 --- a/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue +++ b/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue @@ -162,8 +162,9 @@ export default { if (item.enable) { item.parentIndex = fullPath ? fullPath + "_" + item.index : item.index; let name = item.name ? item.name : this.getType(item.type); + let id = item.type === 'JSR223Processor' || !item.id ? item.resourceId : item.id let obj = { - pid: pid, resId: (item.type === 'JSR223Processor' ? item.resourceId : item.id) + "_" + item.parentIndex, index: Number(item.index), label: name, + pid: pid, resId: id + "_" + item.parentIndex, index: Number(item.index), label: name, value: {name: name, responseResult: {}, unexecute: true, testing: false}, children: [], unsolicited: true }; tree.children.push(obj); diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index e156de477a..6a0477246a 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -841,7 +841,8 @@ export default { if (e.data && e.data.startsWith("result_")) { let data = JSON.parse(e.data.substring(7)); this.reqTotal += 1; - this.reqTotalTime += (data.endTime - data.startTime); + let time = data.endTime - data.startTime; + this.reqTotalTime += time > 0 ? time : 0; if (data.error === 0) { this.reqSuccess += 1; } else {