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