From e486b518efb028512228ff580013d43d077eef57 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Tue, 14 Mar 2023 20:38:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=AF=BC?= =?UTF-8?q?=E5=87=BAhtml=E6=97=B6=E5=9C=BA=E6=99=AF=E6=AD=A5=E9=AA=A4?= =?UTF-8?q?=E7=94=B1=E6=88=90=E5=8A=9F=E5=8F=98=E6=88=90=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1024448 --user=宋天阳 github #22067 测试计划 的执行报告, 在线看单步结果是成功的,但是导出就变成了失败 https://www.tapd.cn/55049933/s/1350130 --- .../report/detail/ui/RequestResult.vue | 284 +++++++++++++----- 1 file changed, 201 insertions(+), 83 deletions(-) diff --git a/test-track/frontend/src/business/plan/view/comonents/report/detail/ui/RequestResult.vue b/test-track/frontend/src/business/plan/view/comonents/report/detail/ui/RequestResult.vue index 04839b2c07..f0ab939e71 100644 --- a/test-track/frontend/src/business/plan/view/comonents/report/detail/ui/RequestResult.vue +++ b/test-track/frontend/src/business/plan/view/comonents/report/detail/ui/RequestResult.vue @@ -3,14 +3,27 @@
- +
-
{{ indexNumber }}
+
{{ indexNumber }}
- - + + {{ request.name }} {{ getName(request.name) }} @@ -19,28 +32,52 @@
- -
+ +
{{ baseErrorCode }}
-
+
{{ baseErrorCode }}
-
+
{{ baseErrorCode }}
- -
+ +
{{ baseErrorCode }}
-
+
{{ baseErrorCode }}
@@ -48,31 +85,58 @@
- -
+ +
{{ request.responseResult.responseCode }}
-
+
{{ request.responseResult.responseCode }}
-
+
{{ request.responseResult.responseCode }}
- -
+ +
{{ request.responseResult.responseCode }}
{{ request.responseResult.responseCode }}
-
+
{{ request.responseResult.responseCode }}
@@ -80,13 +144,19 @@
-
+
{{ request.responseResult.responseTime }}
-
+
{{ request.responseResult.responseTime }}
-
+
{{ request.responseResult.responseTime }}
@@ -94,45 +164,77 @@ {{ request.responseResult.responseTime }} ms - + {{ request.responseResult.responseTime }} ms
- {{ - $t('api_test.home_page.detail_card.unexecute') - }} + {{ $t("api_test.home_page.detail_card.unexecute") }} - - {{ $t('error_report_library.option.name') }} + + {{ $t("error_report_library.option.name") }} - - {{ $t('api_report.success') }} + + {{ $t("api_report.success") }} - {{ $t('api_report.fail') }} + + {{ $t("api_report.fail") }}
- - - {{ $t('commons.testing') }} + + + {{ $t("commons.testing") }} - {{ - $t('api_test.home_page.detail_card.unexecute') - }} + {{ $t("api_test.home_page.detail_card.unexecute") }} - {{ - $t('api_test.home_page.detail_card.unexecute') - }} + {{ $t("api_test.home_page.detail_card.unexecute") }} - - {{ $t('error_report_library.option.name') }} + + {{ $t("error_report_library.option.name") }} - {{ $t('api_report.success') }} - {{ $t('api_report.fail') }} + + {{ $t("api_report.success") }} + + {{ $t("api_report.fail") }}
@@ -146,7 +248,8 @@ :request-type="requestType" :request="requestInfo" :console="console" - v-if="showActive"/> + v-if="showActive" + />
@@ -159,7 +262,7 @@ import MsRequestResultTail from "./RequestResultTail"; export default { name: "MsRequestResult", components: { - MsRequestResultTail + MsRequestResultTail, }, props: { request: Object, @@ -172,11 +275,11 @@ export default { redirect: Boolean, errorCode: { type: String, - default: "" + default: "", }, isActive: { type: Boolean, - default: false + default: false, }, isShare: Boolean, shareId: String, @@ -192,7 +295,7 @@ export default { type: String, default() { return "#B8741A"; - } + }, }, requestInfo: { loading: true, @@ -205,10 +308,10 @@ export default { type: String, default() { return "#F9F1EA"; - } + }, }, showActive: false, - } + }; }, watch: { isActive() { @@ -223,23 +326,28 @@ export default { handler(n) { if (this.request.errorCode) { this.baseErrorCode = this.request.errorCode; - } else if (this.request.attachInfoMap && this.request.attachInfoMap.errorReportResult) { + } else if ( + this.request.attachInfoMap && + this.request.attachInfoMap.errorReportResult + ) { if (this.request.attachInfoMap.errorReportResult !== "") { this.baseErrorCode = this.request.attachInfoMap.errorReportResult; } } }, - } + }, }, methods: { isLink() { let uri = "/#/api/definition?caseId=" + this.resourceId; - this.clickResource(uri) + this.clickResource(uri); }, clickResource(uri) { - this.$get('/user/update/currentByResourceId/' + this.resourceId).then(() => { - this.toPage(uri); - }); + this.$get("/user/update/currentByResourceId/" + this.resourceId).then( + () => { + this.toPage(uri); + } + ); }, toPage(uri) { let id = "new_a"; @@ -254,23 +362,33 @@ export default { element.parentNode.removeChild(element); }, loadRequestInfoExpand() { - if (!this.request.responseResult || this.request.responseResult.body === null || this.request.responseResult.body === undefined) { + if ( + !this.request.responseResult || + this.request.responseResult.body === null || + this.request.responseResult.body === undefined + ) { if (this.isShare) { - this.$get("/share/" + this.shareId + "/scenario/report/selectReportContent/" + this.stepId).then(response => { + this.$get( + "/share/" + + this.shareId + + "/scenario/report/selectReportContent/" + + this.stepId + ).then((response) => { this.requestInfo = response.data; this.$nextTick(() => { this.requestInfo.loading = false; }); }); } else { - this.$get("/ui/scenario/report/selectReportContent/" + this.stepId).then(response => { + this.$get( + "/ui/scenario/report/selectReportContent/" + this.stepId + ).then((response) => { this.requestInfo = response.data; this.$nextTick(() => { this.requestInfo.loading = false; }); }); } - } else { this.requestInfo = this.request; } @@ -307,9 +425,9 @@ export default { return ""; } return name; - } + }, }, -} +};