From 0ce40c4564ecff2cfbf1271e3270053678186a2b Mon Sep 17 00:00:00 2001 From: teukkk Date: Sun, 29 Sep 2024 11:02:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E7=94=A8=E4=BE=8B=E6=88=96api=E5=88=B7?= =?UTF-8?q?=E6=96=B0tab=E9=87=8C=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1047212 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001047212 --- .../components/management/api/preview/history.vue | 7 +++++++ .../components/management/api/preview/quote.vue | 7 +++++++ .../management/components/management/case/caseDetail.vue | 8 ++++++++ .../management/case/tabContent/tabCaseChangeHistory.vue | 7 +++++++ .../management/case/tabContent/tabCaseDependency.vue | 7 +++++++ .../management/case/tabContent/tabCaseExecuteHistory.vue | 4 ++-- 6 files changed, 38 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/api-test/management/components/management/api/preview/history.vue b/frontend/src/views/api-test/management/components/management/api/preview/history.vue index c9df281459..e34ff9ef7e 100644 --- a/frontend/src/views/api-test/management/components/management/api/preview/history.vue +++ b/frontend/src/views/api-test/management/components/management/api/preview/history.vue @@ -96,6 +96,13 @@ loadList(); } + watch( + () => props.sourceId, + () => { + loadHistory(); + } + ); + onBeforeMount(() => { loadHistory(); }); diff --git a/frontend/src/views/api-test/management/components/management/api/preview/quote.vue b/frontend/src/views/api-test/management/components/management/api/preview/quote.vue index 5424c85a6a..8e6953c09a 100644 --- a/frontend/src/views/api-test/management/components/management/api/preview/quote.vue +++ b/frontend/src/views/api-test/management/components/management/api/preview/quote.vue @@ -119,6 +119,13 @@ }); } + watch( + () => props.sourceId, + () => { + loadQuoteList(); + } + ); + onBeforeMount(() => { loadQuoteList(); }); diff --git a/frontend/src/views/api-test/management/components/management/case/caseDetail.vue b/frontend/src/views/api-test/management/components/management/case/caseDetail.vue index ddc4a96f97..381c8c324c 100644 --- a/frontend/src/views/api-test/management/components/management/case/caseDetail.vue +++ b/frontend/src/views/api-test/management/components/management/case/caseDetail.vue @@ -260,6 +260,14 @@ executeHistoryRef.value?.loadExecuteList(); } } + watch( + () => caseDetail.value.id, + () => { + if (activeKey.value === 'executeHistory') { + executeHistoryRef.value?.loadExecuteList(caseDetail.value.id as string); + } + } + ); const executeRef = ref>(); const isPriorityLocalExec = computed(() => executeRef.value?.isPriorityLocalExec ?? false); diff --git a/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseChangeHistory.vue b/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseChangeHistory.vue index 22e16795fb..72e8d2dad6 100644 --- a/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseChangeHistory.vue +++ b/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseChangeHistory.vue @@ -118,6 +118,13 @@ loadHistory(value as string[]); } + watch( + () => props.sourceId, + () => { + loadHistory(); + } + ); + onBeforeMount(() => { if (hasAnyPermission(['PROJECT_API_DEFINITION_CASE:READ', 'PROJECT_API_DEFINITION_CASE:READ+UPDATE'])) { loadHistory(); diff --git a/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseDependency.vue b/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseDependency.vue index d82487c3bc..7b3a58778b 100644 --- a/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseDependency.vue +++ b/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseDependency.vue @@ -123,6 +123,13 @@ }); } + watch( + () => props.sourceId, + () => { + loadQuoteList(); + } + ); + onBeforeMount(() => { loadQuoteList(); }); diff --git a/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseExecuteHistory.vue b/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseExecuteHistory.vue index 15fcfeae06..0347af8fa9 100644 --- a/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseExecuteHistory.vue +++ b/frontend/src/views/api-test/management/components/management/case/tabContent/tabCaseExecuteHistory.vue @@ -222,11 +222,11 @@ }) ); - function loadExecuteList() { + function loadExecuteList(sourceId?: string) { setLoadListParams({ projectId: appStore.currentProjectId, keyword: keyword.value, - id: props.sourceId, + id: sourceId ?? props.sourceId, }); loadList(); }