作者 shenhailong

Revert "给小范上传 一下我这边的routes文件"

This reverts commit 58de4bba.

# Conflicts:
#	src/routes.js
#	src/views/Home.vue
... ... @@ -23,10 +23,9 @@ var axois_init = {
// 直接丢sessionStorage
if (!sessionStorage.getItem("token")) {
// 若是接口访问的时候没有发现有鉴权的基础信息,直接返回登录页
// router.push({
// // path: "/login"
// path: "/main"
// });
router.push({
path: "/login"
});
}
// 下面是接口回调的satus ,因为我做了一些错误页面,所以都会指向对应的报错页面
... ... @@ -87,20 +86,20 @@ var axois_init = {
init_router: (router,axios) => {
router.beforeEach((to, from, next) => {
//NProgress.start();
// if (to.path == '/login') {
// sessionStorage.removeItem('user');
// sessionStorage.removeItem('menu');
// sessionStorage.removeItem('token');
// }else{
// let user = JSON.parse(sessionStorage.getItem('user'));
// if(sessionStorage.getItem('token')){
// axios.defaults.headers.common['Authorization'] = sessionStorage.getItem('token');
// }
//
// if (!jsutil.checkNull(user) && to.path != '/login' && !sessionStorage.getItem('menu') && !sessionStorage.getItem('token')) {
// next({ path: '/login' })
// }
// }
if (to.path == '/login') {
sessionStorage.removeItem('user');
sessionStorage.removeItem('menu');
sessionStorage.removeItem('token');
}else{
let user = JSON.parse(sessionStorage.getItem('user'));
if(sessionStorage.getItem('token')){
axios.defaults.headers.common['Authorization'] = sessionStorage.getItem('token');
}
if (!jsutil.checkNull(user) && to.path != '/login' && !sessionStorage.getItem('menu') && !sessionStorage.getItem('token')) {
next({ path: '/login' })
}
}
next()
});
}
... ...
... ... @@ -126,181 +126,207 @@ let routes = [
},
// { path: '/test', component: Main },
{
path: '/',
component: Home,
name: '海关货物流转',
iconCls: 'el-icon-delete-location',
children: [
{ path: '/Page6', component: Page6, name: '申请列表' },
{ path: '/Page7', component: Page7, name: '申请添加' },
]
},
{
path: '/domdep',
component: Home,
name: '订舱系统',
iconCls: 'el-icon-delete-location',
children: [
// {
// path: '/',
// component: Home,
// name: '海关货物流转',
// iconCls: 'el-icon-delete-location',
// children: [
// { path: '/Page6', component: Page6, name: '申请列表' },
// { path: '/Page7', component: Page7, name: '申请添加' },
// ]
// },
//
// {
// path: '/domdep',
// component: Home,
// name: '订舱系统',
// iconCls: 'el-icon-delete-location',
// children: [
// { path: '/booking', component: booking, name: '在线订舱' },
{ path: '/order', component: order, name: '订舱信息' },
{ path: '/airlift', component: airlift, name: '空运专线' },
]
},
// { path: '/order', component: order, name: '订舱信息' },
// { path: '/airlift', component: airlift, name: '空运专线' },
// ]
// },
// 货运系统--航班预配
{
path: '/domdep',
component: Home,
name: '国内出港',
iconCls: 'el-icon-position',
children: [
{ path: '/preConfiguration', component: preConfiguration, name: '航班预配' },
{ path: '/allocate', component: allocate, name: '航班配载' },
{ path: '/documents', component: documents, name: '航班文件' },
{ path: '/charge', component: charge, name: '付费处理' },
// {
// path: '/domdep',
// component: Home,
// name: '国内出港',
// iconCls: 'el-icon-position',
// children: [
// { path: '/preConfiguration', component: preConfiguration, name: '航班预配' },
// { path: '/allocate', component: allocate, name: '航班配载' },
// { path: '/documents', component: documents, name: '航班文件' },
// { path: '/charge', component: charge, 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: '集团管理'}
// ]
// },
// {
// path: '/admin',
// component: Home,
// name: '系统设置',
// iconCls: 'el-icon-setting',//图标样式class
// 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: '集团管理'}
]
},
{
path: '/admin',
component: Home,
name: '系统设置',
iconCls: 'el-icon-setting',//图标样式class
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: '集团管理'}
]
},
{
path: '/guestService',
component: Home,
name: '客服系统',
iconCls: 'fa fa-id-card-o',
children: [
{ path: '/process', component: Process, name: '工单管理' },
{ path: '/job', component: Job, name: '任务管理' },
{path: '/pre1', component: PreManifest, name: '预配'},
]
},
// ]
// },
// {
// path: '/guestService',
// component: Home,
// name: '客服系统',
// iconCls: 'fa fa-id-card-o',
// children: [
// { path: '/process', component: Process, name: '工单管理' },
// { path: '/job', component: Job, name: '任务管理' },
// {path: '/pre1', component: PreManifest, name: '预配'},
// ]
// },
{
path: '/output',
component: Home,
name: '出港业务申报',
name: '国际出港业务申报',
iconCls: 'el-icon-collection',
children: [
{path: '/flight', component: ExitFlight, name: '出港航班申报'},
{path: '/manifest', component: ExitManifest, name: '出港运单申报'},
{path: '/pre', component: ExitPre, name: '出港预配舱单'},
{path: '/arrive', component: ExitArrive, name: '出港运抵'},
{path: '/loadingView', component: ExitFlightDesc, name: '出港航班信息'},
{path: '/loading', component: ExitLoading, name: '出港装载'},
{path: '/tidy', component: ExitTidy, name: '出港理货'}
// {path: '/flight', component: ExitFlight, name: '出港航班申报'},
// {path: '/manifest', component: ExitManifest, name: '出港运单申报'},
{path: '/pre', component: ExitPre, name: '国际出港预配舱单'},
// {path: '/arrive', component: ExitArrive, name: '出港运抵'},
// {path: '/loadingView', component: ExitFlightDesc, name: '出港航班信息'},
// {path: '/loading', component: ExitLoading, name: '出港装载'},
// {path: '/tidy', component: ExitTidy, name: '出港理货'}
]
},
{
path: '/sec',
component: Home,
name: '安检清单申报管理',
name: '国际安检清单申报管理',
iconCls: 'el-icon-collection',
children: [
{path: '/security', component: Security, name: '安检清单申报'}
{path: '/security', component: Security, name: '国际安检清单申报'}
]
},
{
path: '/nmms2',
path: '/output',
component: Home,
name: '进港业务申报',
iconCls: 'fa fa-id-card-o',
name: '国内出港业务申报',
iconCls: 'el-icon-collection',
children: [
{ path: '/orig', component: OrigFlightList, name: '进港航班申报' },
{path:'/waybill',component:Waybill,name:'进港运单申报'},
{path:'/allocateSearch',component:AllocateSearch,name:'运单分拨申报'},
{ path: '/enter', component: EnterFlightInfo, name: '原始舱单'},
{ 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:'分拨运抵'},
// {path: '/flight', component: ExitFlight, name: '出港航班申报'},
// {path: '/manifest', component: ExitManifest, name: '出港运单申报'},
{path: '/pre', component: ExitPre, name: '国内出港预配舱单'},
// {path: '/arrive', component: ExitArrive, name: '出港运抵'},
// {path: '/loadingView', component: ExitFlightDesc, name: '出港航班信息'},
// {path: '/loading', component: ExitLoading, name: '出港装载'},
// {path: '/tidy', component: ExitTidy, name: '出港理货'}
]
},
// 货运系统--航班预配
{
path: '/flight_scheduling',
path: '/sec',
component: Home,
name: '航班计划',
iconCls: 'el-icon-delete-location',
name: '国内安检清单申报管理',
iconCls: 'el-icon-collection',
children: [
{ path: '/inquiry', component: inquiry, name: '航班计划查询' },
{path: '/security', component: Security, name: '国内安检清单申报'}
]
},
{
path: '/lost',
component: Home,
name: '落装改配申报',
iconCls:'el-icon-goods',
children:[
{path:'/lostLoad',component:LostLoad,name:'落装业务申报'},
{path:'/lostLoadChange',component:LostLoadChange,name:'改配业务申报'}
]
},
{
path: '/airtransport',
component: Home,
name: '通用业务申报',
iconCls:'el-icon-goods',
children:[
{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:'航线航空器申报'},
]
},
{
path: '/querytransport',
component: Home,
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',
component: Home,
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:'航班配置查询'},
]
},
// {
// path: '/nmms2',
// component: Home,
// 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: '原始舱单'},
// { 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:'分拨运抵'},
// ]
// },
// 货运系统--航班预配
// {
// path: '/flight_scheduling',
// component: Home,
// name: '航班计划',
// iconCls: 'el-icon-delete-location',
// children: [
// { path: '/inquiry', component: inquiry, name: '航班计划查询' },
// ]
// },
// {
// path: '/lost',
// component: Home,
// name: '落装改配申报',
// iconCls:'el-icon-goods',
// children:[
// {path:'/lostLoad',component:LostLoad,name:'落装业务申报'},
// {path:'/lostLoadChange',component:LostLoadChange,name:'改配业务申报'}
//
// ]
// },
// {
// path: '/airtransport',
// component: Home,
// name: '通用业务申报',
// iconCls:'el-icon-goods',
// children:[
// {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:'航线航空器申报'},
// ]
// },
// {
// path: '/querytransport',
// component: Home,
// 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',
// component: Home,
// 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:'航班配置查询'},
// ]
// },
{
path: '/con',
component: Home,
... ... @@ -311,20 +337,20 @@ let routes = [
{path:'/consignee',component:Consignee,name:'收货人管理'},
]
},
{
path: '/out',
component: Home,
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:'航班配置查询'},
]
},
// {
// path: '/out',
// component: Home,
// 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:'航班配置查询'},
// ]
// },
{
path: '/express-system',
... ... @@ -336,69 +362,69 @@ let routes = [
]
},
{
path: '/',
component: Home,
name: '场站管理',
iconCls: 'el-icon-setting',//图标样式class
children: [
{path: '/yard', component: Yard, name: '场站管理'},
{path: '/bayonet', component: Bayonet, name: '卡口管理'},
{path: '/warehouse', component: Warehouse, name: '仓库管理'},
]
},
{
path: '/empt',
component: Home,
name: '能源管理',
iconCls: 'fa fa-id-card-o',
children: [
{ path: '/location', component: Location, name: '能源缴费' },
]
},
{
path: '/satff',
component: Home,
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',
component: Home,
name: '水暖室',
iconCls: 'fa fa-address-card',
// leaf: true,//只有一个节点
children: [
{ path: '/water_stations_patrol', component: WaterStationsPatrol, name: '二水厂-水站巡视记录单管理' },
// { path: '/page6', component: Page6, name: '水质量检测' },
// { path: '/page6', component: Page6, name: '污水站' },
// { path: '/page6', component: Page6, name: '一水厂' },
// { path: '/page6', component: Page6, name: '综合楼空调站' },
]
},
{
path: '/',
component: Home,
name: 'Charts',
iconCls: 'fa fa-bar-chart',
children: [
{path: '/echarts', component: echarts, name: 'echarts'}
]
},
{
path: '*',
hidden: true,
redirect: {path: '/404'}
}
// {
// path: '/',
// component: Home,
// name: '场站管理',
// iconCls: 'el-icon-setting',//图标样式class
// children: [
// {path: '/yard', component: Yard, name: '场站管理'},
// {path: '/bayonet', component: Bayonet, name: '卡口管理'},
// {path: '/warehouse', component: Warehouse, name: '仓库管理'},
// ]
// },
//
// {
// path: '/empt',
// component: Home,
// name: '能源管理',
// iconCls: 'fa fa-id-card-o',
// children: [
// { path: '/location', component: Location, name: '能源缴费' },
//
// ]
// },
// {
// path: '/satff',
// component: Home,
// 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',
// component: Home,
// name: '水暖室',
// iconCls: 'fa fa-address-card',
// // leaf: true,//只有一个节点
// children: [
// { path: '/water_stations_patrol', component: WaterStationsPatrol, name: '二水厂-水站巡视记录单管理' },
// // { path: '/page6', component: Page6, name: '水质量检测' },
// // { path: '/page6', component: Page6, name: '污水站' },
// // { path: '/page6', component: Page6, name: '一水厂' },
// // { path: '/page6', component: Page6, name: '综合楼空调站' },
// ]
// },
// {
// path: '/',
// component: Home,
// name: 'Charts',
// iconCls: 'fa fa-bar-chart',
// children: [
// {path: '/echarts', component: echarts, name: 'echarts'}
// ]
// },
// {
// path: '*',
// hidden: true,
// redirect: {path: '/404'}
// }
];
let initRouters = routes.concat();
let setUserMenus = function (list) {
... ...