@@ -5,7 +5,6 @@ import Layout from '@/layout'
55
66Vue . use ( Router )
77
8-
98/**
109 * constantRoutes
1110 * a base page that does not have permission requirements
@@ -32,7 +31,7 @@ export const constantRoutes = [
3231 path : 'dashboard' ,
3332 name : '首页' ,
3433 component : ( ) => import ( '@/views/dashboard/index' ) ,
35- meta : { title : '首页' , icon : 'dashboard' }
34+ meta : { title : '首页' , icon : 'dashboard' }
3635 } ]
3736 } ,
3837 {
@@ -43,75 +42,75 @@ export const constantRoutes = [
4342 path : '' ,
4443 name : '应用' ,
4544 component : ( ) => import ( '@/views/app/index' ) ,
46- meta : { title : '应用' , icon : 'app' } ,
45+ meta : { title : '应用' , icon : 'app' }
4746 } ,
4847 {
4948 path : 'create' ,
5049 name : '创建应用' ,
5150 component : ( ) => import ( '@/views/app/create' ) ,
52- meta : { title : '创建应用' , icon : 'app' } ,
51+ meta : { title : '创建应用' , icon : 'app' } ,
5352 hidden : true
5453 } ,
5554 {
5655 path : ':id' ,
5756 name : 'AppDetail' ,
5857 component : ( ) => import ( '@/views/app/appDetail' ) ,
5958 hidden : true
60- } ,
59+ }
6160 ]
6261 } ,
6362 {
6463 path : '/identity' ,
6564 component : Layout ,
6665 redirect : '/identity/enterprise' ,
6766 name : '身份源管理' ,
68- meta : { title : '身份源管理' , icon : 'identity' } ,
67+ meta : { title : '身份源管理' , icon : 'identity' } ,
6968 children : [
7069 {
7170 path : 'enterprise' ,
7271 name : '企业身份源' ,
7372 component : ( ) => import ( '@/views/identity/enterprise/index' ) ,
74- meta : { title : '企业身份源' , icon : 'enterprise' }
73+ meta : { title : '企业身份源' , icon : 'enterprise' }
7574 } ,
7675 {
7776 path : 'create' ,
7877 name : '创建身份源' ,
7978 component : ( ) => import ( '@/views/identity/enterprise/create' ) ,
8079 hidden : true ,
81- meta : { title : '创建身份源' }
80+ meta : { title : '创建身份源' }
8281 } ,
8382 {
8483 path : 'social' ,
8584 name : '社会身份源' ,
8685 component : ( ) => import ( '@/views/identity/social/index' ) ,
87- meta : { title : '社会身份源' , icon : 'social' }
88- } ,
86+ meta : { title : '社会身份源' , icon : 'social' }
87+ }
8988 ]
9089 } ,
9190 {
9291 path : '/userManagement' ,
9392 component : Layout ,
9493 redirect : '/userManagement/user' ,
9594 name : '用户管理' ,
96- meta : { title : '用户管理' , icon : 'user-manage' } ,
95+ meta : { title : '用户管理' , icon : 'user-manage' } ,
9796 children : [
9897 {
9998 path : 'user' ,
10099 name : '用户' ,
101100 component : ( ) => import ( '@/views/userManagement/user' ) ,
102- meta : { title : '用户' , icon : 'user' }
101+ meta : { title : '用户' , icon : 'user' }
103102 } ,
104103 {
105104 path : 'userGroup' ,
106105 name : '用户组' ,
107106 component : ( ) => import ( '@/views/userManagement/userGroup' ) ,
108- meta : { title : '用户组' , icon : 'user-group' }
107+ meta : { title : '用户组' , icon : 'user-group' }
109108 } ,
110109 {
111110 path : 'role' ,
112111 name : '角色' ,
113112 component : ( ) => import ( '@/views/userManagement/role' ) ,
114- meta : { title : '角色' , icon : 'role' }
113+ meta : { title : '角色' , icon : 'role' }
115114 }
116115 ]
117116 } ,
@@ -120,23 +119,56 @@ export const constantRoutes = [
120119 component : Layout ,
121120 redirect : '/permissionManagement/' ,
122121 name : '权限管理' ,
123- meta : { title : '权限管理' , icon : 'identity' } ,
122+ meta : { title : '权限管理' , icon : 'identity' } ,
124123 children : [
125124 {
126- path : 'generalResource' ,
127- name : '常规资源' ,
128- component : ( ) => import ( '@/views/permission/generalResource/index' ) ,
129- meta : { title : '常规资源' , icon : 'ui' }
125+ path : 'generalResource' ,
126+ name : '常规资源' ,
127+ component : ( ) => import ( '@/views/permission/generalResource/index' ) ,
128+ meta : { title : '常规资源' , icon : 'ui' }
130129 } ,
131130 {
132131 path : 'apiResource' ,
133132 name : 'API资源' ,
134133 component : ( ) => import ( '@/views/permission/apiResource/index' ) ,
135- meta : { title : 'API资源' , icon : 'api' }
136- } ,
134+ meta : { title : 'API资源' , icon : 'api' }
135+ }
137136
138137 ]
139138 } ,
139+ {
140+ path : '/security' ,
141+ component : Layout ,
142+ redirect : '/security/' ,
143+ name : '安全' ,
144+ meta : { title : '安全' , icon : 'security' } ,
145+ children : [
146+ {
147+ path : 'attackProtection' ,
148+ name : '攻击防护' ,
149+ component : ( ) => import ( '@/views/security/attackProtection/index' ) ,
150+ meta : { title : '攻击防护' , icon : 'attackProtection' }
151+ } ,
152+ {
153+ path : 'mfa' ,
154+ name : '多因素身份认证' ,
155+ component : ( ) => import ( '@/views/security/mfa/index' ) ,
156+ meta : { title : '多因素身份认证' , icon : 'MFA' }
157+ } ,
158+ {
159+ path : 'securityPolicy' ,
160+ name : '登陆验证策略' ,
161+ component : ( ) => import ( '@/views/security/securityPolicy/index' ) ,
162+ meta : { title : '登陆验证策略' , icon : 'securityPolicy' }
163+ } ,
164+ {
165+ path : 'passwordPolicy' ,
166+ name : '密码策略' ,
167+ component : ( ) => import ( '@/views/security/passwordPolicy/index' ) ,
168+ meta : { title : '密码策略' , icon : 'passwordPolicy' }
169+ }
170+ ]
171+ } ,
140172 {
141173 path : '/auditLog' ,
142174 component : Layout ,
@@ -145,18 +177,17 @@ export const constantRoutes = [
145177 path : '' ,
146178 name : '审计日志' ,
147179 component : ( ) => import ( '@/views/auditLog/index' ) ,
148- meta : { title : '审计日志' , icon : 'log' }
180+ meta : { title : '审计日志' , icon : 'log' }
149181 } ]
150182 } ,
151183
152-
153184 // 404 page must be placed at the end !!!
154- { path : '*' , redirect : '/404' , hidden : true }
185+ { path : '*' , redirect : '/404' , hidden : true }
155186]
156187
157188const createRouter = ( ) => new Router ( {
158189 // mode: 'history', // require service support
159- scrollBehavior : ( ) => ( { y : 0 } ) ,
190+ scrollBehavior : ( ) => ( { y : 0 } ) ,
160191 routes : constantRoutes
161192} )
162193
0 commit comments