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