|
@@ -121,38 +121,37 @@ export const usePermissionStore = defineStore({
|
|
|
try {
|
|
try {
|
|
|
// this.changePermissionCode();
|
|
// this.changePermissionCode();
|
|
|
routeList = await getMenuList(); //请求后端路由菜单数组
|
|
routeList = await getMenuList(); //请求后端路由菜单数组
|
|
|
- console.log(`routeList == backend`, routeList);
|
|
|
|
|
// 默认路由
|
|
// 默认路由
|
|
|
- const dashboard = {
|
|
|
|
|
- path: '/dashboard',
|
|
|
|
|
- name: 'Dashboard',
|
|
|
|
|
- component: 'LAYOUT',
|
|
|
|
|
- redirect: '/dashboard/analysis',
|
|
|
|
|
- meta: {
|
|
|
|
|
- icon: 'ion:grid-outline',
|
|
|
|
|
- title: 'routes.dashboard.dashboard',
|
|
|
|
|
- },
|
|
|
|
|
- children: [
|
|
|
|
|
- {
|
|
|
|
|
- path: 'analysis',
|
|
|
|
|
- name: 'Analysis',
|
|
|
|
|
- component: '/dashboard/analysis/index',
|
|
|
|
|
- meta: {
|
|
|
|
|
- affix: true,
|
|
|
|
|
- title: 'routes.dashboard.analysis',
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- path: 'workbench',
|
|
|
|
|
- name: 'Workbench',
|
|
|
|
|
- component: '/dashboard/workbench/index',
|
|
|
|
|
- meta: {
|
|
|
|
|
- title: 'routes.dashboard.workbench',
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- };
|
|
|
|
|
- routeList.unshift(dashboard);
|
|
|
|
|
|
|
+ // const dashboard = {
|
|
|
|
|
+ // path: '/dashboard',
|
|
|
|
|
+ // name: 'Dashboard',
|
|
|
|
|
+ // component: 'LAYOUT',
|
|
|
|
|
+ // redirect: '/dashboard/analysis',
|
|
|
|
|
+ // meta: {
|
|
|
|
|
+ // icon: 'ion:grid-outline',
|
|
|
|
|
+ // title: 'routes.dashboard.dashboard',
|
|
|
|
|
+ // },
|
|
|
|
|
+ // children: [
|
|
|
|
|
+ // {
|
|
|
|
|
+ // path: 'analysis',
|
|
|
|
|
+ // name: 'Analysis',
|
|
|
|
|
+ // component: '/dashboard/analysis/index',
|
|
|
|
|
+ // meta: {
|
|
|
|
|
+ // affix: true,
|
|
|
|
|
+ // title: 'routes.dashboard.analysis',
|
|
|
|
|
+ // },
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // path: 'workbench',
|
|
|
|
|
+ // name: 'Workbench',
|
|
|
|
|
+ // component: '/dashboard/workbench/index',
|
|
|
|
|
+ // meta: {
|
|
|
|
|
+ // title: 'routes.dashboard.workbench',
|
|
|
|
|
+ // },
|
|
|
|
|
+ // },
|
|
|
|
|
+ // ],
|
|
|
|
|
+ // };
|
|
|
|
|
+ // routeList.unshift(dashboard);
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error(error);
|
|
console.error(error);
|
|
|
}
|
|
}
|