@@ -21,6 +21,8 @@ const Layout = () => import('../views/layout/Layout')
21
21
icon: 'svg-name' the icon show in the sidebar,
22
22
}
23
23
**/
24
+ const Super = 'Super Administrator'
25
+ const Admin = 'Admin'
24
26
25
27
// 基础路由
26
28
const routeBase = [
@@ -53,28 +55,28 @@ const routeManage = [
53
55
component : Layout ,
54
56
redirect : '/api_excel/index' ,
55
57
name : 'Excel-List' ,
56
- meta : { title : '批量测试管理' , icon : 'ico-table' } ,
58
+ meta : { title : '批量测试管理' , icon : 'ico-table' , role : Admin } ,
57
59
children : [
58
60
{ path : '/api_excel/edit/:id' , name : 'EditExcel' , component : ( ) => import ( '@/views/api_excel/edit' ) , hidden : true } ,
59
61
{
60
62
path : '/api_excel/add' ,
61
63
name : 'AddExcel' ,
62
64
component : ( ) => import ( '@/views/api_excel/add' ) ,
63
- meta : { title : '上传测试' , icon : 'excel' }
65
+ meta : { title : '上传测试' , icon : 'excel' , role : Admin }
64
66
} ,
65
67
{
66
68
path : '/api_excel/index' ,
67
69
name : 'Excel' ,
68
70
component : ( ) => import ( '@/views/api_excel/index' ) ,
69
- meta : { title : '测试管理' , icon : 'ico-aliyun' }
71
+ meta : { title : '测试管理' , icon : 'ico-aliyun' , role : Admin }
70
72
} ,
71
73
{ path : '/api_param/add' , name : 'AddApiParam' , component : ( ) => import ( '@/views/api_param/add' ) , hidden : true } ,
72
74
{ path : '/api_param/edit/:id' , name : 'EditApiParam' , component : ( ) => import ( '@/views/api_param/edit' ) , hidden : true } ,
73
75
{
74
76
path : '/api_param/index' ,
75
77
name : 'ApiParam' ,
76
78
component : ( ) => import ( '@/views/api_param/index' ) ,
77
- meta : { title : '接口列表' , icon : 'api' }
79
+ meta : { title : '接口列表' , icon : 'api' , role : Admin }
78
80
}
79
81
]
80
82
}
@@ -88,31 +90,31 @@ const routerAdmin = [
88
90
component : Layout ,
89
91
redirect : '/category/index' ,
90
92
name : 'Category-Nav' ,
91
- meta : { title : '栏目菜单' , icon : 'category' } ,
93
+ meta : { title : '栏目菜单' , icon : 'category' , role : Super } ,
92
94
children : [
93
95
{ path : '/category/add' , name : 'AddCategory' , component : ( ) => import ( '@/views/category/add' ) , meta : { title : '添加栏目' } , hidden : true } ,
94
96
{ path : '/category/edit/:id' , name : 'EditCategory' , component : ( ) => import ( '@/views/category/edit' ) , hidden : true } ,
95
97
{
96
98
path : '/category/index' ,
97
99
name : 'Category' ,
98
100
component : ( ) => import ( '@/views/category/index' ) ,
99
- meta : { title : '栏目管理' , icon : 'ico-category' }
101
+ meta : { title : '栏目管理' , icon : 'ico-category' , role : Super }
100
102
} ,
101
103
{ path : '/nav/add' , name : 'AddNav' , component : ( ) => import ( '@/views/nav/add' ) , hidden : true } ,
102
104
{ path : '/nav/edit/:id' , name : 'EditNav' , component : ( ) => import ( '@/views/nav/edit' ) , hidden : true } ,
103
105
{
104
106
path : '/nav' ,
105
107
name : 'Nav' ,
106
108
component : ( ) => import ( '@/views/nav' ) ,
107
- meta : { title : '导航管理' , icon : 'nav' }
109
+ meta : { title : '导航管理' , icon : 'nav' , role : Super }
108
110
} ,
109
111
{ path : '/tag/add' , name : 'AddTag' , component : ( ) => import ( '@/views/tag/add' ) , meta : { title : '添加标签' } , hidden : true } ,
110
112
{ path : '/tag/edit/:id' , name : 'EditTag' , component : ( ) => import ( '@/views/tag/edit' ) , hidden : true } ,
111
113
{
112
114
path : '/tag' ,
113
115
name : 'Tag' ,
114
116
component : ( ) => import ( '@/views/tag/index' ) ,
115
- meta : { title : '标签列表' , icon : 'tag' }
117
+ meta : { title : '标签列表' , icon : 'tag' , role : Super }
116
118
}
117
119
]
118
120
} ,
@@ -122,20 +124,20 @@ const routerAdmin = [
122
124
component : Layout ,
123
125
// redirect: '/article',
124
126
name : 'Article-List' ,
125
- meta : { title : '文章管理' , icon : 'article' } ,
127
+ meta : { title : '文章管理' , icon : 'article' , role : Super } ,
126
128
children : [
127
129
{ path : '/article/edit/:id' , name : 'EditArticle' , component : ( ) => import ( '@/views/article/edit' ) , hidden : true } ,
128
130
{
129
131
path : '/article/index' ,
130
132
name : 'Article' ,
131
133
component : ( ) => import ( '@/views/article/index' ) ,
132
- meta : { title : '文章管理' , icon : 'ico-article' }
134
+ meta : { title : '文章管理' , icon : 'ico-article' , role : Super }
133
135
} ,
134
136
{
135
137
path : '/article/add' ,
136
138
name : 'AddArticle' ,
137
139
component : ( ) => import ( '@/views/article/add' ) ,
138
- meta : { title : '添加文章' , icon : 'add' }
140
+ meta : { title : '添加文章' , icon : 'add' , role : Super }
139
141
}
140
142
]
141
143
} ,
@@ -145,7 +147,7 @@ const routerAdmin = [
145
147
component : Layout ,
146
148
redirect : '/task' ,
147
149
name : '公交' ,
148
- meta : { title : '公交管理' , icon : 'bus' } ,
150
+ meta : { title : '公交管理' , icon : 'bus' , role : Super } ,
149
151
children : [
150
152
{ path : '/task/search' , name : 'search' , component : ( ) => import ( '@/views/task/search' ) , hidden : true } ,
151
153
{ path : '/task/newBus' , name : 'NewBus' , component : ( ) => import ( '@/views/task/newBus' ) , hidden : true } ,
@@ -154,27 +156,27 @@ const routerAdmin = [
154
156
path : '/task' ,
155
157
name : '定时任务' ,
156
158
component : ( ) => import ( '@/views/task/index' ) ,
157
- meta : { title : '定时任务' , icon : 'task' }
159
+ meta : { title : '定时任务' , icon : 'task' , role : Super }
158
160
} ,
159
161
{ path : 'lines/add' , name : 'linesAdd' , component : ( ) => import ( '@/views/lines/add' ) , hidden : true } ,
160
162
{ path : 'lines/edit/:id' , name : 'linesEdit' , component : ( ) => import ( '@/views/lines/edit' ) , hidden : true } ,
161
163
{
162
164
path : 'lines' ,
163
165
name : '公交列表' ,
164
166
component : ( ) => import ( '@/views/lines/index' ) ,
165
- meta : { title : '公交列表' , icon : 'table' }
167
+ meta : { title : '公交列表' , icon : 'table' , role : Super }
166
168
} ,
167
169
{
168
170
path : 'config' ,
169
171
name : '配置管理' ,
170
172
component : ( ) => import ( '@/views/lines/index' ) ,
171
- meta : { title : '配置列表' , icon : 'table' }
173
+ meta : { title : '配置列表' , icon : 'table' , role : Super }
172
174
} ,
173
175
{
174
176
path : 'tree' ,
175
177
name : 'Tree' ,
176
178
component : ( ) => import ( '@/views/tree/index' ) ,
177
- meta : { title : 'Tree' , icon : 'tree' } ,
179
+ meta : { title : 'Tree' , icon : 'tree' , role : Super } ,
178
180
hidden : true
179
181
}
180
182
]
@@ -185,7 +187,7 @@ const routerAdmin = [
185
187
component : Layout ,
186
188
redirect : '/user' ,
187
189
name : '权限' ,
188
- meta : { title : '权限管理' , icon : 'auth' } ,
190
+ meta : { title : '权限管理' , icon : 'auth' , role : Super } ,
189
191
children : [
190
192
{ path : 'index' , name : 'userIndex' , component : ( ) => import ( '@/views/user/index' ) , hidden : true } ,
191
193
{ path : 'password' , name : 'userPassword' , component : ( ) => import ( '@/views/user/password' ) , hidden : true } ,
@@ -195,15 +197,15 @@ const routerAdmin = [
195
197
path : '/user' ,
196
198
name : '用户管理' ,
197
199
component : ( ) => import ( '@/views/user/index' ) ,
198
- meta : { title : '用户列表' , icon : 'user' }
200
+ meta : { title : '用户列表' , icon : 'user' , role : Super }
199
201
} ,
200
202
{ path : '/permission/add' , name : 'AddPermission' , component : ( ) => import ( '@/views/permission/add' ) , hidden : true } ,
201
203
{ path : '/permission/edit/:id' , name : 'EditPermission' , component : ( ) => import ( '@/views/permission/edit' ) , hidden : true } ,
202
204
{
203
205
path : '/permission' ,
204
206
name : '权限列表' ,
205
207
component : ( ) => import ( '@/views/permission/index' ) ,
206
- meta : { title : '权限列表' , icon : 'permission' }
208
+ meta : { title : '权限列表' , icon : 'permission' , role : Super }
207
209
} ,
208
210
209
211
{ path : '/role/add' , name : 'AddRole' , component : ( ) => import ( '@/views/role/add' ) , hidden : true } ,
@@ -212,7 +214,7 @@ const routerAdmin = [
212
214
path : '/role' ,
213
215
name : '角色管理' ,
214
216
component : ( ) => import ( '@/views/role/index' ) ,
215
- meta : { title : '角色管理' , icon : 'role' }
217
+ meta : { title : '角色管理' , icon : 'role' , role : Super }
216
218
}
217
219
]
218
220
}
0 commit comments