inleft
2022-02-09 9bcb19959eeb9da9bde2561e7278f6d0a55eb151
commit | author | age
9bcb19 1 // eslint-disable-next-line
I 2 import { UserLayout, BasicLayout, RouteView, BlankLayout, PageView } from '@/layouts'
3 import { bxAnaalyse } from '@/core/icons'
4
5 export const asyncRouterMap = [
6
7   {
8     path: '/',
9     name: 'MenuIndex.vue',
10     component: BasicLayout,
11     meta: { title: '首页' },
12     redirect: '/dashboard/workplace',
13     children: [
14       // dashboard
15       {
16         path: 'dashboard',
17         name: 'dashboard',
18         redirect: '/dashboard/workplace',
19         component: RouteView,
20         // eslint-disable-next-line standard/object-curly-even-spacing
21         meta: { title: '仪表盘', keepAlive: true, icon: bxAnaalyse /* permission: [ 'dashboard' ] */ },
22         children: [
23           {
24             path: 'analysis/:pageNo([1-9]\\d*)?',
25             name: 'Analysis',
26             component: () => import('@/views/system/dashboard/Analysis'),
27             // eslint-disable-next-line standard/object-curly-even-spacing
28             meta: { title: '分析页', keepAlive: true /* permission: [ 'dashboard' ] */ }
29           },
30           {
31             path: 'workplace',
32             name: 'Workplace',
33             component: () => import('@/views/system/dashboard/Workplace'),
34             // eslint-disable-next-line standard/object-curly-even-spacing
35             meta: { title: '工作台', keepAlive: false/*, permission: [ 'dashboard' ] */ }
36           }
37         ]
38       }
39     ]
40   },
41   {
42     path: '*', redirect: '/404', hidden: true
43   }
44 ]
45
46 /**
47  * 基础路由
48  * @type { *[] }
49  */
50 export const constantRouterMap = [
51   {
52     path: '/user',
53     component: UserLayout,
54     redirect: '/user/login',
55     hidden: true,
56     children: [
57       {
58         path: 'login',
59         name: 'login',
60         component: () => import(/* webpackChunkName: "user" */ '@/views/userLoginReg/Login')
61       },
62       {
63         path: 'register',
64         name: 'register',
65         component: () => import(/* webpackChunkName: "user" */ '@/views/userLoginReg/Register')
66       },
67       {
68         path: 'register-result',
69         name: 'registerResult',
70         component: () => import(/* webpackChunkName: "user" */ '@/views/userLoginReg/RegisterResult')
71       },
72       {
73         path: 'recover',
74         name: 'recover',
75         component: undefined
76       }
77     ]
78   },
79
80   {
81     path: '/404',
82     component: () => import(/* webpackChunkName: "fail" */ '@/views/system/exception/404')
83   }
84
85 ]