From d24ac57178743b8597cc6a95752bf92dd7deaec2 Mon Sep 17 00:00:00 2001 From: cxr <2059387846@qq.com> Date: Fri, 10 May 2024 11:19:29 +0800 Subject: [PATCH] =?UTF-8?q?feat(cxr)=EF=BC=9A=20=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E4=B8=8D=E8=B7=B3=E8=BD=AC=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=EF=BC=8C=E5=B7=A5=E4=BD=9C=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=9C=AA=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/multipleTab.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/store/modules/multipleTab.ts b/src/store/modules/multipleTab.ts index 731b847..4c25745 100644 --- a/src/store/modules/multipleTab.ts +++ b/src/store/modules/multipleTab.ts @@ -104,9 +104,18 @@ export const useMultipleTabStore = defineStore({ const go = useGo(router); const len = this.tabList.length; const { path } = unref(router.currentRoute); - let toPath: PageEnum | string = PageEnum.BASE_HOME; - + //切换角色不跳转工作面板,工作面板页面未开发完成 + const userStore = useUserStore(); + const roleList = toRaw(userStore.getRoleList) || []; + const isSuper = (roleList || []).find((item) => item === 'super'); + const isSupplier = (roleList || []).find((item) => item === 'supplier'); + if (isSuper) { + toPath = '/supplierInfoManage/index'; + } + if (isSupplier) { + toPath = '/product'; + } if (len > 0) { const page = this.tabList[len - 1]; const p = page.fullPath || page.path; -- 2.24.1