审查视图

src/routes.js 23.3 KB
朱兆平 authored
1 2 3
import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
朱兆平 authored
4
import HomeNew from './views/HomeNew.vue'
王勇 authored
5
import Main from './views/dashboard/index'
6 7 8
// import Table from './views/nav1/Table.vue'
import Role from './views/nav1/role.vue'
import Perm from './views/nav1/perm.vue'
9
import LOG from './views/nav1/Log.vue'
朱兆平 authored
10
import PreManifest from './views/agent/PreManifest.vue'
shenhailong authored
11 12
import Company from './views/nav1/company.vue'
import Department from './views/nav1/department.vue'
13
import Group from './views/nav1/groupcompany.vue'
朱兆平 authored
14 15
import Process from './views/hqpt/Process.vue'
import Job from './views/hqpt/Job.vue'
16
// import Form from './views/nav1/Form.vue'
17
18
19
import OrgManifest from './views/nmms/orgManifest.vue'
20 21 22 23 24 25 26 27
import ExitFlight from './views/nmms/ExitFlight.vue'
import ExitPre from './views/nmms/ExitPre.vue'
import ExitTidy from './views/nmms/ExitTidy.vue'
import ExitArrive from './views/nmms/ExitArrive.vue'
import ExitManifest from './views/nmms/ExitManifest.vue'
import ExitLoading from './views/nmms/ExitLoading.vue'
import ExitFlightDesc from './views/nmms/ExitFlightDesc.vue'
import LostLoad from './views/lostLoadChange/lostLoading.vue'
zhangFan authored
28
import LostLoadChange from './views/lostLoadChange/lostLoadChange.vue'
29 30
import OrigFlightList from './views/nmms_import/OrigFlightList.vue'
import EnterFlightInfo from './views/nmms_import/EnterFlightInfo.vue'
小范 authored
31
import Cross from './views/nmms_import/Cross.vue'
32 33 34 35 36 37 38
import OrigMaster from './views/nmms_import/OrigMaster.vue'
import EnterTally from './views/nmms_import/EnterFlightTally.vue'
import TallyMster from './views/nmms_import/TallyMster.vue'
import Waybill from './views/nmms_import/Waybill.vue'
import AllocateSearch from './views/nmms_import/AllocateSearch.vue'
import Importallocation from './views/nmms_import/Importallocation.vue'
import Allocatearrive from './views/nmms_import/Allocatearrive.vue'
39
import User from './views/nav1/user.vue'
40 41 42 43 44 45 46 47
import preConfiguration from './views/nav2/preConfiguration.vue'
import allocate from './views/nav2/allocate.vue'
import charge from './views/nav2/charge.vue'
import documents from './views/nav2/documents.vue'
import booking from './views/nav4/booking.vue'
import order from './views/nav4/order.vue'
import airlift from './views/nav4/airlift.vue'
import inquiry from './views/nav4/inquiry.vue'
小范 authored
48 49
import Page6 from './views/nav3/Page6.vue'
import Page7 from './views/nav3/Page7.vue'
朱兆平 authored
50 51 52
import importFFMMsg from './views/airRadioMsg/importFFMMsg.vue'
import importFHLMsg from './views/airRadioMsg/importFHLMsg.vue'
import importFWBMsg from './views/airRadioMsg/importFWBMsg.vue'
xudada authored
53
import statis from './views/nmms_import/statistics'
54 55 56


朱兆平 authored
57
import echarts from './views/charts/echarts.vue'
小范 authored
58 59
import earthCharts from './views/charts/earthCharts.vue'
60 61 62
import SecrityInspection from './views/staff/security_inspection.vue'
import Key from './views/staff/key.vue'
import Maintain from './views/staff/maintain.vue'
63 64
import ComeCar from './views/staff/come_car.vue'
import OnDuty from './views/staff/on_duty.vue'
shenhailong authored
65
import WaterStationsPatrol from './views/water/water_stations_patrol.vue'
朱兆平 authored
66
import Location from './views/empt/Location.vue'
朱兆平 authored
67
68 69 70 71 72 73 74 75 76 77 78 79 80 81
//运输工具 通用业务申报
import Route from './views/airtransport/route.vue'
import Bill from './views/airtransport/bill.vue'
import Flight from './views/airtransport/flight.vue'
import Flightplan from './views/airtransport/flightplan.vue'
import Aircraft from './views/airtransport/aircraft.vue'
import Routeaircraft from './views/airtransport/routeaircraft'

//通用业务查询
import queryRoute from './views/airtransport/queryRoute.vue'
import queryBill from './views/airtransport/queryBill.vue'
import queryFlight from './views/airtransport/queryFlight.vue'
import queryFlightplan from './views/airtransport/queryFlightplan.vue'
import queryAircraft from './views/airtransport/queryAircraft.vue'
小范 authored
82 83 84 85
import queryRouteaircraft from './views/airtransport/queryRouteaircraft.vue'
import arrival from './views/airtransport/arrival.vue'
import confirmatory from './views/airtransport/confirmatory.vue'
import queryArrival from './views/airtransport/queryArrival.vue'
小范 authored
86 87
import conForConfigure from './views/airtransport/conForConfigure.vue'
import queryForConfigure from './views/airtransport/queryForConfigure.vue'
小范 authored
88 89 90
import queryConfirmatory from './views/airtransport/queryConfirmatory.vue'
import configure from './views/airtransport/configure.vue'
import queryConfigure from './views/airtransport/queryConfigure.vue'
91
import transit from './views/transit/transit.vue'
小范 authored
92
import technological from './views/technological/technological.vue'
小范 authored
93
import example from './views/technological/example.vue'
小范 authored
94
import task from './views/technological/task.vue'
95 96
import definition from './views/technological/definition.vue'
小范 authored
97
小范 authored
98
小范 authored
99
小范 authored
100 101 102 103 104 105
import departure from './views/airtransport/departure.vue'
import declare from './views/airtransport/declare.vue'
import queryDeparture from './views/airtransport/queryDeparture.vue'
import queryDeclare from './views/airtransport/queryDeclare.vue'
import outConfigure from './views/airtransport/outConfigure.vue'
import queryFlightConfigure from './views/airtransport/queryFlightConfigure.vue'
106 107
import Consigner from './views/consigner/consigner.vue'
import Consignee from './views/consigner/consignee.vue'
108 109
// 货主信息管理
import Shipper from './views/shipper/shipper.vue'
110
import Security from './views/security/security.vue'
小范 authored
111
import dynamics from './views/airtransport/dynamics.vue'
小范 authored
112 113 114
import matter from './views/airtransport/matter.vue'
//国际转运
import transfer from './views/airtransport/transfer.vue'
115
// import transpour from './views/airtransport/transpour.vue'
小范 authored
116
小范 authored
117 118

119 120 121 122 123
// 场站管理
import Yard from './views/station_manage/Yard.vue'
import Bayonet from './views/station_manage/Bayonet.vue'
import Warehouse from './views/station_manage/Warehouse.vue'
124 125
// 快邮舱单申报
import Express from './views/express_system/express.vue'
小范 authored
126 127
//给海龙做的货运单
import Way from './views/nav3/Way.vue'
小范 authored
128 129 130
//朱总让做的网页在线客服
import Webdialog from './views/bus/Webdialog.vue'
小范 authored
131
//转运申请
小范 authored
132
import Transport from './views/nav4/Transport.vue'
133
134 135 136 137 138 139
/* 车辆调度系统 */
import DriverInfo from "./views/dispatch/DriverInfo";
import VehicleInfo from "./views/dispatch/VehicleInfo";
import DispatchNode from "./views/dispatch/DispatchNode";
import Dispatch from "./views/dispatch/Dispatch";
140
141
朱兆平 authored
142 143 144 145
let routes = [
    {
        path: '/login',
        component: Login,
146
        name: '登录',
朱兆平 authored
147 148 149 150 151
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
152
        name: '错误',
朱兆平 authored
153 154 155 156
        hidden: true
    },
    {
        path: '/',
朱兆平 authored
157
        component: HomeNew,
158
        name: '主页',
159 160
        leaf: true,
        iconCls: 'el-icon-menu',
朱兆平 authored
161
        children: [
162
            {path: '/main', component: Main, name: '首页'},
163 164
        ]
    },
朱兆平 authored
165 166
    {
        path: '/',
朱兆平 authored
167
        component: HomeNew,
朱兆平 authored
168 169 170 171 172 173 174 175 176 177
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        children: [
            {path: '/echarts', component: echarts, name: 'echarts'},
            {path: '/earthCharts', component: earthCharts, name: '统计表'}
        ]
    },
    { path: '/test', component: Main },
    {
        path: '/bill',
小范 authored
178
        component: HomeNew,
朱兆平 authored
179 180 181 182 183 184 185
        name: '货运单',
        iconCls: 'el-icon-collection',
        children: [
            {path: '/Way', component: Way, name: '货运单'},
            {path: '/Webdialog', component: Webdialog, name: '在线客服'}
        ]
    },
小范 authored
186 187
    {
        path: '/',
188
        component: HomeNew,
小范 authored
189 190 191 192 193 194 195
        name: '海关货物流转',
        iconCls: 'el-icon-delete-location',
        children: [
            { path: '/Page6', component: Page6, name: '申请列表' },
            { path: '/Page7', component: Page7, name: '申请添加' },
        ]
    },
小范 authored
196 197 198 199 200 201 202 203 204 205 206
    {
        path: '/',
        component: HomeNew,
        name: '车辆调度管理',
        iconCls: 'el-icon-delete-location',
        children: [
            { path: '/Dispatch', component: Dispatch, name: '车辆调度' },
            { path: '/DriverInfo', component: DriverInfo, name: '驾驶员信息' },
            { path: '/VehicleInfo', component: VehicleInfo, name: '车辆信息' },
        ]
    },
207
小范 authored
208 209
    {
        path: '/domdep',
210
        component: HomeNew,
小范 authored
211 212 213 214 215 216
        name: '订舱系统',
        iconCls: 'el-icon-delete-location',
        children: [
            { path: '/booking', component: booking, name: '在线订舱' },
            { path: '/order', component: order, name: '订舱信息' },
            { path: '/airlift', component: airlift, name: '空运专线' },
小范 authored
217 218
        ]
    },
219
小范 authored
220 221 222


223
    // 货运系统--航班预配
小范 authored
224 225
    {
        path: '/domdep',
226
        component: HomeNew,
小范 authored
227 228 229 230 231 232
        name: '国内出港',
        iconCls: 'el-icon-position',
        children: [
            { path: '/preConfiguration', component: preConfiguration, name: '航班预配' },
            { path: '/allocate', component: allocate, name: '航班配载' },
            { path: '/documents', component: documents, name: '航班文件' },
233
            { path: '/charge', component: charge, name: '付费处理' }
小范 authored
234 235
        ]
    },
小范 authored
236 237
    {
        path: '/admin',
朱兆平 authored
238
        component: HomeNew,
小范 authored
239 240
        name: '系统设置',
        iconCls: 'el-icon-setting',//图标样式class
朱兆平 authored
241
        leaf: false,
小范 authored
242 243 244 245 246 247 248 249 250 251
        children: [
            { path: '/user', component: User, name: '用户管理' },
            { path: '/role', component: Role, name: '组织机构' },
            { path: '/perm', component: Perm, name: '权限管理' },
            { path: '/log', component: LOG, name: '系统日志' },
            { path: '/department', component: Department, name: '部门管理' },
            { path: '/company', component: Company, name: '公司管理'},
            { path: '/group', component: Group, name: '集团管理'}
        ]
    },
朱兆平 authored
252 253
    {
        path: '/guestService',
254
        component: HomeNew,
朱兆平 authored
255 256 257 258 259 260 261 262
        name: '客服系统',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/process', component: Process, name: '工单管理' },
            { path: '/job', component: Job, name: '任务管理' },
            {path: '/pre1', component: PreManifest, name: '预配'},
        ]
    },
263 264
    {
        path: '/output',
265
        component: HomeNew,
266
        name: '国际出港业务申报',
267 268
        iconCls: 'el-icon-collection',
        children: [
朱兆平 authored
269 270
            {path: '/flight', component: ExitFlight, name: '出港航班申报'},
            {path: '/manifest', component: ExitManifest, name: '出港运单申报'},
271
            {path: '/pre', component: ExitPre, name: '国际出港预配舱单'},
朱兆平 authored
272 273 274 275
            {path: '/arrive', component: ExitArrive, name: '出港运抵'},
            {path: '/loadingView', component: ExitFlightDesc, name: '出港航班信息'},
            {path: '/loading', component: ExitLoading, name: '出港装载'},
            {path: '/tidy', component: ExitTidy, name: '出港理货'}
276 277 278
        ]
    },
    {
朱兆平 authored
279
        path: '/radioMsgImport',
280
        component: HomeNew,
朱兆平 authored
281 282 283 284 285 286 287 288 289
        name: '航空报文导入',
        iconCls:'el-icon-goods',
        children:[
            {path:'/ffmRadioMsgImport',component:importFFMMsg,name:'FFM报文导入'},
            {path:'/fhlRadioMsgImport',component:importFHLMsg,name:'FHL报文导入'},
            {path:'/fwbRadioMsgImport',component:importFWBMsg,name:'FWB报文导入'}
        ]
    },
    {
290
        path: '/sec',
291
        component: HomeNew,
292
        name: '国际安检清单申报管理',
293 294
        iconCls: 'el-icon-collection',
        children: [
295
            {path: '/security', component: Security, name: '国际安检清单申报'}
296 297
        ]
    },
298
299
    {
300
        path: '/output',
301
        component: HomeNew,
302 303
        name: '国内出港业务申报',
        iconCls: 'el-icon-collection',
304
        children: [
朱兆平 authored
305 306
            {path: '/flight', component: ExitFlight, name: '出港航班申报'},
            {path: '/manifest', component: ExitManifest, name: '出港运单申报'},
307
            {path: '/pre', component: ExitPre, name: '国内出港预配舱单'},
朱兆平 authored
308 309 310 311
            {path: '/arrive', component: ExitArrive, name: '出港运抵'},
            {path: '/loadingView', component: ExitFlightDesc, name: '出港航班信息'},
            {path: '/loading', component: ExitLoading, name: '出港装载'},
            {path: '/tidy', component: ExitTidy, name: '出港理货'}
312 313
        ]
    },
314
    {
shenhailong authored
315
        path: '/output',
shenhailong authored
316
        component: HomeNew,
shenhailong authored
317 318 319
        name: '国内进港业务申报',
        iconCls: 'el-icon-collection',
        children: [
朱兆平 authored
320 321
            {path: '/flight', component: ExitFlight, name: '出港航班申报'},
            {path: '/manifest', component: ExitManifest, name: '出港运单申报'},
shenhailong authored
322
            {path: '/pre', component: ExitPre, name: '国内进港预配舱单'},
朱兆平 authored
323 324 325 326
            {path: '/arrive', component: ExitArrive, name: '出港运抵'},
            {path: '/loadingView', component: ExitFlightDesc, name: '出港航班信息'},
            {path: '/loading', component: ExitLoading, name: '出港装载'},
            {path: '/tidy', component: ExitTidy, name: '出港理货'}
shenhailong authored
327 328 329
        ]
    },
    {
330
        path: '/sec',
331
        component: HomeNew,
332 333
        name: '国内安检清单申报管理',
        iconCls: 'el-icon-collection',
334
        children: [
335
            {path: '/security', component: Security, name: '国内安检清单申报'}
336 337
        ]
    },
338
朱兆平 authored
339 340
    {
        path: '/nmms2',
341
        component: HomeNew,
朱兆平 authored
342 343 344 345 346 347 348
        name: '进港业务申报',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/orig', component: OrigFlightList, name: '进港航班申报' },
            {path:'/waybill',component:Waybill,name:'进港运单申报'},
            {path:'/allocateSearch',component:AllocateSearch,name:'运单分拨申报'},
            { path: '/enter', component: EnterFlightInfo, name: '原始舱单'},
小范 authored
349
            { path: '/cross', component: Cross, name: '进港原始跨天配置'},
朱兆平 authored
350 351 352 353 354
            { path:'/origmaster',component:OrigMaster,name:'进港原始舱单'},
            {path:'/entertall',component:EnterTally,name:'进港理货'},
            {path:'/tallymaster',component:TallyMster,name:'进港理货舱单'},
            {path:'/importallocation',component:Importallocation,name:'进港分拨'},
            {path:'/allocatearrive',component:Allocatearrive,name:'分拨运抵'},
xudada authored
355
            {path:'/statis',component:statis,name:'进港舱单统计'}
朱兆平 authored
356 357
        ]
    },
358
    // 货运系统--航班预配
朱兆平 authored
359 360
    {
        path: '/flight_scheduling',
361
        component: HomeNew,
朱兆平 authored
362 363 364 365 366 367 368 369
        name: '航班计划',
        iconCls: 'el-icon-delete-location',
        children: [
            { path: '/inquiry', component: inquiry, name: '航班计划查询' },
        ]
    },
    {
        path: '/lost',
370
        component: HomeNew,
朱兆平 authored
371 372 373 374
        name: '落装改配申报',
        iconCls:'el-icon-goods',
        children:[
            {path:'/lostLoad',component:LostLoad,name:'落装业务申报'},
小范 authored
375
            {path:'/lostLoadChange',component:LostLoadChange,name:'改配业务申报'},
朱兆平 authored
376 377
        ]
    },
小范 authored
378
    {
小范 authored
379
        path: '/airtransport',
380
        component: HomeNew,
小范 authored
381
        name: '通用业务申报',
382 383
        iconCls:'el-icon-goods',
        children:[
小范 authored
384 385 386 387 388 389
            {path:'/route',component:Route,name:'航线申报'},
            {path:'/bill',component:Bill,name:'单据申报'},
            {path:'/flights',component:Flight,name:'航班申报'},
            {path:'/flightplan',component:Flightplan,name:'当日飞行计划'},
            {path:'/aircraft',component:Aircraft,name:'通用航空器申报'},
            {path:'/routeaircraft',component:Routeaircraft,name:'航线航空器申报'},
小范 authored
390 391
            {path:'/queryForConfigure',component:queryForConfigure,name:'预报申报配置'},
            {path:'/conryForConfigure',component:conForConfigure,name:'确报申报配置'},
小范 authored
392 393 394 395
        ]
    },
    {
        path: '/querytransport',
396
        component: HomeNew,
小范 authored
397 398 399 400 401 402 403 404 405 406 407 408 409
        name: '通用业务查询',
        iconCls:'el-icon-goods',
        children:[
            {path:'/queryRoute',component:queryRoute,name:'航线查询'},
            {path:'/queryBill',component:queryBill,name:'单据查询'},
            {path:'/queryFlights',component:queryFlight,name:'航班查询'},
            {path:'/queryFlightplan',component:queryFlightplan,name:'当日飞行计划查询'},
            {path:'/queryAircraft',component:queryAircraft,name:'通用航空器查询'},
            {path:'/queryRouteaircraft',component:queryRouteaircraft,name:'航线航空器查询'},
        ]
    },
    {
        path: '/input',
410
        component: HomeNew,
小范 authored
411 412 413 414 415 416 417 418 419
        name: '进港航班申报',
        iconCls:'el-icon-goods',
        children:[
            {path:'/arrival',component:arrival,name:'进港预报申报'},
            {path:'/confirmatory',component:confirmatory,name:'进港确报申报'},
            {path:'/queryArrival',component:queryArrival,name:'进港预报查询'},
            {path:'/queryConfirmatory',component:queryConfirmatory,name:'进港确报查询'},
            {path:'/configure',component:configure,name:'进港航班配置'},
            {path:'/queryConfigure',component:queryConfigure,name:'航班配置查询'},
小范 authored
420 421 422


423 424
        ]
    },
朱兆平 authored
425 426
    {
        path: '/con',
shenhailong authored
427
        component: HomeNew,
朱兆平 authored
428 429 430 431 432 433 434 435 436
        name: '收发货人管理',
        iconCls:'el-icon-goods',
        children:[
            {path:'/consigner',component:Consigner,name:'发货人管理'},
            {path:'/consignee',component:Consignee,name:'收货人管理'},
            {path:'/transport',component:Transport,name:'转运申请'},

        ]
    },
小范 authored
437
    {
shenhailong authored
438 439
        path: '/cargo_shipper',
        component: HomeNew,
440
        name: '货主信息管理',
shenhailong authored
441
        iconCls:'el-icon-goods',
442
        children:[
shenhailong authored
443
            {path: '/shipper',component: Shipper,name: '货主信息管理'}
444 445 446
        ]
    },
    {
447
        path: '/',
448
        component: HomeNew,
449 450 451 452 453 454 455
        name: '转关运抵',
        iconCls: 'el-icon-delete-location',
        children: [
            {path:'/transit',component:transit,name:'转关运抵申报'},
        ]
    },
    {
小范 authored
456 457 458 459 460 461
        path: '/workflow',
        component: HomeNew,
        name: '流程管理',
        iconCls: 'el-icon-goods',
        children: [
            {path:'/technological',component:technological,name:'部署管理'},
462
            {path:'/example',component:example,name:'流程实例管理'},
小范 authored
463
            {path:'/task',component:task,name:'任务管理'},
464
            {path:'/definition',component:definition,name:'部署定义管理'},
小范 authored
465
        ]
小范 authored
466
小范 authored
467 468
    },
    {
小范 authored
469
        path: '/out',
470
        component: HomeNew,
小范 authored
471 472 473 474 475 476 477 478 479
        name: '出港航班申报',
        iconCls:'el-icon-goods',
        children:[
            {path:'/departure',component:departure,name:'出港预报申报'},
            {path:'/declare',component:declare,name:'出港确报申报'},
            {path:'/queryDeparture',component:queryDeparture,name:'出港预报查询'},
            {path:'/queryDeclare',component:queryDeclare,name:'出港确报查询'},
            {path:'/outConfigure',component:outConfigure,name:'出港航班配置'},
            {path:'/queryFlightConfigure',component:queryFlightConfigure,name:'航班配置查询'},
小范 authored
480 481

小范 authored
482 483
        ]
    },
小范 authored
484 485
    {
        path: '/at',
486
        component: HomeNew,
小范 authored
487 488 489 490
        name: '在港动态',
        iconCls:'el-icon-goods',
        children:[
            {path:'/dynamics',component:dynamics,name:'在港动态信息'},
小范 authored
491 492 493 494 495 496 497 498 499 500
            {path:'/matter',component:matter,name:'物料申报管理'}
        ]
    },
    {
        path: '/',
        component: HomeNew,
        name: '国际转运',
        iconCls:'el-icon-goods',
        children:[
            {path:'/transfer',component:transfer,name:'国际转运'},
501
            // {path:'/transpour',component:transpour,name:'转运导入'}
小范 authored
502
小范 authored
503 504
        ]
    },
朱兆平 authored
505 506
    {
        path: '/express-system',
507
        component: HomeNew,
朱兆平 authored
508 509 510 511 512 513 514 515 516
        name: '快邮舱单申报',
        iconCls:'el-icon-wind-power',
        children:[
            {path:'/express',component:Express,name:'快邮舱单申报'},
        ]
    },

    {
        path: '/',
517
        component: HomeNew,
朱兆平 authored
518 519 520 521 522 523 524 525
        name: '场站管理',
        iconCls: 'el-icon-setting',//图标样式class
        children: [
            {path: '/yard', component: Yard, name: '场站管理'},
            {path: '/bayonet', component: Bayonet, name: '卡口管理'},
            {path: '/warehouse', component: Warehouse, name: '仓库管理'},
        ]
    },
526 527 528 529 530 531 532 533 534 535 536 537 538
    {
        path: '/',
        component: Home,
        name: '车辆调度管理',
        iconCls: 'el-icon-truck',
        children: [
            {path: '/dispatch', component: Dispatch, name: '车辆调度'},
            {path: '/dispatchNode', component: DispatchNode, name: '调度记录'},
            {path: '/vehicleInfo', component: VehicleInfo, name: '车辆信息'},
            {path: '/driverInfo', component: DriverInfo, name: '驾驶员信息'},
            // {path: '/companyInfo', component: CompanyInfo, name: '公司信息'},
        ]
    },
539
朱兆平 authored
540 541
    {
        path: '/empt',
542
        component: HomeNew,
朱兆平 authored
543 544 545 546
        name: '能源管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/location', component: Location, name: '能源缴费' },
小范 authored
547
朱兆平 authored
548 549 550 551
        ]
    },
    {
        path: '/satff',
552
        component: HomeNew,
朱兆平 authored
553 554 555 556 557 558 559 560 561 562 563 564
        name: '生活保障部门',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/security_inspection', component: SecrityInspection, name: '职工公寓安全巡视管理' },
            { path: '/key', component: Key, name: '职工公寓备用钥匙使用登记管理' },
            { path: '/maintain', component: Maintain, name: '职工公寓设施设备维修记录管理' },
            { path: '/come_car', component: ComeCar, name: '职工公寓外来人员车辆登记管理' },
            { path: '/on_duty', component: OnDuty, name: '职工公寓值班巡视记录管理' },
        ]
    },
    {
        path: '/water_heating_chamber',
565
        component: HomeNew,
朱兆平 authored
566 567 568 569 570
        name: '水暖室',
        iconCls: 'fa fa-address-card',
        // leaf: true,//只有一个节点
        children: [
            { path: '/water_stations_patrol', component: WaterStationsPatrol, name: '二水厂-水站巡视记录单管理' },
朱兆平 authored
571 572 573 574
            { path: '/page6', component: Page6, name: '水质量检测' },
            { path: '/page6', component: Page6, name: '污水站' },
            { path: '/page6', component: Page6, name: '一水厂' },
            { path: '/page6', component: Page6, name: '综合楼空调站' },
朱兆平 authored
575 576 577 578 579 580 581 582
        ]
    },

    {
        path: '*',
        hidden: true,
        redirect: {path: '/404'}
    }
朱兆平 authored
583
];
584
let initRouters = routes.concat();
585 586
let setUserMenus = function (list) {
    routes = list;
587 588 589 590 591
}
/**
 * 处理登陆后的账号对应的菜单
 * @param menuList
 */
592
let handleMenuList = function (router, menu) {
593 594 595 596 597 598 599 600 601 602 603 604
    var _self = this;
    var routerName = "";
    router.forEach(function (v_router) {
        routerName = v_router.name;
        menu.forEach(function (v_menu) {
            //查找返回的目录列表是否包含路由名称,有就返回匹配到的元素,没有就移除
            let result = menu.find(item => {
                return item.name === routerName;
            });

            //匹配到继续判断是否子元素,有子元素继续递归
            if (result) {
605 606
                if (v_router.children) {
                    _self.handleMenuList(v_router.children, result.children);
607 608
                }
                //没有则可以移除
609 610
            } else {
                router.splice(router.findIndex(itm => itm.name === routerName), 1);
611 612 613
            }
        })
    });
614 615
}
export default {
616
    routes, setUserMenus, handleMenuList, initRouters
617
};