提交 | 用户 | 时间
|
39248b
|
1 |
import {Layout} from '@/utils/routerHelper' |
820397
|
2 |
|
H |
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 |
}, |
9e0e70
|
53 |
// { |
H |
54 |
// path: '/shasteel', |
|
55 |
// component: () => import('@/views/micro/index.vue'), |
|
56 |
// name: 'shasteel', |
|
57 |
// meta: { |
|
58 |
// hidden: true, |
|
59 |
// noTagsView: true |
|
60 |
// }, |
|
61 |
// }, |
820397
|
62 |
{ |
39248b
|
63 |
path: '/home2', |
H |
64 |
component: () => import('@/views/Home/Index2.vue'), |
|
65 |
name: 'Home2', |
|
66 |
meta: { |
|
67 |
hidden: true, |
|
68 |
noTagsView: true |
|
69 |
}, |
|
70 |
}, |
|
71 |
{ |
820397
|
72 |
path: '/', |
H |
73 |
component: Layout, |
|
74 |
name: 'Home', |
3e359e
|
75 |
redirect: '/index', |
39248b
|
76 |
meta: { |
H |
77 |
hidden: true, |
|
78 |
noTagsView: true |
|
79 |
}, |
820397
|
80 |
children: [ |
H |
81 |
{ |
|
82 |
path: 'index', |
|
83 |
component: () => import('@/views/Home/Index.vue'), |
|
84 |
name: 'Index', |
|
85 |
meta: { |
|
86 |
title: t('router.home'), |
|
87 |
icon: 'ep:home-filled', |
|
88 |
noCache: false, |
|
89 |
affix: true |
|
90 |
} |
|
91 |
} |
|
92 |
] |
|
93 |
}, |
|
94 |
{ |
|
95 |
path: '/user', |
|
96 |
component: Layout, |
|
97 |
name: 'UserInfo', |
|
98 |
meta: { |
|
99 |
hidden: true |
|
100 |
}, |
|
101 |
children: [ |
|
102 |
{ |
|
103 |
path: 'profile', |
|
104 |
component: () => import('@/views/Profile/Index.vue'), |
|
105 |
name: 'Profile', |
|
106 |
meta: { |
|
107 |
canTo: true, |
|
108 |
hidden: true, |
|
109 |
noTagsView: false, |
|
110 |
icon: 'ep:user', |
|
111 |
title: t('common.profile') |
|
112 |
} |
|
113 |
}, |
|
114 |
{ |
|
115 |
path: 'notify-message', |
|
116 |
component: () => import('@/views/system/notify/my/index.vue'), |
|
117 |
name: 'MyNotifyMessage', |
|
118 |
meta: { |
|
119 |
canTo: true, |
|
120 |
hidden: true, |
|
121 |
noTagsView: false, |
|
122 |
icon: 'ep:message', |
|
123 |
title: '我的站内信' |
|
124 |
} |
|
125 |
} |
|
126 |
] |
|
127 |
}, |
|
128 |
{ |
|
129 |
path: '/dict', |
|
130 |
component: Layout, |
|
131 |
name: 'dict', |
|
132 |
meta: { |
|
133 |
hidden: true |
|
134 |
}, |
|
135 |
children: [ |
|
136 |
{ |
|
137 |
path: 'type/data/:dictType', |
|
138 |
component: () => import('@/views/system/dict/data/index.vue'), |
|
139 |
name: 'SystemDictData', |
|
140 |
meta: { |
|
141 |
title: '字典数据', |
|
142 |
noCache: true, |
|
143 |
hidden: true, |
|
144 |
canTo: true, |
|
145 |
icon: '', |
|
146 |
activeMenu: '/system/dict' |
|
147 |
} |
|
148 |
} |
|
149 |
] |
|
150 |
}, |
|
151 |
|
|
152 |
{ |
|
153 |
path: '/codegen', |
|
154 |
component: Layout, |
|
155 |
name: 'CodegenEdit', |
|
156 |
meta: { |
|
157 |
hidden: true |
|
158 |
}, |
|
159 |
children: [ |
|
160 |
{ |
|
161 |
path: 'edit', |
|
162 |
component: () => import('@/views/infra/codegen/EditTable.vue'), |
|
163 |
name: 'InfraCodegenEditTable', |
|
164 |
meta: { |
|
165 |
noCache: true, |
|
166 |
hidden: true, |
|
167 |
canTo: true, |
|
168 |
icon: 'ep:edit', |
|
169 |
title: '修改生成配置', |
|
170 |
activeMenu: 'infra/codegen/index' |
|
171 |
} |
|
172 |
} |
|
173 |
] |
|
174 |
}, |
|
175 |
{ |
|
176 |
path: '/job', |
|
177 |
component: Layout, |
|
178 |
name: 'JobL', |
|
179 |
meta: { |
|
180 |
hidden: true |
|
181 |
}, |
|
182 |
children: [ |
|
183 |
{ |
|
184 |
path: 'job-log', |
|
185 |
component: () => import('@/views/infra/job/logger/index.vue'), |
|
186 |
name: 'InfraJobLog', |
|
187 |
meta: { |
|
188 |
noCache: true, |
|
189 |
hidden: true, |
|
190 |
canTo: true, |
|
191 |
icon: 'ep:edit', |
|
192 |
title: '调度日志', |
|
193 |
activeMenu: 'infra/job/index' |
|
194 |
} |
|
195 |
} |
|
196 |
] |
|
197 |
}, |
|
198 |
{ |
|
199 |
path: '/login', |
|
200 |
component: () => import('@/views/Login/Login.vue'), |
|
201 |
name: 'Login', |
|
202 |
meta: { |
|
203 |
hidden: true, |
|
204 |
title: t('router.login'), |
|
205 |
noTagsView: true |
|
206 |
} |
|
207 |
}, |
|
208 |
{ |
|
209 |
path: '/sso', |
|
210 |
component: () => import('@/views/Login/Login.vue'), |
|
211 |
name: 'SSOLogin', |
|
212 |
meta: { |
|
213 |
hidden: true, |
|
214 |
title: t('router.login'), |
|
215 |
noTagsView: true |
|
216 |
} |
|
217 |
}, |
|
218 |
{ |
|
219 |
path: '/social-login', |
|
220 |
component: () => import('@/views/Login/SocialLogin.vue'), |
|
221 |
name: 'SocialLogin', |
|
222 |
meta: { |
|
223 |
hidden: true, |
|
224 |
title: t('router.socialLogin'), |
|
225 |
noTagsView: true |
|
226 |
} |
|
227 |
}, |
|
228 |
{ |
|
229 |
path: '/403', |
|
230 |
component: () => import('@/views/Error/403.vue'), |
|
231 |
name: 'NoAccess', |
|
232 |
meta: { |
|
233 |
hidden: true, |
|
234 |
title: '403', |
|
235 |
noTagsView: true |
|
236 |
} |
|
237 |
}, |
|
238 |
{ |
|
239 |
path: '/404', |
|
240 |
component: () => import('@/views/Error/404.vue'), |
|
241 |
name: 'NoFound', |
|
242 |
meta: { |
|
243 |
hidden: true, |
|
244 |
title: '404', |
|
245 |
noTagsView: true |
|
246 |
} |
|
247 |
}, |
|
248 |
{ |
|
249 |
path: '/500', |
|
250 |
component: () => import('@/views/Error/500.vue'), |
|
251 |
name: 'Error', |
|
252 |
meta: { |
|
253 |
hidden: true, |
|
254 |
title: '500', |
|
255 |
noTagsView: true |
|
256 |
} |
|
257 |
}, |
|
258 |
{ |
|
259 |
path: '/bpm', |
|
260 |
component: Layout, |
|
261 |
name: 'bpm', |
|
262 |
meta: { |
|
263 |
hidden: true |
|
264 |
}, |
|
265 |
children: [ |
|
266 |
{ |
|
267 |
path: 'manager/form/edit', |
|
268 |
component: () => import('@/views/bpm/form/editor/index.vue'), |
|
269 |
name: 'BpmFormEditor', |
|
270 |
meta: { |
|
271 |
noCache: true, |
|
272 |
hidden: true, |
|
273 |
canTo: true, |
|
274 |
title: '设计流程表单', |
|
275 |
activeMenu: '/bpm/manager/form' |
|
276 |
} |
|
277 |
}, |
|
278 |
{ |
|
279 |
path: 'manager/model/edit', |
|
280 |
component: () => import('@/views/bpm/model/editor/index.vue'), |
|
281 |
name: 'BpmModelEditor', |
|
282 |
meta: { |
|
283 |
noCache: true, |
|
284 |
hidden: true, |
|
285 |
canTo: true, |
|
286 |
title: '设计流程', |
|
287 |
activeMenu: '/bpm/manager/model' |
|
288 |
} |
|
289 |
}, |
|
290 |
{ |
3e359e
|
291 |
path: 'manager/simple/model', |
H |
292 |
component: () => import('@/views/bpm/simple/SimpleModelDesign.vue'), |
|
293 |
name: 'SimpleModelDesign', |
|
294 |
meta: { |
|
295 |
noCache: true, |
|
296 |
hidden: true, |
|
297 |
canTo: true, |
|
298 |
title: '仿钉钉设计流程', |
|
299 |
activeMenu: '/bpm/manager/model' |
|
300 |
} |
|
301 |
}, |
|
302 |
{ |
820397
|
303 |
path: 'manager/definition', |
H |
304 |
component: () => import('@/views/bpm/definition/index.vue'), |
|
305 |
name: 'BpmProcessDefinition', |
|
306 |
meta: { |
|
307 |
noCache: true, |
|
308 |
hidden: true, |
|
309 |
canTo: true, |
|
310 |
title: '流程定义', |
|
311 |
activeMenu: '/bpm/manager/model' |
|
312 |
} |
|
313 |
}, |
|
314 |
{ |
|
315 |
path: 'process-instance/detail', |
|
316 |
component: () => import('@/views/bpm/processInstance/detail/index.vue'), |
|
317 |
name: 'BpmProcessInstanceDetail', |
|
318 |
meta: { |
|
319 |
noCache: true, |
|
320 |
hidden: true, |
|
321 |
canTo: true, |
|
322 |
title: '流程详情', |
|
323 |
activeMenu: '/bpm/task/my' |
3e359e
|
324 |
}, |
H |
325 |
props: (route) => ({ |
|
326 |
id: route.query.id, |
|
327 |
taskId: route.query.taskId, |
|
328 |
activityId: route.query.activityId |
|
329 |
}) |
820397
|
330 |
}, |
H |
331 |
{ |
|
332 |
path: 'oa/leave/create', |
|
333 |
component: () => import('@/views/bpm/oa/leave/create.vue'), |
|
334 |
name: 'OALeaveCreate', |
|
335 |
meta: { |
|
336 |
noCache: true, |
|
337 |
hidden: true, |
|
338 |
canTo: true, |
|
339 |
title: '发起 OA 请假', |
|
340 |
activeMenu: '/bpm/oa/leave' |
|
341 |
} |
|
342 |
}, |
|
343 |
{ |
|
344 |
path: 'oa/leave/detail', |
|
345 |
component: () => import('@/views/bpm/oa/leave/detail.vue'), |
|
346 |
name: 'OALeaveDetail', |
|
347 |
meta: { |
|
348 |
noCache: true, |
|
349 |
hidden: true, |
|
350 |
canTo: true, |
|
351 |
title: '查看 OA 请假', |
|
352 |
activeMenu: '/bpm/oa/leave' |
|
353 |
} |
|
354 |
} |
|
355 |
] |
|
356 |
}, |
9c91ad
|
357 |
{ |
D |
358 |
path: '/project', |
|
359 |
component: Layout, |
|
360 |
name: 'project', |
|
361 |
meta: { |
|
362 |
hidden: true |
|
363 |
}, |
|
364 |
children: [ |
|
365 |
{ |
|
366 |
path: 'package/history/:projectId', |
8de065
|
367 |
component: () => import('@/views/model/mpk/project/ProjectPackageHistory.vue'), |
9c91ad
|
368 |
name: 'ProjectPackageHistory', |
D |
369 |
meta: { |
|
370 |
title: '打包历史', |
|
371 |
noCache: true, |
|
372 |
hidden: true, |
|
373 |
canTo: true, |
|
374 |
icon: '', |
|
375 |
activeMenu: '/model/project' |
|
376 |
} |
|
377 |
} |
|
378 |
] |
|
379 |
}, |
f87d4e
|
380 |
{ |
潘 |
381 |
path: '/ind/data', |
|
382 |
component: Layout, |
|
383 |
name: 'dataSet', |
|
384 |
meta: { |
|
385 |
hidden: true |
|
386 |
}, |
|
387 |
children: [ |
|
388 |
{ |
|
389 |
path: 'field/:dataSetId', |
|
390 |
component: () => import('@/views/data/ind/data/field/index.vue'), |
|
391 |
name: 'IndDataSetField', |
|
392 |
meta: { |
|
393 |
title: '数据集字段', |
|
394 |
noCache: true, |
|
395 |
hidden: true, |
|
396 |
canTo: true, |
|
397 |
icon: '', |
|
398 |
activeMenu: '/data/ind/data' |
|
399 |
} |
|
400 |
} |
|
401 |
] |
|
402 |
}, |
7767e5
|
403 |
{ |
8de065
|
404 |
path: '/file', |
7767e5
|
405 |
component: Layout, |
8de065
|
406 |
name: 'file', |
7767e5
|
407 |
meta: { |
D |
408 |
hidden: true |
|
409 |
}, |
|
410 |
children: [ |
|
411 |
{ |
|
412 |
path: 'form/:id?', |
8de065
|
413 |
component: () => import('@/views/model/mpk/file/MpkForm.vue'), |
7767e5
|
414 |
name: 'MpkForm', |
D |
415 |
meta: { |
aff5c9
|
416 |
title: 'MDK表单', |
7767e5
|
417 |
noCache: true, |
D |
418 |
hidden: true, |
|
419 |
canTo: true, |
|
420 |
icon: '', |
8de065
|
421 |
activeMenu: '/model/file' |
7767e5
|
422 |
} |
D |
423 |
} |
|
424 |
] |
|
425 |
}, |
820397
|
426 |
] |
H |
427 |
|
|
428 |
export default remainingRouter |