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; - } + }, }, -} +};