diff --git a/src/store/modules/multipleTab.ts b/src/store/modules/multipleTab.ts index 731b847e6bc9c5dfae67d1df545b4a2bf842d49d..4c25745c14aa68bd5522d222d4d74673bd5a1113 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;