fix(工作台): 修复工作台跳转bugs

This commit is contained in:
xinxin.wu 2024-12-12 18:44:33 +08:00 committed by Craftsman
parent 92200c4ed1
commit 0da20a700b
6 changed files with 12 additions and 33 deletions

View File

@ -848,7 +848,7 @@
};
const filterData = computed(() => {
return (attrs.filter || {}) as Record<string, any>;
return { ...(attrs.filter || {}) } as Record<string, any>;
});
const handleFilterConfirm = (

View File

@ -626,22 +626,16 @@
async function loadApiList(hasRefreshTree: boolean) {
const moduleIds = await getModuleIds();
let filterParams = {
...propsRes.value.filter,
};
if (route.query.home) {
filterParams = {
...propsRes.value.filter,
...NAV_NAVIGATION[route.query.home as WorkNavValueEnum],
};
propsRes.value.filter = { ...NAV_NAVIGATION[route.query.home as WorkNavValueEnum] };
}
const params = {
keyword: keyword.value,
projectId: appStore.currentProjectId,
moduleIds,
protocols: isAdvancedSearchMode.value ? protocolList.value.map((item) => item.protocol) : props.selectedProtocols,
filter: filterParams,
filter: propsRes.value.filter,
viewId: viewId.value,
combineSearch: advanceFilter,
};
@ -649,7 +643,7 @@
if (!hasRefreshTree && typeof refreshModuleTreeCount === 'function' && !isAdvancedSearchMode.value) {
refreshModuleTreeCount({
keyword: keyword.value,
filter: filterParams,
filter: propsRes.value.filter,
moduleIds: [],
protocols: props.selectedProtocols,
projectId: appStore.currentProjectId,

View File

@ -672,12 +672,8 @@
async function loadCaseList() {
const selectModules = await getModuleIds();
let filterParams = { ...propsRes.value.filter };
if (route.query.home) {
filterParams = {
...propsRes.value.filter,
...NAV_NAVIGATION[route.query.home as WorkNavValueEnum],
};
propsRes.value.filter = { ...NAV_NAVIGATION[route.query.home as WorkNavValueEnum] };
}
const params = {
@ -686,7 +682,7 @@
projectId: appStore.currentProjectId,
moduleIds: selectModules,
protocols: isAdvancedSearchMode.value ? protocolList.value.map((item) => item.protocol) : props.selectedProtocols,
filter: filterParams,
filter: propsRes.value.filter,
viewId: viewId.value,
combineSearch: advanceFilter,
};

View File

@ -977,10 +977,8 @@
async function loadScenarioList(refreshTreeCount?: boolean) {
const moduleIds = await getModuleIds();
let filterParams = { ...propsRes.value.filter };
if (route.query.home) {
filterParams = {
...propsRes.value.filter,
propsRes.value.filter = {
...NAV_NAVIGATION[route.query.home as WorkNavValueEnum],
};
}
@ -988,7 +986,7 @@
keyword: keyword.value,
projectId: appStore.currentProjectId,
moduleIds,
filter: filterParams,
filter: propsRes.value.filter,
};
setLoadListParams({ ...params, viewId: viewId.value, combineSearch: advanceFilter });
await loadList();

View File

@ -1028,13 +1028,8 @@
}
}
let filterParams = { ...propsRes.value.filter };
if (route.query.home) {
filterParams = {
...propsRes.value.filter,
...NAV_NAVIGATION[route.query.home as WorkNavValueEnum],
};
propsRes.value.filter = { ...NAV_NAVIGATION[route.query.home as WorkNavValueEnum] };
}
return {
@ -1044,7 +1039,7 @@
selectAll: batchParams.value.selectAll,
selectIds: batchParams.value.selectedIds || [],
keyword: keyword.value,
filter: filterParams,
filter: propsRes.value.filter,
};
}
//

View File

@ -900,15 +900,11 @@
moduleIds = [];
}
let filterParams = { ...propsRes.value.filter };
if (route.query.home) {
if (route.query.home === WorkNavValueEnum.TEST_PLAN_ARCHIVED) {
viewId.value = 'archived';
} else {
filterParams = {
...propsRes.value.filter,
...NAV_NAVIGATION[route.query.home as WorkNavValueEnum],
};
propsRes.value.filter = { ...NAV_NAVIGATION[route.query.home as WorkNavValueEnum] };
}
}
@ -920,7 +916,7 @@
selectAll: !!batchParams.value?.selectAll,
selectIds: batchParams.value.selectedIds || [],
keyword: keyword.value,
filter: filterParams,
filter: propsRes.value.filter,
};
}