From ba9c4afc76cef8552b8fcaf79a47ca2f3f9cf3bd Mon Sep 17 00:00:00 2001 From: baiqi Date: Fri, 25 Oct 2024 16:23:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=93=8D=E5=BA=94=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/api-test/components/requestComposition/index.vue | 2 +- .../api-test/scenario/components/common/customApiDrawer.vue | 3 ++- .../views/api-test/scenario/components/step/useStepExecute.ts | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/api-test/components/requestComposition/index.vue b/frontend/src/views/api-test/components/requestComposition/index.vue index 154a8ff364..c838437a50 100644 --- a/frontend/src/views/api-test/components/requestComposition/index.vue +++ b/frontend/src/views/api-test/components/requestComposition/index.vue @@ -949,7 +949,7 @@ () => isHttpProtocol.value || !props.isDefinition || - requestVModel.value.response?.requestResults[0]?.responseResult.responseCode || + requestVModel.value.response?.requestResults[0]?.responseResult || props.isCase ); const activeLayout = ref<'horizontal' | 'vertical'>('vertical'); diff --git a/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue b/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue index 83e7a3b9fd..1a38995a71 100644 --- a/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue +++ b/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue @@ -944,7 +944,7 @@ } const showResponse = computed( - () => isHttpProtocol.value || requestVModel.value.response?.requestResults[0]?.responseResult.responseCode + () => isHttpProtocol.value || requestVModel.value.response?.requestResults[0]?.responseResult ); const activeLayout = ref<'horizontal' | 'vertical'>('vertical'); const isVerticalExpanded = computed(() => activeLayout.value === 'vertical'); @@ -1064,6 +1064,7 @@ if (valid === true) { emit('execute', makeRequestParams(executeType) as RequestParam, executeType); } else { + requestVModel.value.executeLoading = false; requestVModel.value.activeTab = RequestComposition.PLUGIN; nextTick(() => { scrollIntoView(document.querySelector('.arco-form-item-message'), { block: 'center' }); diff --git a/frontend/src/views/api-test/scenario/components/step/useStepExecute.ts b/frontend/src/views/api-test/scenario/components/step/useStepExecute.ts index 0a83e1f83f..966335f105 100644 --- a/frontend/src/views/api-test/scenario/components/step/useStepExecute.ts +++ b/frontend/src/views/api-test/scenario/components/step/useStepExecute.ts @@ -70,6 +70,9 @@ export default function useStepExecute({ websocketMap[reportId]?.close(); if (step.reportId === data.reportId) { step.isExecuting = false; + if (_scenario.stepResponses[step.uniqueId] === undefined) { + _scenario.stepResponses[step.uniqueId] = []; + } updateStepStatus([step], _scenario.stepResponses, step.uniqueId); } }