From 7613166535bc99f9e9c7cc605a2fea26db408bb8 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 15 Jun 2022 16:34:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E9=A6=96=E9=A1=B5=E4=B8=8D=E5=90=8C=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E7=9A=84=E7=94=A8=E4=BE=8B=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --user=郭雨琦 --bug=1014073 【接口测试】首页-过去7天测试计划失败用例TOP10,非HTTP的接口也会跳到HTTP页面 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001014073 --- .../components/ApiFailureTestCaseList.vue | 39 +++++++++++-------- .../components/track/common/NodeTree.vue | 2 +- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/frontend/src/business/components/api/homepage/components/ApiFailureTestCaseList.vue b/frontend/src/business/components/api/homepage/components/ApiFailureTestCaseList.vue index eb490ab8ec..4b01d19df8 100644 --- a/frontend/src/business/components/api/homepage/components/ApiFailureTestCaseList.vue +++ b/frontend/src/business/components/api/homepage/components/ApiFailureTestCaseList.vue @@ -80,26 +80,33 @@ export default { this.$emit('redirectPage', 'testPlanEdit', null, param); break; case "apiCase": - this.$get('/api/definition/get/' + param.id, (response) => { - let api = response.data; - if (!api) { + this.$get('/api/testcase/findById/' + param.id, (response) => { + let apiCase = response.data; + if (!apiCase) { this.$message.error(this.$t('commons.api_case') + this.$t('commons.not_exist')) } else { - if (param.protocol === 'dubbo://') { - param.protocol = 'DUBBO' - } - definitionData = this.$router.resolve({ - name: 'ApiDefinition', - params: { - redirectID: getUUID(), - dataType: "api", - dataSelectRange: 'edit:' + param.id, - projectId: getCurrentProjectID(), - type: api.protocol, - workspaceId: getCurrentWorkspaceId(), + this.$get('/api/definition/get/' + apiCase.apiDefinitionId, (response) => { + let api = response.data; + if (api) { + this.$message.error(this.$t('api_test.home_page.api_details_card.title') + this.$t('commons.not_exist')) + } else { + if (param.protocol === 'dubbo://') { + param.protocol = 'DUBBO' + } + definitionData = this.$router.resolve({ + name: 'ApiDefinition', + params: { + redirectID: getUUID(), + dataType: "api", + dataSelectRange: 'edit:' + param.id, + projectId: getCurrentProjectID(), + type: api.protocol, + workspaceId: getCurrentWorkspaceId(), + } + }); + window.open(definitionData.href, '_blank'); } }); - window.open(definitionData.href, '_blank'); } }); break; diff --git a/frontend/src/business/components/track/common/NodeTree.vue b/frontend/src/business/components/track/common/NodeTree.vue index 06135f561c..34989794dc 100644 --- a/frontend/src/business/components/track/common/NodeTree.vue +++ b/frontend/src/business/components/track/common/NodeTree.vue @@ -30,7 +30,7 @@ - +