From 049164c743a433b9ace47bb8778f484cee22b70d Mon Sep 17 00:00:00 2001 From: teukkk Date: Tue, 2 Apr 2024 17:41:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E8=AF=A6=E6=83=85=E7=9A=84=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E5=B1=95=E7=A4=BA=E7=8A=B6=E6=80=81=E7=A0=81?= =?UTF-8?q?=E3=80=81=E5=93=8D=E5=BA=94=E6=97=B6=E9=97=B4=E3=80=81=E5=93=8D?= =?UTF-8?q?=E5=BA=94=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1038129 --user=吕梦园【接口测试】定义-用例列表-操作点击执行-响应结果未展示状态码、响应时间、响应大小 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001038129 --- .../requestComposition/response/index.vue | 114 +----------------- .../response/responseCodeTimeSize.vue | 110 +++++++++++++++++ .../management/api/preview/detail.vue | 18 +-- 3 files changed, 123 insertions(+), 119 deletions(-) create mode 100644 frontend/src/views/api-test/components/requestComposition/response/responseCodeTimeSize.vue diff --git a/frontend/src/views/api-test/components/requestComposition/response/index.vue b/frontend/src/views/api-test/components/requestComposition/response/index.vue index 710871e46c..8d20760f3b 100644 --- a/frontend/src/views/api-test/components/requestComposition/response/index.vue +++ b/frontend/src/views/api-test/components/requestComposition/response/index.vue @@ -58,65 +58,7 @@ -
- -
- {{ props.requestResult.responseResult.responseCode }} -
- -
- -
{{ timingInfo?.responseTime }} ms
- -
- -
- {{ props.requestResult.responseResult.responseSize }} bytes -
- -
- -
+ ('responseDefinition', { default: [], }); - // 响应时间信息 - const timingInfo = computed(() => { - if (props.requestResult) { - const { - dnsLookupTime, - downloadTime, - latency, - responseTime, - socketInitTime, - sslHandshakeTime, - tcpHandshakeTime, - transferStartTime, - } = props.requestResult.responseResult; - return { - dnsLookupTime, - tcpHandshakeTime, - sslHandshakeTime, - socketInitTime, - latency, - downloadTime, - transferStartTime, - responseTime, - }; - } - return null; - }); - // 响应状态码对应颜色 - const statusCodeColor = computed(() => { - if (props.requestResult) { - const code = props.requestResult.responseResult.responseCode; - if (code >= 200 && code < 300) { - return 'rgb(var(--success-7)'; - } - if (code >= 300 && code < 400) { - return 'rgb(var(--warning-7)'; - } - return 'rgb(var(--danger-7)'; - } - return ''; - }); watchEffect(() => { // 过滤无效数据后的有效响应数据;当接口导入时会存在部分字段为 null 的数据,需要设置默认值 let hasInvalid = false; @@ -312,18 +214,6 @@ ); - - diff --git a/frontend/src/views/api-test/management/components/management/api/preview/detail.vue b/frontend/src/views/api-test/management/components/management/api/preview/detail.vue index cf0fc15597..d5f95ca541 100644 --- a/frontend/src/views/api-test/management/components/management/api/preview/detail.vue +++ b/frontend/src/views/api-test/management/components/management/api/preview/detail.vue @@ -244,14 +244,17 @@ key="response" >