1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
| import Vue from 'vue'
| import Router from 'vue-router'
|
| Vue.use(Router)
|
| /* Layout */
| import Layout from '@/layout'
|
| /**
| * Note: sub-menu only appear when route children.length >= 1
| * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
| *
| * hidden: true if set true, item will not show in the sidebar(default is false)
| * alwaysShow: true if set true, will always show the root menu
| * if not set alwaysShow, when item has more than one children route,
| * it will becomes nested mode, otherwise not show the root menu
| * redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
| * name:'router-name' the name is used by <keep-alive> (must set!!!)
| * meta : {
| roles: ['admin','editor'] control the page roles (you can set multiple roles)
| title: 'title' the name show in sidebar and breadcrumb (recommend set)
| icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
| breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
| activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
| }
| */
|
| /**
| * constantRoutes
| * a base page that does not have permission requirements
| * all roles can be accessed
| */
| // 公用模块
| export const commonRoutes = [
| /*
| * 看板部分路由
| * */
| {
| path: '/zhkb',
| component: () => import('@/views/kanbanManager/zhkb'),
| hidden: true
| }, {
| path: '/cj',
| component: () => import('@/views/kanbanManager/cj'),
| hidden: true
| }, {
| path: '/ckgl',
| component: () => import('@/views/kanbanManager/ckgl'),
| hidden: true
| },
|
| {
| path: '/login',
| component: () => import('@/views/login/index'),
| hidden: true
| },
| {
| path: '/404',
| component: () => import('@/views/404'),
| hidden: true
| },
| {
| path: '/redirect',
| component: Layout,
| hidden: true,
| children: [
| {
| path: '/redirect/:path(.*)',
| component: () => import('@/views/redirect/index')
| }
| ]
| },
| {
| path: '/',
| component: Layout,
| redirect: '/index',
| name: '系统首页',
| children: [{
| path: 'index',
| name: 'index',
| component: () => import('@/views/systemHome/index'),
| meta: { title: '系统首页', icon: 'home', affix: true }
| }]
| }
| // { path: '*', redirect: '/404', hidden: true }
| ]
|
| export const asyncRoutes = [
| {
| path: '/basicSettings',
| component: Layout,
| redirect: '/basicSettings/organizationList',
| name: '基础设置',
| code: '01',
| meta: { code: '01', title: '基础设置', icon: 'tree2' },
| alwaysShow: true, // 当children只有一个时,也显示父菜单
| children: [
| {
| path: 'organizationList',
| name: 'OrganizationList',
| code: '0101',
| component: () => import('@/views/basicSettings/organizationList'),
| meta: { code: '0101', title: '组织架构', icon: '', keepAlive: true }
| },
| {
| path: 'postList',
| name: 'PersonList',
| code: '0102',
| component: () => import('@/views/basicSettings/postList'),
| meta: { code: '0102', title: '岗位管理', icon: '', keepAlive: true }
| }, {
| path: 'groupList',
| name: 'GroupList',
| code: '0103',
| component: () => import('@/views/basicSettings/groupList'),
| meta: { code: '0103', title: '班组管理', icon: '', keepAlive: true }
| },
| {
| path: 'personList',
| name: 'PersonList',
| code: '0104',
| component: () => import('@/views/basicSettings/personList'),
| meta: { code: '0104', title: '人员管理', icon: '', keepAlive: true }
| }, {
| path: 'roleList',
| name: 'RoleList',
| code: '0105',
| component: () => import('@/views/basicSettings/roleList'),
| meta: { code: '0105', title: '角色管理', icon: '', keepAlive: true }
| },
| {
| path: 'powerDivider',
| name: 'PowerDivider',
| code: '0110',
| component: () => import('@/views/basicSettings/powerDivider'),
| meta: { code: '0110', title: '权限分配', icon: '', keepAlive: true }
| },
| {
| path: 'roleDivider',
| name: 'RoleDivider',
| code: '0111',
| hidden: true,
| component: () => import('@/views/basicSettings/roleDivider'),
| meta: { code: '0111', title: '角色分配', icon: '', keepAlive: true }
| }, {
| path: 'contactUnitList',
| name: 'ContactUnitList',
| code: '0106',
| component: () => import('@/views/basicSettings/contactUnitList'),
| meta: { code: '0106', title: '往来单位', icon: '', keepAlive: true }
| }, {
| path: 'warehouseList',
| name: 'WarehouseList',
| code: '0107',
| component: () => import('@/views/basicSettings/warehouseList'),
| meta: { code: '0107', title: '仓库设置', icon: '', keepAlive: true }
| }, {
| path: 'storageList',
| name: 'StorageList',
| code: '0108',
| component: () => import('@/views/basicSettings/storageList'),
| meta: { code: '0108', title: '库位设置', icon: '', keepAlive: true }
| }, {
| path: 'installLampList',
| name: 'InstallLampList',
| code: '0109',
| component: () => import('@/views/basicSettings/installLampList'),
| meta: { code: '0109', title: '安灯设置', icon: '', keepAlive: true }
| }, {
| path: 'processList',
| name: 'ProcessList',
| code: '0112',
| component: () => import('@/views/basicSettings/processList'),
| meta: { code: '0112', title: '工序设置', icon: '', keepAlive: true }
| }, {
| path: 'cronTime',
| name: 'CronTime',
| code: '0113',
| component: () => import('@/views/basicSettings/cronTime'),
| meta: { code: '0113', title: '定时任务', icon: '', keepAlive: true }
| }, {
| path: 'processRoute',
| name: 'ProcessRoute',
| code: '0114',
| component: () => import('@/views/basicSettings/processRoute'),
| meta: { code: '0114', title: '工艺路线', icon: '', keepAlive: true }
| },
| {
| path: 'meterPrice',
| name: 'MeterPrice',
| code: '0115',
| component: () => import('@/views/basicSettings/meterPrice'),
| meta: { code: '0115', title: '工价设置', icon: '', keepAlive: true }
| }
|
| ]
| },
|
| {
| path: '/materialManager',
| component: Layout,
| redirect: '/materialManager/unitList',
| name: '物料管理',
| code: '02',
| meta: { code: '02', title: '物料管理', icon: 'table' },
| alwaysShow: true, // 当children只有一个时,也显示父菜单
| children: [
| {
| path: 'unitList',
| name: 'UnitList',
| code: '0201',
| component: () => import('@/views/materialManager/unitList'),
| meta: { code: '0201', title: '计量单位', icon: '', keepAlive: true }
| },
| {
| path: 'inventoryList',
| name: 'InventoryList',
| code: '0202',
| component: () => import('@/views/materialManager/inventoryList'),
| meta: { code: '0202', title: '存货档案', icon: '', keepAlive: true }
| }, {
| path: 'materialList',
| name: 'MaterialList',
| code: '0203',
| component: () => import('@/views/materialManager/materialList'),
| meta: { code: '0203', title: '物料清单', icon: '', keepAlive: true }
| }
|
| ]
| },
|
| {
| path: '/deviceManager',
| component: Layout,
| redirect: '/deviceManager/deviceType',
| name: '设备管理',
| code: '03',
| meta: { code: '03', title: '设备管理', icon: 'example' },
| alwaysShow: true,
| children: [
| {
| path: 'deviceList',
| name: 'DeviceList',
| code: '0301',
| component: () => import('@/views/deviceManager/deviceList'),
| meta: { code: '0301', title: '设备清单', icon: '', keepAlive: true }
| },
| {
| path: 'checkStandard',
| name: 'CheckStandard',
| code: '0302',
| component: () => import('@/views/deviceManager/checkStandard'),
| meta: { code: '0302', title: '点检标准', icon: '', keepAlive: true }
| },
| {
| path: 'checkPosition',
| name: 'CheckPosition',
| code: '0303',
| component: () => import('@/views/deviceManager/checkPosition'),
| meta: { code: '0303', title: '点检部位', icon: '', keepAlive: true }
| },
| {
| path: 'maintainStandard',
| name: 'MaintainStandard',
| code: '0304',
| component: () => import('@/views/deviceManager/maintainStandard'),
| meta: { code: '0304', title: '保养标准', icon: '', keepAlive: true }
| },
| {
| path: 'maintainPosition',
| name: 'MaintainPosition',
| code: '0305',
| component: () => import('@/views/deviceManager/maintainPosition'),
| meta: { code: '0305', title: '保养部位', icon: '', keepAlive: true }
| },
| {
| path: 'checkRecord',
| name: 'CheckRecord',
| code: '0306',
| component: () => import('@/views/deviceManager/checkRecord'),
| meta: { code: '0306', title: '点检记录', icon: '', keepAlive: true }
| },
| {
| path: 'maintainRecord',
| name: 'MaintainRecord',
| code: '0307',
| component: () => import('@/views/deviceManager/maintainRecord'),
| meta: { code: '0307', title: '保养记录', icon: '', keepAlive: true }
| },
| {
| path: 'repairRecord',
| code: '0308',
| name: 'RepairRecord',
| component: () => import('@/views/deviceManager/repairRecord'),
| meta: { code: '0308', title: '维修记录', icon: '', keepAlive: true }
| }
| ]
| },
|
| {
| path: '/mouldManager',
| component: Layout,
| redirect: '/mouldManager/mouldList',
| name: '模具管理',
| code: '09',
| meta: { code: '09', title: '模具管理', icon: 'mj' },
| alwaysShow: true,
| children: [
| {
| path: 'mouldList',
| name: 'MouldList',
| code: '0901',
| component: () => import('@/views/mouldManager/mouldList'),
| meta: { code: '0901', title: '模具清单', icon: '', keepAlive: true }
| }, {
| path: 'mouldCheckPos',
| name: 'MouldCheckPos',
| code: '0902',
| component: () => import('@/views/mouldManager/mouldCheck'),
| meta: { code: '0902', title: '模具点检项', icon: '', keepAlive: true }
| }, {
| path: 'mouldCheckStand',
| name: 'MouldCheckStand',
| code: '0903',
| component: () => import('@/views/mouldManager/mouldCheckStand'),
| meta: { code: '0903', title: '模具点检标准', icon: '', keepAlive: true }
| }, {
| path: 'mouldMaintain',
| name: 'MouldMaintain',
| code: '0904',
| component: () => import('@/views/mouldManager/mouldMaintain'),
| meta: { code: '0904', title: '模具保养项', icon: '', keepAlive: true }
| }, {
| path: 'mouldMaintainStand',
| name: 'MouldMaintainStand',
| code: '0905',
| component: () => import('@/views/mouldManager/mouldMaintainStand'),
| meta: { code: '0905', title: '模具保养标准', icon: '', keepAlive: true }
| }, {
| path: 'mouldCheckRecord',
| name: 'mouldCheckRecord',
| code: '0906',
| component: () => import('@/views/mouldManager/mouldCheckRecord'),
| meta: { code: '0906', title: '模具点检记录', icon: '', keepAlive: true }
| }, {
| path: 'mouldMaintainRecord',
| name: 'MouldMaintainRecord',
| code: '0907',
| component: () => import('@/views/mouldManager/mouldMaintainRecord'),
| meta: { code: '0907', title: '模具保养记录', icon: '', keepAlive: true }
| }, {
| path: 'mouldRepairRecord',
| name: 'MouldRepairRecord',
| code: '0908',
| component: () => import('@/views/mouldManager/mouldRepairRecord'),
| meta: { code: '0908', title: '模具维修记录', icon: '', keepAlive: true }
| }, {
| path: 'mouldUpDownRecord',
| name: 'MouldUpDownRecord',
| code: '0909',
| component: () => import('@/views/mouldManager/mouldUpDownRecord'),
| meta: { code: '0909', title: '模具上下机记录', icon: '', keepAlive: true }
| }, {
| path: 'mouldOutInRecord',
| name: 'MouldOutInRecord',
| code: '0910',
| component: () => import('@/views/mouldManager/mouldOutInRecord'),
| meta: { code: '0910', title: '模具出入库记录', icon: '', keepAlive: true }
| }, {
| path: 'mouldCirculateRecord',
| name: 'MouldCirculateRecord',
| code: '0911',
| component: () => import('@/views/mouldManager/mouldCirculateRecord'),
| meta: { code: '0911', title: '模具借还记录', icon: '', keepAlive: true }
| }
| ]
| },
|
| {
| path: '/qualityManager',
| component: Layout,
| redirect: '/qualityManager/defectDefine',
| name: '质量管理',
| code: '04',
| meta: { code: '04', title: '质量管理', icon: 'zlgl' },
| alwaysShow: true,
| children: [
| {
| path: 'defectDefine',
| name: 'DefectDefine',
| code: '0401',
| component: () => import('@/views/qualityManager/defectDefine'),
| meta: { code: '0401', title: '缺陷定义', icon: '', keepAlive: true }
| },
| {
| path: 'processCheckItem',
| name: 'ProcessCheckItem',
| code: '0402',
| component: () => import('@/views/qualityManager/processCheckItem'),
| meta: { code: '0402', title: '检验项设置', icon: '', keepAlive: true }
| }, {
| path: 'qualityPlaning',
| name: 'QualityPlaning',
| code: '0403',
| component: () => import('@/views/qualityManager/qualityPlaning'),
| meta: { code: '0403', title: '质检方案', icon: '', keepAlive: true }
| }, {
| path: 'processCheck',
| name: 'ProcessCheck',
| code: '0404',
| component: () => import('@/views/qualityManager/processCheck'),
| meta: { code: '0404', title: '工序检验', icon: '', keepAlive: true }
| }, {
| path: 'processCheckRecord',
| name: 'ProcessCheckRecord',
| code: '0405',
| component: () => import('@/views/qualityManager/processCheckRecord'),
| meta: { code: '0405', title: '工序检验', icon: '', keepAlive: true }
| }
| ]
| },
|
| {
| path: '/workOrder',
| component: Layout,
| redirect: '/workOrder/workOrderList',
| name: '工单管理',
| code: '05',
| meta: { code: '05', title: '工单管理', icon: 'bbgl' },
| alwaysShow: true, // 当children只有一个时,也显示父菜单
| children: [
| {
| path: 'produceOrderList',
| name: 'ProduceOrderList',
| code: '0501',
| component: () => import('@/views/workOrder/produceOrderList'),
| meta: { code: '0501', title: 'ERP订单', icon: '', keepAlive: true }
| },
| {
| path: 'workOrderList',
| name: 'WorkOrderList',
| code: '0502',
| component: () => import('@/views/workOrder/workOrderList'),
| meta: { code: '0502', title: 'MES工单', icon: '', keepAlive: true }
| },
| {
| path: 'workOrderSend',
| name: 'WorkOrderSend',
| code: '0503',
| component: () => import('@/views/workOrder/workOrderSend'),
| meta: { code: '0503', title: '工单派发', icon: '', keepAlive: true }
| }, {
| path: 'workOrderClose',
| name: 'WorkOrderClose',
| code: '0504',
| component: () => import('@/views/workOrder/workOrderClose'),
| meta: { code: '0504', title: '工单关闭', icon: '', keepAlive: true }
| }
|
| ]
| },
|
| {
| path: '/produce',
| component: Layout,
| redirect: '/produce/stepReport',
| name: '生产执行',
| code: '06',
| meta: { code: '06', title: '生产执行', icon: 'component' },
| alwaysShow: true, // 当children只有一个时,也显示父菜单
| children: [
| {
| path: 'stepReport',
| name: 'StepReport',
| code: '0601',
| component: () => import('@/views/produce/stepReport'),
| meta: { code: '0601', title: '工序报工', icon: '', keepAlive: true }
| },
| {
| path: 'reportCorrect',
| name: 'ReportCorrect',
| code: '0602',
| component: () => import('@/views/produce/reportCorrect'),
| meta: { code: '0602', title: '报工调整', icon: '', keepAlive: true }
| }, {
| path: 'reportVerify',
| name: 'ReportVerify',
| code: '0603',
| component: () => import('@/views/produce/reportVerify'),
| meta: { code: '0603', title: '报工审核', icon: '', keepAlive: true }
| }
|
| ]
| },
|
| {
| path: '/statistic',
| component: Layout,
| redirect: '/statistic/reportList',
| name: '统计报表',
| code: '07',
| meta: { code: '0701', title: '统计报表', icon: 'quality' },
| alwaysShow: true, // 当children只有一个时,也显示父菜单
| children: [
| {
| path: 'reportList',
| name: 'ReportList',
| code: '1040',
| component: () => import('@/views/statistic/reportList'),
| meta: { code: '1040', title: '报工记录', icon: '', keepAlive: true }
| },
| {
| path: 'monthReport',
| name: 'MonthReport',
| code: '1041',
| component: () => import('@/views/statistic/monthReport'),
| meta: { code: '1041', title: '月度统计', icon: '', keepAlive: true }
| }, {
| path: 'workOrderProcess',
| name: 'WorkOrderProcess',
| code: '0701',
| component: () => import('@/views/statistic/workOrderProcess'),
| meta: { code: '0701', title: '生产进度', icon: '', keepAlive: true }
| }, {
| path: 'inProcessList',
| name: 'InProcessList',
| code: '1043',
| component: () => import('@/views/statistic/inProcessList'),
| meta: { code: '1043', title: '在制列表', icon: '', keepAlive: true }
| },
| {
| path: 'groupSalaryList',
| name: 'GroupSalaryList',
| code: '0702',
| component: () => import('@/views/statistic/groupSalaryList'),
| meta: { code: '0702', title: '班组工资统计报表', icon: '', keepAlive: true }
| },
| {
| path: 'personSalaryList',
| name: 'PersonSalaryList',
| code: '0703',
| component: () => import('@/views/statistic/personSalaryList'),
| meta: { code: '0703', title: '人员工资统计报表', icon: '', keepAlive: true }
| }, {
| path: 'subcontractingOperation',
| name: 'SubcontractingOperation',
| code: '0704',
| component: () => import('@/views/statistic/subcontractingOperation'),
| meta: { code: '0704', title: '委外工序明细报表', icon: '', keepAlive: true }
| }, {
| path: 'defectDetailList',
| name: 'DefectDetailList',
| code: '0705',
| component: () => import('@/views/statistic/defectDetailList'),
| meta: { code: '0705', title: '不良明细报表', icon: '', keepAlive: true }
| }, {
| path: 'repairDetailList',
| name: 'RepairDetailList',
| code: '0706',
| component: () => import('@/views/statistic/repairDetailList'),
| meta: { code: '0706', title: '维修明细报表', icon: '', keepAlive: true }
| },,
| {
| path: 'installationLampList',
| name: 'InstallationLampList',
| code: '0707',
| component: () => import('@/views/statistic/installationLampList'),
| meta: { code: '0707', title: '安灯报表', icon: '', keepAlive: true }
| }
|
| ]
| },
|
| {
| path: '/sopManager',
| component: Layout,
| redirect: '/sopManager/sopDevice',
| name: 'SOP管理',
| code: '10',
| meta: { code: '10', title: 'SOP管理', icon: 'sop' },
| alwaysShow: true, // 当children只有一个时,也显示父菜单
| children: [
| {
| path: 'sopDevice',
| name: 'SopDevice',
| code: '1001',
| component: () => import('@/views/sopManager/sopDevice'),
| meta: { code: '1001', title: '设备SOP', icon: '', keepAlive: true }
| },
| {
| path: 'sopRoute',
| name: 'SopRoute',
| code: '1002',
| component: () => import('@/views/sopManager/sopRoute'),
| meta: { code: '1002', title: '工艺SOP', icon: '', keepAlive: true }
| }, {
| path: 'sopWorkOrder',
| name: 'SopWorkOrder',
| code: '1003',
| component: () => import('@/views/sopManager/sopWorkOrder'),
| meta: { code: '1003', title: '单据SOP', icon: '', keepAlive: true }
| }
|
| ]
| },
|
| {
| path: '/systemSetting',
| component: Layout,
| redirect: '/systemSetting/encodingRules',
| name: '系统设置',
| code: '08',
| meta: { code: '08', title: '系统设置', icon: 'xtsz' },
| alwaysShow: true, // 当children只有一个时,也显示父菜单
| children: [
| {
| path: 'menuList',
| name: 'MenuList',
| code: '0801',
| component: () => import('@/views/systemSetting/menuList'),
| meta: { code: '0801', title: '菜单管理', icon: '', keepAlive: true }
| },
| {
| path: 'reportList',
| name: 'ReportList',
| code: '0802',
| component: () => import('@/views/systemSetting/encodingRules'),
| meta: { code: '0802', title: '编码规则', icon: '', keepAlive: true }
| },
| {
| path: 'dataImport',
| name: 'DataImport',
| code: '0803',
| component: () => import('@/views/systemSetting/dataImport'),
| meta: { code: '0803', title: '数据导入', icon: '', keepAlive: true }
| },
| {
| path: 'processSetting',
| name: 'ProcessSetting',
| code: '0804',
| component: () => import('@/views/systemSetting/processSetting'),
| meta: { code: '0804', title: '流转设置', icon: '', keepAlive: true }
| }
| ]
| },
|
| {
| path: '/attendanceModule',
| component: Layout,
| redirect: '/attendanceModule/attendanceSettings',
| name: '考勤模块',
| code: '11',
| meta: { code: '11', title: '考勤模块', icon: 'kqmk' },
| alwaysShow: true, // 当children只有一个时,也显示父菜单
| children: [
| {
| path: 'attendanceSettings',
| name: 'AttendanceSettings',
| code: '1101',
| component: () => import('@/views/attendanceModule/attendanceSettings'),
| meta: { code: '1101', title: '考勤设置', icon: '', keepAlive: true }
| },
| {
| path: 'attendanceClockIn',
| name: 'AttendanceClockIn',
| code: '1102',
| component: () => import('@/views/attendanceModule/attendanceClockIn'),
| meta: { code: '1102', title: '考勤打卡', icon: '', keepAlive: true }
| },
| {
| path: 'attendanceRecord',
| name: 'AttendanceRecord',
| code: '1103',
| component: () => import('@/views/attendanceModule/attendanceRecord'),
| meta: { code: '1103', title: '考勤记录', icon: '', keepAlive: true }
| },
| {
| path: 'attendanceDay',
| name: 'AttendanceDay',
| code: '1104',
| component: () => import('@/views/attendanceModule/attendanceDay'),
| meta: { code: '1104', title: '日计时工资', icon: '', keepAlive: true }
| },
| {
| path: 'attendanceMonth',
| name: 'AttendanceMonth',
| code: '1105',
| component: () => import('@/views/attendanceModule/attendanceMonth'),
| meta: { code: '1105', title: '月计时工资', icon: '', keepAlive: true }
| }
|
| ]
| }
|
| ]
|
| const createRouter = () => new Router({
| // mode: 'history', // require service support
| scrollBehavior: () => ({ y: 0 }),
| routes: commonRoutes
| })
|
| const router = createRouter()
|
| // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
| export function resetRouter() {
| const newRouter = createRouter()
| router.matcher = newRouter.matcher // reset router
| }
|
| export default router
|
|