fix(接口测试): 切换用例或api刷新tab里数据

--bug=1047212 --user=吕梦园
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001047212
This commit is contained in:
teukkk 2024-09-29 11:02:18 +08:00 committed by Craftsman
parent 26c75fe483
commit 0ce40c4564
6 changed files with 38 additions and 2 deletions

View File

@ -96,6 +96,13 @@
loadList();
}
watch(
() => props.sourceId,
() => {
loadHistory();
}
);
onBeforeMount(() => {
loadHistory();
});

View File

@ -119,6 +119,13 @@
});
}
watch(
() => props.sourceId,
() => {
loadQuoteList();
}
);
onBeforeMount(() => {
loadQuoteList();
});

View File

@ -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<InstanceType<typeof executeButton>>();
const isPriorityLocalExec = computed(() => executeRef.value?.isPriorityLocalExec ?? false);

View File

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

View File

@ -123,6 +123,13 @@
});
}
watch(
() => props.sourceId,
() => {
loadQuoteList();
}
);
onBeforeMount(() => {
loadQuoteList();
});

View File

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