Commit d24ac571 authored by cxr's avatar cxr

feat(cxr): 切换角色不跳转工作面板,工作面板页面未开发完成

parent cc9ffe71
...@@ -104,9 +104,18 @@ export const useMultipleTabStore = defineStore({ ...@@ -104,9 +104,18 @@ export const useMultipleTabStore = defineStore({
const go = useGo(router); const go = useGo(router);
const len = this.tabList.length; const len = this.tabList.length;
const { path } = unref(router.currentRoute); const { path } = unref(router.currentRoute);
let toPath: PageEnum | string = PageEnum.BASE_HOME; 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) { if (len > 0) {
const page = this.tabList[len - 1]; const page = this.tabList[len - 1];
const p = page.fullPath || page.path; const p = page.fullPath || page.path;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment