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(); }