first
This commit is contained in:
119
src/router/index.js
Normal file
119
src/router/index.js
Normal file
@ -0,0 +1,119 @@
|
||||
import Vue from "vue";
|
||||
import VueRouter from "vue-router";
|
||||
Vue.use(VueRouter);
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/index'
|
||||
},
|
||||
{
|
||||
path: '/index',
|
||||
name: 'toDoList',
|
||||
component: () => import('@/views/index/toDoList'),
|
||||
meta:{
|
||||
title: '代办事项',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/reporting",
|
||||
name: 'reportingView',
|
||||
component: () => import('@/views/index/reporting.vue'),
|
||||
meta: {
|
||||
title: '报备'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/workOrderDetail",
|
||||
name: 'workOrderDetail',
|
||||
component: () => import('@/views/index/workOrderDetail'),
|
||||
meta: {
|
||||
title: '工单详情'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/supplySettlement",
|
||||
name: 'supplySettlement',
|
||||
component: () => import('@/views/index/supplySettlement'),
|
||||
meta: {
|
||||
title: '补结算单'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/accounting",
|
||||
name: 'accountingView',
|
||||
component: () => import('@/views/index/accounting'),
|
||||
meta: {
|
||||
title: '记账'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/reAccounting",
|
||||
name: 'reAccountingView',
|
||||
component: () => import('@/views/index/reAccounting'),
|
||||
meta: {
|
||||
title: '重新记账'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/invoicingNotify",
|
||||
name: 'invoicingNotify',
|
||||
component: () => import('@/views/index/invoicingNotify.vue'),
|
||||
meta: {
|
||||
title: '开票通知'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/invoicingDetail",
|
||||
name: 'invoicingDetail',
|
||||
component: () => import('@/views/index/invoicingDetail'),
|
||||
meta: {
|
||||
title: '开票通知详情'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/carManage",
|
||||
name: 'carManage',
|
||||
component: () => import('@/views/index/carManage'),
|
||||
meta: {
|
||||
title: '车辆管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/vehicleAdd",
|
||||
name: 'vehicleAdd',
|
||||
component: () => import('@/views/index/vehicleAdd'),
|
||||
meta: {
|
||||
title: '车辆新增或修改'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/driverManage',
|
||||
name: 'driverManage',
|
||||
component:()=>import('@/views/index/driverManage'),
|
||||
meta:{
|
||||
title: '司机管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/driverAdd',
|
||||
name: 'driverAdd',
|
||||
component:()=>import('@/views/index/driverAdd'),
|
||||
meta: {
|
||||
name:'司机新增或修改'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
// base: process.env.BASE_URL,
|
||||
routes
|
||||
})
|
||||
router.beforeEach(function (to, form, next) {
|
||||
if (to.meta.title) {
|
||||
document.title = to.meta.title
|
||||
}
|
||||
next()
|
||||
})
|
||||
export default router
|
Reference in New Issue
Block a user