提交 | 用户 | 时间
|
820397
|
1 |
import { Layout } from '@/utils/routerHelper' |
H |
2 |
|
|
3 |
const { t } = useI18n() |
|
4 |
/** |
|
5 |
* redirect: noredirect 当设置 noredirect 的时候该路由在面包屑导航中不可被点击 |
|
6 |
* name:'router-name' 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题 |
|
7 |
* meta : { |
|
8 |
hidden: true 当设置 true 的时候该路由不会再侧边栏出现 如404,login等页面(默认 false) |
|
9 |
|
|
10 |
alwaysShow: true 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式, |
|
11 |
只有一个时,会将那个子路由当做根路由显示在侧边栏, |
|
12 |
若你想不管路由下面的 children 声明的个数都显示你的根路由, |
|
13 |
你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则, |
|
14 |
一直显示根路由(默认 false) |
|
15 |
|
|
16 |
title: 'title' 设置该路由在侧边栏和面包屑中展示的名字 |
|
17 |
|
|
18 |
icon: 'svg-name' 设置该路由的图标 |
|
19 |
|
|
20 |
noCache: true 如果设置为true,则不会被 <keep-alive> 缓存(默认 false) |
|
21 |
|
|
22 |
breadcrumb: false 如果设置为false,则不会在breadcrumb面包屑中显示(默认 true) |
|
23 |
|
|
24 |
affix: true 如果设置为true,则会一直固定在tag项中(默认 false) |
|
25 |
|
|
26 |
noTagsView: true 如果设置为true,则不会出现在tag中(默认 false) |
|
27 |
|
|
28 |
activeMenu: '/dashboard' 显示高亮的路由路径 |
|
29 |
|
|
30 |
followAuth: '/dashboard' 跟随哪个路由进行权限过滤 |
|
31 |
|
|
32 |
canTo: true 设置为true即使hidden为true,也依然可以进行路由跳转(默认 false) |
|
33 |
} |
|
34 |
**/ |
|
35 |
const remainingRouter: AppRouteRecordRaw[] = [ |
|
36 |
{ |
|
37 |
path: '/redirect', |
|
38 |
component: Layout, |
|
39 |
name: 'Redirect', |
|
40 |
children: [ |
|
41 |
{ |
|
42 |
path: '/redirect/:path(.*)', |
|
43 |
name: 'Redirect', |
|
44 |
component: () => import('@/views/Redirect/Redirect.vue'), |
|
45 |
meta: {} |
|
46 |
} |
|
47 |
], |
|
48 |
meta: { |
|
49 |
hidden: true, |
|
50 |
noTagsView: true |
|
51 |
} |
|
52 |
}, |
|
53 |
{ |
|
54 |
path: '/', |
|
55 |
component: Layout, |
|
56 |
redirect: '/index', |
|
57 |
name: 'Home', |
|
58 |
meta: {}, |
|
59 |
children: [ |
|
60 |
{ |
|
61 |
path: 'index', |
|
62 |
component: () => import('@/views/Home/Index.vue'), |
|
63 |
name: 'Index', |
|
64 |
meta: { |
|
65 |
title: t('router.home'), |
|
66 |
icon: 'ep:home-filled', |
|
67 |
noCache: false, |
|
68 |
affix: true |
|
69 |
} |
|
70 |
} |
|
71 |
] |
|
72 |
}, |
|
73 |
{ |
|
74 |
path: '/user', |
|
75 |
component: Layout, |
|
76 |
name: 'UserInfo', |
|
77 |
meta: { |
|
78 |
hidden: true |
|
79 |
}, |
|
80 |
children: [ |
|
81 |
{ |
|
82 |
path: 'profile', |
|
83 |
component: () => import('@/views/Profile/Index.vue'), |
|
84 |
name: 'Profile', |
|
85 |
meta: { |
|
86 |
canTo: true, |
|
87 |
hidden: true, |
|
88 |
noTagsView: false, |
|
89 |
icon: 'ep:user', |
|
90 |
title: t('common.profile') |
|
91 |
} |
|
92 |
}, |
|
93 |
{ |
|
94 |
path: 'notify-message', |
|
95 |
component: () => import('@/views/system/notify/my/index.vue'), |
|
96 |
name: 'MyNotifyMessage', |
|
97 |
meta: { |
|
98 |
canTo: true, |
|
99 |
hidden: true, |
|
100 |
noTagsView: false, |
|
101 |
icon: 'ep:message', |
|
102 |
title: '我的站内信' |
|
103 |
} |
|
104 |
} |
|
105 |
] |
|
106 |
}, |
|
107 |
{ |
|
108 |
path: '/dict', |
|
109 |
component: Layout, |
|
110 |
name: 'dict', |
|
111 |
meta: { |
|
112 |
hidden: true |
|
113 |
}, |
|
114 |
children: [ |
|
115 |
{ |
|
116 |
path: 'type/data/:dictType', |
|
117 |
component: () => import('@/views/system/dict/data/index.vue'), |
|
118 |
name: 'SystemDictData', |
|
119 |
meta: { |
|
120 |
title: '字典数据', |
|
121 |
noCache: true, |
|
122 |
hidden: true, |
|
123 |
canTo: true, |
|
124 |
icon: '', |
|
125 |
activeMenu: '/system/dict' |
|
126 |
} |
|
127 |
} |
|
128 |
] |
|
129 |
}, |
|
130 |
|
|
131 |
{ |
|
132 |
path: '/codegen', |
|
133 |
component: Layout, |
|
134 |
name: 'CodegenEdit', |
|
135 |
meta: { |
|
136 |
hidden: true |
|
137 |
}, |
|
138 |
children: [ |
|
139 |
{ |
|
140 |
path: 'edit', |
|
141 |
component: () => import('@/views/infra/codegen/EditTable.vue'), |
|
142 |
name: 'InfraCodegenEditTable', |
|
143 |
meta: { |
|
144 |
noCache: true, |
|
145 |
hidden: true, |
|
146 |
canTo: true, |
|
147 |
icon: 'ep:edit', |
|
148 |
title: '修改生成配置', |
|
149 |
activeMenu: 'infra/codegen/index' |
|
150 |
} |
|
151 |
} |
|
152 |
] |
|
153 |
}, |
|
154 |
{ |
|
155 |
path: '/job', |
|
156 |
component: Layout, |
|
157 |
name: 'JobL', |
|
158 |
meta: { |
|
159 |
hidden: true |
|
160 |
}, |
|
161 |
children: [ |
|
162 |
{ |
|
163 |
path: 'job-log', |
|
164 |
component: () => import('@/views/infra/job/logger/index.vue'), |
|
165 |
name: 'InfraJobLog', |
|
166 |
meta: { |
|
167 |
noCache: true, |
|
168 |
hidden: true, |
|
169 |
canTo: true, |
|
170 |
icon: 'ep:edit', |
|
171 |
title: '调度日志', |
|
172 |
activeMenu: 'infra/job/index' |
|
173 |
} |
|
174 |
} |
|
175 |
] |
|
176 |
}, |
|
177 |
{ |
|
178 |
path: '/login', |
|
179 |
component: () => import('@/views/Login/Login.vue'), |
|
180 |
name: 'Login', |
|
181 |
meta: { |
|
182 |
hidden: true, |
|
183 |
title: t('router.login'), |
|
184 |
noTagsView: true |
|
185 |
} |
|
186 |
}, |
|
187 |
{ |
|
188 |
path: '/sso', |
|
189 |
component: () => import('@/views/Login/Login.vue'), |
|
190 |
name: 'SSOLogin', |
|
191 |
meta: { |
|
192 |
hidden: true, |
|
193 |
title: t('router.login'), |
|
194 |
noTagsView: true |
|
195 |
} |
|
196 |
}, |
|
197 |
{ |
|
198 |
path: '/social-login', |
|
199 |
component: () => import('@/views/Login/SocialLogin.vue'), |
|
200 |
name: 'SocialLogin', |
|
201 |
meta: { |
|
202 |
hidden: true, |
|
203 |
title: t('router.socialLogin'), |
|
204 |
noTagsView: true |
|
205 |
} |
|
206 |
}, |
|
207 |
{ |
|
208 |
path: '/403', |
|
209 |
component: () => import('@/views/Error/403.vue'), |
|
210 |
name: 'NoAccess', |
|
211 |
meta: { |
|
212 |
hidden: true, |
|
213 |
title: '403', |
|
214 |
noTagsView: true |
|
215 |
} |
|
216 |
}, |
|
217 |
{ |
|
218 |
path: '/404', |
|
219 |
component: () => import('@/views/Error/404.vue'), |
|
220 |
name: 'NoFound', |
|
221 |
meta: { |
|
222 |
hidden: true, |
|
223 |
title: '404', |
|
224 |
noTagsView: true |
|
225 |
} |
|
226 |
}, |
|
227 |
{ |
|
228 |
path: '/500', |
|
229 |
component: () => import('@/views/Error/500.vue'), |
|
230 |
name: 'Error', |
|
231 |
meta: { |
|
232 |
hidden: true, |
|
233 |
title: '500', |
|
234 |
noTagsView: true |
|
235 |
} |
|
236 |
}, |
|
237 |
{ |
|
238 |
path: '/bpm', |
|
239 |
component: Layout, |
|
240 |
name: 'bpm', |
|
241 |
meta: { |
|
242 |
hidden: true |
|
243 |
}, |
|
244 |
children: [ |
|
245 |
{ |
|
246 |
path: 'manager/form/edit', |
|
247 |
component: () => import('@/views/bpm/form/editor/index.vue'), |
|
248 |
name: 'BpmFormEditor', |
|
249 |
meta: { |
|
250 |
noCache: true, |
|
251 |
hidden: true, |
|
252 |
canTo: true, |
|
253 |
title: '设计流程表单', |
|
254 |
activeMenu: '/bpm/manager/form' |
|
255 |
} |
|
256 |
}, |
|
257 |
{ |
|
258 |
path: 'manager/model/edit', |
|
259 |
component: () => import('@/views/bpm/model/editor/index.vue'), |
|
260 |
name: 'BpmModelEditor', |
|
261 |
meta: { |
|
262 |
noCache: true, |
|
263 |
hidden: true, |
|
264 |
canTo: true, |
|
265 |
title: '设计流程', |
|
266 |
activeMenu: '/bpm/manager/model' |
|
267 |
} |
|
268 |
}, |
|
269 |
{ |
|
270 |
path: 'manager/simple/workflow/model/edit', |
|
271 |
component: () => import('@/views/bpm/simpleWorkflow/index.vue'), |
|
272 |
name: 'SimpleWorkflowDesignEditor', |
|
273 |
meta: { |
|
274 |
noCache: true, |
|
275 |
hidden: true, |
|
276 |
canTo: true, |
|
277 |
title: '仿钉钉设计流程', |
|
278 |
activeMenu: '/bpm/manager/model' |
|
279 |
} |
|
280 |
}, |
|
281 |
{ |
|
282 |
path: 'manager/definition', |
|
283 |
component: () => import('@/views/bpm/definition/index.vue'), |
|
284 |
name: 'BpmProcessDefinition', |
|
285 |
meta: { |
|
286 |
noCache: true, |
|
287 |
hidden: true, |
|
288 |
canTo: true, |
|
289 |
title: '流程定义', |
|
290 |
activeMenu: '/bpm/manager/model' |
|
291 |
} |
|
292 |
}, |
|
293 |
{ |
|
294 |
path: 'process-instance/detail', |
|
295 |
component: () => import('@/views/bpm/processInstance/detail/index.vue'), |
|
296 |
name: 'BpmProcessInstanceDetail', |
|
297 |
meta: { |
|
298 |
noCache: true, |
|
299 |
hidden: true, |
|
300 |
canTo: true, |
|
301 |
title: '流程详情', |
|
302 |
activeMenu: '/bpm/task/my' |
|
303 |
} |
|
304 |
}, |
|
305 |
{ |
|
306 |
path: 'oa/leave/create', |
|
307 |
component: () => import('@/views/bpm/oa/leave/create.vue'), |
|
308 |
name: 'OALeaveCreate', |
|
309 |
meta: { |
|
310 |
noCache: true, |
|
311 |
hidden: true, |
|
312 |
canTo: true, |
|
313 |
title: '发起 OA 请假', |
|
314 |
activeMenu: '/bpm/oa/leave' |
|
315 |
} |
|
316 |
}, |
|
317 |
{ |
|
318 |
path: 'oa/leave/detail', |
|
319 |
component: () => import('@/views/bpm/oa/leave/detail.vue'), |
|
320 |
name: 'OALeaveDetail', |
|
321 |
meta: { |
|
322 |
noCache: true, |
|
323 |
hidden: true, |
|
324 |
canTo: true, |
|
325 |
title: '查看 OA 请假', |
|
326 |
activeMenu: '/bpm/oa/leave' |
|
327 |
} |
|
328 |
} |
|
329 |
] |
|
330 |
}, |
|
331 |
] |
|
332 |
|
|
333 |
export default remainingRouter |