You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

403 lines
8.6 KiB

import Vue from 'vue'
import Router from 'vue-router'
/* Layout */
import Layout from '@/layout'
Vue.use(Router)
/* 所有角色可以访问/没有权限要求的基页 */
export const constantRoutes = [
{
path: '/redirect',
component: Layout,
hidden: true,
children: [{
path: '/redirect/:path(.*)',
component: () => import('@/views/redirect/index.vue')
}]
},
{
path: '/',
redirect: 'index'
},
{
path: '/login',
component: () => import('@/views/login/login.vue')
},
{
path: '/home',
component: () => import('@/views/Home/Home.vue'),
name: 'home'
}, {
path: '/index',
component: Layout,
redirect: '/index',
children: [{
path: '/index',
component: () =>
import('@/views/index.vue'),
name: 'index',
meta: {
title: '主页',
noCache: true,
affix: true
}
}]
},
// 1厂商管理
{
path: '/changshang',
component: Layout,
redirect: '/changshang',
meta: {
title: '厂商管理',
},
children: [
{
path: '/changshang/changshangguanli',
component: () =>
import('@/views/changshang/changshangguanli/changshangguanli.vue'),
name: 'changshangguanli',
meta: {
title: '厂商管理',
noCache: true,
}
},
]
},
// 2品牌管理
{
path: '/pinpai',
component: Layout,
redirect: '/pinpai',
meta: {
title: '品牌管理'
},
children: [
{
path: '/pinpai/pinpaiguanli',
component: () =>
import('@/views/pinpai/pinpaiguanli/pinpaiguanli.vue'),
name: 'pinpaiguanli',
meta: {
title: '品牌管理',
noCache: true,
}
},
{
path: '/pinpai/pinpaiAdd/:id',
component: () =>
import('@/views/pinpai/pinpaiguanli/pinpaiAdd.vue'),
name: 'pinpaiAdd',
hidden: true,
meta: {
title: '品牌管理',
noCache: true,
}
},
{
path: '/pinpai/pinpaiInfo',
component: () =>
import('@/views/pinpai/pinpaiguanli/pinpaiInfo.vue'),
name: 'pinpaiInfo',
hidden: true,
meta: {
title: '品牌详情',
noCache: true,
}
},
{
path: '/pinpai/pinpaiDaoru',
component: () =>
import('@/views/pinpai/pinpaidaoru/pinpaiDaoru.vue'),
name: 'pinpaiDaoru',
hidden: true,
meta: {
title: '导入品牌'
}
}
]
},
// 4经销商管理
{
path: '/jingxiaoshang',
component: Layout,
redirect: '/jingxiaoshang',
meta: {
title: '经销商管理'
},
children: [
{
path: '/jingxiaoshang/jingxiaoshangguanli',
component: () =>
import('@/views/jingxiaoshang/jingxiaoshangguanli/jingxiaoshangguanli.vue'),
name: 'jingxiaoshangguanli',
meta: {
title: '经销商管理',
noCache: true,
}
},
{
path: '/jingxiaoshang/jingxiaoshangAdd',
component: () =>
import('@/views/jingxiaoshang/jingxiaoshangguanli/jingxiaoshangAdd.vue'),
name: 'jingxiaoshangAdd',
hidden: true,
meta: {
title: '经销商添加',
noCache: true,
}
},
{
path: '/jingxiaoshang/jingxiaoshangEdit/:id',
component: () =>
import('@/views/jingxiaoshang/jingxiaoshangguanli/jingxiaoshangEdit.vue'),
name: 'jingxiaoshangEdit',
hidden: true,
meta: {
title: '经销商修改',
noCache: true,
}
},
{
path: '/jingxiaoshang/jingxiaoshangInfo/:sid',
component: () =>
import('@/views/jingxiaoshang/jingxiaoshangguanli/jingxiaoshangInfo.vue'),
name: 'jingxiaoshangInfo',
hidden: true,
meta: {
title: '经销商详情',
noCache: true,
}
}
// {
// path: '/jingxiaoshang/addcomponents/beianzhanghaoForm',
// component: () =>
// import('@/views/jingxiaoshang/addcomponents/beianzhanghaoForm.vue'),
// name: 'beianzhanghaoForm',
// hidden: true,
// meta: {
// title: '备案账号添加'
// }
// }
//
]
},
// 5挂靠公司 现已改为经销商
{
path: '/guakaogongsi',
component: Layout,
redirect: '/guakaogongsi',
meta: {
title: '经销商'
},
children: [
{
path: '/guakaogongsi/guakaogongsiguanli',
component: () =>
import('@/views/guakaogongsi/guakaogongsiguanli/guakaogongsiguanli.vue'),
name: 'guakaogongsiguanli',
meta: {
title: '经销商',
noCache: true,
}
},
// {
// path: '/guakaogongsi/guakaogongsiAdd/:id',
// component: () =>
// import('@/views/guakaogongsi/guakaogongsiguanli/guakaogongsiAdd.vue'),
// name: 'guakaogongsiAdd',
// hidden: true,
// meta: {
// title: '挂靠公司添加'
// }
// },
// {
// path: '/guakaogongsi/guakaogongsiInfo',
// component: () =>
// import('@/views/guakaogongsi/guakaogongsiguanli/guakaogongsiInfo.vue'),
// name: 'guakaogongsiInfo',
// hidden: true,
// meta: {
// title: '挂靠公司详情'
// }
// },
{
path: '/guakaogongsi/renwu',
component: () =>
import('@/views/guakaogongsi/renwu/renwu.vue'),
name: 'renwu',
hidden: true,
meta: {
title: '任务'
}
},
{
path: '/guakaogongsi/renwuchuli',
component: () =>
import('@/views/guakaogongsi/renwu/renwuchuli.vue'),
name: 'renwuchuli',
hidden: true,
meta: {
title: '任务处理'
}
}
]
},
// 6资方管理
{
path: '/zifang',
component: Layout,
redirect: '/zifang',
meta: {
title: '资方管理'
},
children: [
{
path: '/zifang/zifangguanli',
component: () =>
import('@/views/zifang/zifangguanli/zifangguanli.vue'),
name: 'zifangguanli',
meta: {
title: '资方信息管理',
noCache: true,
}
},
{
path: '/zifang/zifangguanliAdd/:id',
component: () =>
import('@/views/zifang/zifangguanli/zifangguanliAdd.vue'),
name: 'zifangguanliAdd',
hidden: true,
meta: {
title: '资方信息添加',
noCache: true,
}
},
{
path: '/zifang/zifangguanliInfo',
component: () =>
import('@/views/zifang/zifangguanli/zifangguanliInfo.vue'),
name: 'zifangguanliInfo',
hidden: true,
meta: {
title: '资方信息详细信息',
noCache: true,
}
},
{
path: '/zifang/zifangzhengce',
component: () =>
import('@/views/zifang/zifangzhengce/zifangzhengce.vue'),
name: 'zifangzhengce',
meta: {
title: '资方政策管理',
noCache: true,
}
},
{
path: '/zifang/zifangzhengceAdd/:id',
component: () =>
import('@/views/zifang/zifangzhengce/zifangzhengceAdd.vue'),
name: 'zifangzhengceAdd',
hidden: true,
meta: {
title: '资方政策添加',
noCache: true,
}
},
{
path: '/zifang/zifangzhengceInfo',
component: () =>
import('@/views/zifang/zifangzhengce/zifangzhengceInfo.vue'),
name: 'zifangzhengceInfo',
hidden: true,
meta: {
title: '资方政策详细信息',
noCache: true,
}
}
]
},
// 7、中介人员
{
path: '/zhongjie',
component: Layout,
redirect: '/zhongjie',
meta: {
title: '中介人员',
},
children: [
{
path: '/zhongjie/zhongjierenyuan',
component: () =>
import('@/views/zhongjierenyuan/zhongjierenyuan.vue'),
name: 'zhongjierenyuan',
meta: {
title: '中介人员',
noCache: true,
}
},
]
},
// 资料清单
{
path: '/fileList',
component: Layout,
redirect: '/fileList/index',
meta: {
title: '资料清单'
},
children: [{
path: '/fileList/index',
component: () => import('@/views/fileList/fileList.vue'),
name: 'fileList',
meta: { title: '资料清单',noCache: true, }
}]
},
// 8、采购系统
{
path: '/caigouxitong',
component: Layout,
redirect: '/caigouxitong',
meta: { title: '采购系统' },
children: [
{
path: '/caigouxitong/purchasingsystem',
component: () =>
import('@/views/caigouxitong/purchasingsystem.vue'),
name: 'PurchasingSystem',
meta: { title: '采购系统', noCache: true }
}
]
},
{
path: '/404',
component: () =>
import('@/views/404'),
hidden: true
}
// 404 page must be placed at the end !!!
// { path: '*', redirect: '/404', hidden: true }
]
const createRouter = () => new Router({
// mode: 'history', // require service support
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
})
const router = createRouter()
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
const newRouter = createRouter()
router.matcher = newRouter.matcher // reset router
}
export default router