index.js
5.81 KB
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
import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
export const constantRouterMap = [
{
path: "/",
name: "首页",
component: resolve => require(["../views/Layout/index.vue"], resolve),
redirect: "/trficcshow",
children: [
{
path: "/trficcshow",
name: "交通展示",
component: resolve =>
require(["../views/trafficShow/index.vue"], resolve)
},
{
path: "/behaviorshow",
name: "综治展示",
component: resolve =>
require(["../views/behaviorShow/index.vue"], resolve)
}
]
},
{
path: "/login",
name: "login",
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: resolve => require(["../views/Login.vue"], resolve)
},
{
path: "/show",
name: "show",
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: resolve => require(["../views/Show.vue"], resolve)
}
];
export const asyncRouterMap = [
{
path: "/video_task",
name: "任务管理",
component: resolve => require(["../views/Layout/index.vue"], resolve),
meta: {
icon: "el-icon-location"
},
children: [
{
path: "/video_task/config",
name: "场景设置",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/sceneManage/index.vue"], resolve)
},
{
path: "/video_task/manage",
name: "任务设置",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/taskManage/index.vue"], resolve)
}
]
},
{
path: "/search",
name: "智能检索",
component: resolve => require(["../views/Layout/index.vue"], resolve),
meta: {
icon: "el-icon-location"
},
children: [
{
path: "/search/vehicle",
name: "车辆检索",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/search/vehicleSearch.vue"], resolve)
},
{
path: "/search/xcycle",
name: "非机动车检索",
meta: {
icon: "el-icon-user"
},
component: resolve => require(["../views/search/xcycle.vue"], resolve)
},
{
path: "/search/pedestrian",
name: "行人检索",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/search/pedestrian.vue"], resolve)
},
{
path: "/search/event",
name: "事件查询",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/search/event.vue"], resolve)
},
{
path: "/search/illegal",
name: "违法记录查询",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/search/illegal.vue"], resolve)
},
{
path: "/search/traficflow",
name: "交通流量",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/search/traficflow.vue"], resolve),
},{
path: "/search/flow",
name: "公共客流",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/search/publicFlow.vue"], resolve),
}
]
},
{
path: "/resource",
name: "资源管理",
component: resolve => require(["../views/Layout/index.vue"], resolve),
meta: {
icon: "el-icon-location"
},
children: [
{
path: "/resource/video",
name: "视频设备",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/videoEquipment.vue"], resolve),
},
{
path: "/resource/equipment",
name: "分析设备",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/analysis.vue"], resolve),
},
{
path: "/resource/store_confs",
name: "存储配置",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/store_confs.vue"], resolve),
},
{
path: "/resource/codes",
name: "字典管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/Codes/codes.vue"], resolve),
},
]
},{
path: "/ops",
name: "系统运维",
component: resolve => require(["../views/Layout/index.vue"], resolve),
meta: {
icon: "el-icon-location"
},
children: [
{
path: "/ops/equipment_manage",
name: "设备管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/equipment_manage"], resolve),
},{
path: "/ops/user_manage",
name: "用户管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/user_manage.vue"], resolve),
},{
path: "/ops/role_manage",
name: "角色管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/role_manage.vue"], resolve),
},{
path: "/ops/batch_upgrade",
name: "批量升级",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/log_manage.vue"], resolve),
},{
path: "/ops/log_manage",
name: "日志管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/log_manage.vue"], resolve),
}
]
}
];
const router = new VueRouter({
// mode: "history",
// base: process.env.BASE_URL,
routes: constantRouterMap
});
export default router;