diff --git a/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue b/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue index 7ab73a1c6b..6550abbf96 100644 --- a/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue +++ b/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue @@ -230,7 +230,7 @@ try { loading.value = true; const res = await createOrUpdateProject({ id: isEdit.value ? props.currentProject?.id : '', ...form }); - showUpdateOrCreateMessage(isEdit.value, res.id); + showUpdateOrCreateMessage(isEdit.value, res.id, res.organizationId); appStore.initProjectList(); handleCancel(true); } catch (error) { diff --git a/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue b/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue index 450a79a4ce..17549006d3 100644 --- a/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue +++ b/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue @@ -165,6 +165,7 @@ { title: 'system.organization.subordinateOrg', dataIndex: 'organizationName', + showTooltip: true, width: 200, }, { diff --git a/frontend/src/views/setting/utils.ts b/frontend/src/views/setting/utils.ts index 3ef0750e1d..70cb066502 100644 --- a/frontend/src/views/setting/utils.ts +++ b/frontend/src/views/setting/utils.ts @@ -24,12 +24,13 @@ export async function enterProject(projectId: string, organizationId?: string) { if (organizationId) { await switchUserOrg(organizationId, userStore.id || ''); } + await userStore.isLogin(true); // 切换项目 await switchProject({ projectId, userId: userStore.id || '', }); - await userStore.isLogin(true); + appStore.setCurrentProjectId(projectId); if (!appStore.currentProjectId || appStore.currentProjectId === 'no_such_project') { // 没有项目权限(组织没有项目, 或项目全被禁用),则重定向到无项目权限页面 router.push({ @@ -53,7 +54,7 @@ export async function enterProject(projectId: string, organizationId?: string) { } } -export function showUpdateOrCreateMessage(isEdit: boolean, id: string) { +export function showUpdateOrCreateMessage(isEdit: boolean, id: string, organizationId?: string) { if (isEdit) { Message.success(t('system.project.updateProjectSuccess')); } else if (!hasAnyPermission(['PROJECT_BASE_INFO:READ'])) { @@ -68,7 +69,7 @@ export function showUpdateOrCreateMessage(isEdit: boolean, id: string) { { type: 'text', onClick() { - enterProject(id); + enterProject(id, organizationId); }, }, { default: () => t('system.project.enterProject') }