fix(工作台): 修复工作台跳转bugs
This commit is contained in:
parent
92200c4ed1
commit
0da20a700b
|
@ -848,7 +848,7 @@
|
|||
};
|
||||
|
||||
const filterData = computed(() => {
|
||||
return (attrs.filter || {}) as Record<string, any>;
|
||||
return { ...(attrs.filter || {}) } as Record<string, any>;
|
||||
});
|
||||
|
||||
const handleFilterConfirm = (
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
// 获取父组件模块数量
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue