From 9fc4e18c30be29ad4afbec154e12147dd7df9345 Mon Sep 17 00:00:00 2001 From: teukkk Date: Thu, 23 May 2024 12:10:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=82=B9=E5=87=BB=E2=80=9C=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E2=80=9D=20=E8=BF=94=E5=9B=9E=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=97=A0=E6=9D=83=E9=99=90=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1041002 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001041002 --- .../organizationAndProject/components/addProjectModal.vue | 2 +- .../organizationAndProject/components/systemProject.vue | 1 + frontend/src/views/setting/utils.ts | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) 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') }