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
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
import Vue from 'vue'
import Router from 'vue-router'
// 主界面
import TheLayout from '@/pages/layout/TheLayout.vue'
import login from '@/pages/login/login.vue'
import register from '@/pages/login/register.vue'
import TopologicalGraphShow from '@/components/TopologyView/TopologicalGraphShow.vue'
import ServiceStatusUpdate from '@/components/TopologyView/ServiceStatusUpdate.vue'
// 配置管理
import BasicConfigurationManagement from '@/components/ConfigurationManagement/BasicConfigurationManagement/BasicConfigurationManagement.vue'
import SubnetConfigurationManagement from '@/components/TopologyManagement/SubnetConfigurationManagement/SubnetConfigurationManagement.vue'
import LocationConfigurationManagement from '@/components/ConfigurationManagement/LocationConfigurationManagement/LocationConfigurationManagement.vue'
import CabinetConfigurationManagement from '@/components/ConfigurationManagement/CabinetConfigurationManagement/CabinetConfigurationManagement.vue'
import DeviceCreatPort from '@/components/TopologyManagement/DeviceConfigurationManagement/DeviceCreatPort.vue'
// import shuxing from '@/components/TopologyManagement/shuxing/shuxing.vue'
import tuoputu from '@/components/TopologyManagement/tuoputu/tuoputu.vue'
// 资源管理
import ElementDiscoveryTemplateManagement from '@/components/ResourceManagement/ElementDiscoveryTemplateManagement.vue'
import DeviceManagement from '@/components/ResourceManagement/DeviceManagement.vue'
import BookManagement from '@/components/ResourceManagement/BookManagement.vue'
import ElementDiscoveryManagement from '@/components/ResourceManagement/ElementDiscoveryManagement.vue'
// 设备管理
//component:resolve => require([],resolve)
import DeviceConfigurationManagement from '@/components/TopologyManagement/DeviceConfigurationManagement/DeviceConfigurationManagement.vue'
import LinkConfigurationManagement from '@/components/TopologyManagement/LinkConfigurationManagement/LinkConfigurationManagement.vue'
import lianlu from '@/components/TopologyManagement/LinkConfigurationManagement/lianlu.vue'//g链路
import ManualStartDeviceConfiguration from '@/components/ManualStartDeviceConfiguration/ManualStartDeviceConfiguration.vue'
import TraditionDeviceConfigurationManagement from '@/components/TopologyManagement/TraditionDeviceConfigurationManagement/TraditionDeviceConfigurationManagement.vue'
import FirmWareConfigurationManagement from '@/components/TopologyManagement/DeviceConfigurationManagement/FirmWareConfigurationManagement.vue'
// 业务管理
import ServiceTypeConfigurationManagement from '@/components/BusinessManagement/ServiceTypeConfigurationManagement.vue'
import CDPProfile from '@/components/BusinessManagement/CDPProfile.vue'
import EveSubnetConfigurationManagementFather from '@/components/BusinessManagement/EveSubnetConfigurationManagementFather.vue'
import EthernetELineServiceConfigurationManagementFather from '@/components/BusinessManagement/EthernetELineServiceConfigurationManagementFather.vue'
import EveModelConfigurationManagement from '@/components/BusinessManagement/EveModelConfigurationManagement.vue'
import EveModelConfigurationManagementFather from '@/components/BusinessManagement/EveModelConfigurationManagementFather.vue'
import NetworkPhysicsLinkConfigurationManagement from '@/components/BusinessManagement/NetworkPhysicsLinkConfigurationManagement.vue'
import TopologicalDynamicConfiguration from '@/components/BusinessManagement/TopologicalDynamicConfiguration.vue'
// 告警管理
import AlarmConfigManagement from '@/components/AlarmManagement/AlarmConfigManagement.vue'
import AlarmLevelManagement from '@/components/AlarmManagement/AlarmLevelManagement.vue'
import AlarmFilerManagement from '@/components/AlarmManagement/AlarmFilerManagement.vue'
import AlarmQuery from '@/components/AlarmManagement/AlarmQuery.vue'
import AlarmStatistics from '@/components/AlarmManagement/AlarmStatistics.vue'
import EventOperation from '@/components/AlarmManagement/EventOperation.vue'
import AlarmReports from '@/components/AlarmManagement/AlarmReports.vue'
import AlarmMangExp from '@/components/AlarmManagement/AlarmMangExp.vue'
// 性能管理
import PerformanceMonitor from '@/components/PerformanceManagement/PerformanceMonitor.vue'
import PerformanceDataQuery from '@/components/PerformanceManagement/PerformanceDataQuery.vue'
import PerformanceStatistics from '@/components/PerformanceManagement/PerformanceStatistics.vue'
import PerformanceReports from '@/components/PerformanceManagement/PerformanceReports.vue'
import RtPerformance from '@/components/PerformanceManagement/RtPerformance.vue'
import TopNPerformanceReport from '@/components/PerformanceManagement/TopNPerformanceReport.vue'
// 性能管理new
import PerformanceThreshold from '@/components/PerformanceManagement/PerformanceThreshold.vue'
import IndexTemplate from '@/components/PerformanceManagement/IndexTemplate.vue'
import CollectTask from '@/components/PerformanceManagement/CollectTask.vue'
import TaskDetail from '@/components/PerformanceManagement/TaskDetail.vue'
// 报表管理
import ReportTemplateManagement from '@/components/StatementManagement/ReportTemplateManagement.vue'
import AlarmDistributionStatisticReport from '@/components/StatementManagement/AlarmDistributionStatisticReport.vue'
import AlarmTrendStatisticReport from '@/components/StatementManagement/AlarmTrendStatisticReport.vue'
import AlarmTopBottomStatisticReport from '@/components/StatementManagement/AlarmTopBottomStatisticReport.vue'
import PerformDistributionStatisticReport from '@/components/StatementManagement/PerformDistributionStatisticReport.vue'
import PerformTrendStatisticReport from '@/components/StatementManagement/PerformTrendStatisticReport.vue'
import PerformTopBottomStatisticReport from '@/components/StatementManagement/PerformTopBottomStatisticReport.vue'
import ReportTask from '@/components/StatementManagement/ReportTask.vue'
import PeriodReport from '@/components/StatementManagement/PeriodReport.vue'
// 安全管理
import AuthorityManagement from '@/components/SafeManagement/AuthorityManagement.vue'
import UserManagement from '@/components/SafeManagement/UserManagement.vue'
import LoginLogManagement from '@/components/SafeManagement/LoginLogManagement.vue'
import OperationLogManagement from '@/components/SafeManagement/OperationLogManagement.vue'
import ModifyPersonalInfo from '@/components/SafeManagement/ModifyPersonalInfo.vue'
// 监控助手
import DatabaseMonitor from '@/components/SafeManagement/DatabaseMonitor.vue'
// 数据维护
import DataSafeGuard from '@/components/DataSafe/DataSafeGuard.vue'
import SnapShot from '@/components/DataSafe/SnapShot.vue'
// 在线帮助
import TheOnlineHelp from '../components/TheOnlineHelp/TheOnlineHelp'
import About from '../components/TheOnlineHelp/AboutInformation'
Vue.use(Router)
/* 免登录白名单页面 */
const whiteList = [
'/',
'/login',
'/register'
]
const routes = [
{
path: '/',
name: 'login',
component: login
},
{
path: '/TheLayout',
redirect: '/TheLayout/main'
},
{
path: '/TheLayout',
name: 'TheLayout',
meta: {
requireAuth: true // 添加该字段,表示进入这个路由是需要登录的
},
component: TheLayout,
children: [
{
path: 'main',
name: '拓扑图',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.topologyShow'
},
component:resolve => require(['@/components/TopologyView/TopologicalGraphShow.vue'],resolve)
//'@/components/TopologyView/TopologicalGraphShow.vue'
},
{
path: 'ServiceStatusUpdate',
name: '业务状态更新',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.serviceStatusUpdate'
},
component: ServiceStatusUpdate
},
{
path: 'BasicConfigurationManagement',
name: '服务器配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.basicConfigurationManagement'
},
component: BasicConfigurationManagement
},
{
path: 'ElementDiscoveryTemplateManagement',
name: '网元发现模板管理',
meta: {
requireAuth: true,
title: 'TheLayoutHeader.elementDiscoveryTemplateManagement'
},
component: ElementDiscoveryTemplateManagement
},
{
path: 'ElementDiscoveryManagement',
name: '网元发现',
meta: {
requireAuth: true,
title: 'TheLayoutHeader.elementDiscoveryManagement'
},
component: ElementDiscoveryManagement
},
{
path: 'DeviceManagement',
name: '网元管理',
meta: {
requireAuth: true,
title: 'TheLayoutHeader.elementManagement'
},
component: DeviceManagement
},
{
path: 'BookManagement',
name: '网元台账管理',
meta: {
requireAuth: true,
title: 'TheLayoutHeader.BookManagement'
},
component: BookManagement
},
{
path: 'SubnetConfigurationManagement',
name: '子网配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.subnetConfigurationManagement'
},
component: SubnetConfigurationManagement
},
{
path: 'LocationConfigurationManagement',
name: '机房配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.locationConfigurationManagement'
},
component: LocationConfigurationManagement
},
{
path: 'CabinetConfigurationManagement',
name: '机架配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.cabinetConfigurationManagement'
},
component: CabinetConfigurationManagement
},
{
path: 'DeviceCreatPort',
name: '接入业务配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.deviceCreatPort'
},
component: DeviceCreatPort
},
{
path: 'shuxing',
name: 'g区域管理',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'g区域管理'
},
component:resolve => require(['@/components/TopologyManagement/shuxing/shuxing.vue'],resolve)
},
{
path: 'tuoputu',
name: 'g拓扑图',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'g拓扑图'
},
component: tuoputu
},
{
path: 'DeviceConfigurationManagement',
name: '网元配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.deviceConfigurationManagement'
},
component: DeviceConfigurationManagement
},
{
path: 'LinkConfigurationManagement',
name: '链路配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.linkConfigurationManagement'
},
component: LinkConfigurationManagement
},
{
path: 'lianlu',
name: '链路管理',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'g链路管理'
},
component: lianlu
},
{
path: 'ManualStartDeviceConfiguration',
name: '网元配置文件管理',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.manualStartDeviceConfiguration'
},
component: ManualStartDeviceConfiguration
},
{
path: 'TraditionDeviceConfigurationManagement',
name: '设备发现',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.tradDeviceManagement'
},
component: TraditionDeviceConfigurationManagement
},
{
path: 'FirmWareConfigurationManagement',
name: '固件配置',
meta: {
requireAuth: true,
title: 'TheLayoutHeader.firmWareConfigurationManagement'
},
component: FirmWareConfigurationManagement
},
{
path: 'TopologicalDynamicConfiguration',
name: '拓扑动态配置',
meta: {
requireAuth: true,
title: 'TheLayoutHeader.topologicalDynamicConfiguration'
},
component: TopologicalDynamicConfiguration
},
{
path: 'ServiceTypeConfigurationManagement',
name: '业务类型配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.serviceTypeConfigurationManagement'
},
component: ServiceTypeConfigurationManagement
},
{
path: 'CDPProfile',
name: 'QoS配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.CDPProfile'
},
component: CDPProfile
},
{
path: 'EveSubnetConfigurationManagementFather',
name: '业务子网配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.EveSubnetConfigurationManagement'
},
component: EveSubnetConfigurationManagementFather
},
{
path: 'EthernetELineServiceConfigurationManagementFather',
name: 'eline业务配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.ethernetELineServiceConfigurationManagement'
},
component: EthernetELineServiceConfigurationManagementFather
},
{
path: 'EveModelConfigurationManagement',
name: '业务模板配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.serviceTemplateConfiguration'
},
component: EveModelConfigurationManagement
},
{
path: 'NetworkPhysicsLinkConfigurationManagement',
name: '网络物理连接配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.NetworkPhysicsLinkConfigurationManagement'
},
component: NetworkPhysicsLinkConfigurationManagement
},
{
path: 'EveModelConfigurationManagementFather',
name: '业务模板配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.serviceTemplateConfiguration'
},
component: EveModelConfigurationManagementFather
},
{
path: 'AlarmLevelManagement',
name: '告警类型配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.alarmTypeConfiguration'
},
component: AlarmLevelManagement
},
{
path: 'AlarmConfigManagement',
name: '告警等级配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.alarmLevelConfiguration'
},
component: AlarmConfigManagement
},
{
path: 'AlarmFilerManagement',
name: '告警过滤配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.alarmFilterConfiguration'
},
component: AlarmFilerManagement
},
{
path: 'AlarmQuery',
name: '告警查询',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.alarmQuery'
},
component: AlarmQuery
},
{
path: 'AlarmStatistics',
name: '告警统计',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.alarmStatistics'
},
component: AlarmStatistics
},
{
path: 'EventOperation',
name: '事件查询',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.eventQuery'
},
component: EventOperation
},
{
path: 'AlarmReports',
name: '告警报表',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.alarmReports'
},
component: AlarmReports
},
{
path: 'AlarmMangExp',
name: '告警经验维护',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.AlarmMangExp'
},
component: AlarmMangExp
},
{
path: 'PerformanceMonitor',
name: '性能配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.performanceConfiguration'
},
component: PerformanceMonitor
},
{
path: 'PerformanceThreshold',
name: '性能门限管理',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.performanceThreshold'
},
component: PerformanceThreshold
},
{
path: 'IndexTemplate',
name: '指标模板管理',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.IndexTemplate'
},
component: IndexTemplate
},
{
path: 'CollectTask',
name: '采集任务管理',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.CollectTask'
},
component: CollectTask
},
{
path: 'TaskDetail',
name: '任务详情',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.TaskDetail'
},
component: TaskDetail
},
{
path: 'PerformanceDataQuery',
name: '性能查询',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.performanceQuery'
},
component: PerformanceDataQuery
},
{
path: 'PerformanceStatistics',
name: '性能统计',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.performanceStatistics'
},
component: PerformanceStatistics
},
{
path: 'RtPerformance',
name: '实时性能',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.rtPerformance'
},
component: RtPerformance
},
{
path: 'PerformanceReports',
name: '性能报表',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.performanceReports'
},
component: PerformanceReports
},
{
path: 'TopNPerformanceReport',
name: 'TopN性能查询',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.TopNPerformanceReport'
},
component: TopNPerformanceReport
},
{
path: 'ReportTemplateManagement',
name: '报表模板管理',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.ReportTemplateManagement'
},
component: ReportTemplateManagement
},
{
path: 'AlarmDistributionStatisticReport',
name: '告警分布统计报表',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.AlarmDistributionStatisticReport'
},
component: AlarmDistributionStatisticReport
},
{
path: 'AlarmTrendStatisticReport',
name: '告警趋势统计报表',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.AlarmTrendStatisticReport'
},
component: AlarmTrendStatisticReport
},
{
path: 'AlarmTopBottomStatisticReport',
name: '告警TOP/BOTTOM N统计报表',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.AlarmTopBottomStatisticReport'
},
component: AlarmTopBottomStatisticReport
},
{
path: 'PerformDistributionStatisticReport',
name: '性能分布统计报表',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.PerformDistributionStatisticReport'
},
component: PerformDistributionStatisticReport
},
{
path: 'PerformTrendStatisticReport',
name: '性能趋势统计报表',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.PerformTrendStatisticReport'
},
component: PerformTrendStatisticReport
},
{
path: 'PerformTopBottomStatisticReport',
name: '性能TOP/BOTTOM N统计报表',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.PerformTopBottomStatisticReport'
},
component: PerformTopBottomStatisticReport
},
{
path: 'ReportTask',
name: '报表任务',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.ReportTask'
},
component: ReportTask
},
{
path: 'PeriodReport',
name: '周期报表',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.PeriodReport'
},
component: PeriodReport
},
{
path: 'AuthorityManagement',
name: '用户组权限配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.userGroupAuthorityConfiguration'
},
component: AuthorityManagement
},
{
path: 'UserManagement',
name: '用户配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.userConfiguration'
},
component: UserManagement
},
{
path: 'LoginLogManagement',
name: '登录日志查询',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.loginLogQuery'
},
component: LoginLogManagement
},
{
path: 'OperationLogManagement',
name: '操作日志查询',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.optionLogQuery'
},
component: OperationLogManagement
},
{
path: 'ModifyPersonalInfo',
name: '登录用户配置',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.modifyUserInfo'
},
component: ModifyPersonalInfo
},
{
path: 'DataSafeGuard',
name: '数据安全维护',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.dataSafeGuard'
},
component: DataSafeGuard
},
{
path: 'SnapShot',
name: '快照管理',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.snapShot'
},
component: SnapShot
},
{
path: 'DatabaseMonitor',
name: '数据库监控',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.databaseMonitor'
},
component: DatabaseMonitor
},
{
path: 'TheOnlineHelp',
name: '在线帮助',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.theOnlineHelpPage'
},
component: TheOnlineHelp
},
{
path: 'About',
name: '关于',
meta: {
requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
title: 'TheLayoutHeader.aboutInformation'
},
component: About
}
]
}
]
const router = new Router({
routes
})
router.beforeEach((to, from, next) => {
/* 免登录页面 */
if (whiteList.indexOf(to.fullPath) >= 0) {
return next()
}
if (to.meta.requireAuth) { // 判断该路由是否需要登录权限
if (to.params.token !== undefined) {
return next()
}
if (window.sessionStorage.getItem('token') !== null) { // 通过vuex state获取当前的token是否存在
next()
} else {
// TODO:登录界面应为/login
next({
path: '/',
query: {redirect: to.fullPath} // 将跳转的路由path作为参数,登录成功后跳转到该路由
})
}
} else {
next()
}
})
export default router