fix(接口测试): 场景&用例表格通过率统计

This commit is contained in:
baiqi 2024-11-08 10:01:54 +08:00 committed by Craftsman
parent 3011af0be5
commit 298208d0ef
2 changed files with 15 additions and 3 deletions

View File

@ -652,6 +652,13 @@
}
}
watch(
() => propsRes.value.data,
() => {
initStatistics();
}
);
async function loadCaseList() {
const selectModules = await getModuleIds();
const params = {
@ -666,7 +673,6 @@
};
setLoadListParams(params);
await loadList();
initStatistics();
}
function loadCaseListAndResetSelector() {
resetSelector();

View File

@ -966,7 +966,7 @@
try {
const res = await getScenarioStatistics(propsRes.value.data.map((item) => item.id));
propsRes.value.data.forEach((e) => {
const item = res.find((i: any) => i.scenarioId === e.id);
const item = res.find((i: any) => i.id === e.id);
if (item) {
e.execPassRate = item.execPassRate;
}
@ -977,6 +977,13 @@
}
}
watch(
() => propsRes.value.data,
() => {
initStatistics();
}
);
async function loadScenarioList(refreshTreeCount?: boolean) {
const moduleIds = await getModuleIds();
const params = {
@ -986,7 +993,6 @@
};
setLoadListParams({ ...params, viewId: viewId.value, combineSearch: advanceFilter });
await loadList();
initStatistics();
if (refreshTreeCount && !isAdvancedSearchMode.value) {
emit('refreshModuleTree', params);
}