fix(任务中心): 修复跳转后,所属项目显示错误的缺陷

--bug=1042913 --user=王孝刚 【系统设置】系统/组织-任务中心-资源ID/名称跳转-非当前项目的资源也在当前项目下显示的
https://www.tapd.cn/55049933/s/1534413
This commit is contained in:
wxg0103 2024-06-24 10:39:05 +08:00 committed by 刘瑞斌
parent 4cbd273f13
commit f8a96b1004
1 changed files with 6 additions and 3 deletions

View File

@ -17,11 +17,14 @@ export default function useOpenNewPage() {
// 如果传入参数指定了项目 id则使用传入的项目 id
delete query.pId;
}
const orgId = query.orgId || appStore.currentOrgId;
if (orgId) {
// 如果传入参数指定了组织 id则使用传入的组织 id
delete query.orgId;
}
const queryParams = new URLSearchParams(query).toString();
window.open(
`${window.location.origin}#${router.resolve({ name }).fullPath}?orgId=${
appStore.currentOrgId
}&pId=${pId}&${queryParams}`,
`${window.location.origin}#${router.resolve({ name }).fullPath}?orgId=${orgId}&pId=${pId}&${queryParams}`,
'_blank'
);
}