|
@@ -11,40 +11,41 @@ const companyRouter = {
|
|
component: () => import('@/views/common/Base'),
|
|
component: () => import('@/views/common/Base'),
|
|
redirect: '/home',
|
|
redirect: '/home',
|
|
children: [{
|
|
children: [{
|
|
- path: '/home',
|
|
|
|
- name: 'home',
|
|
|
|
- meta: {
|
|
|
|
- icon: 'icon-shouye',
|
|
|
|
- title: '首页'
|
|
|
|
- },
|
|
|
|
- component: () => import('@/views/page/Home'),
|
|
|
|
- },
|
|
|
|
- // {
|
|
|
|
- // path: '/UserManagement',
|
|
|
|
- // name: 'UserManagement',
|
|
|
|
- // meta: {
|
|
|
|
- // icon: 'icon-yonghuguanli',
|
|
|
|
- // title: '用户管理'
|
|
|
|
- // },
|
|
|
|
- // component: () => import('@/views/system/UserManagement'),
|
|
|
|
- // },
|
|
|
|
- {
|
|
|
|
- path: '/interiorUserManagement',
|
|
|
|
- name: 'interiorUserManagement',
|
|
|
|
- meta: {
|
|
|
|
- icon: 'icon-yonghuguanli',
|
|
|
|
- title: '用户管理'
|
|
|
|
- },
|
|
|
|
- component: () => import('@/views/system/interiorUserManagement'),
|
|
|
|
- }, {
|
|
|
|
- path: '/CompanyManagement',
|
|
|
|
- name: 'CompanyManagement',
|
|
|
|
- meta: {
|
|
|
|
- icon: 'icon-gongsi',
|
|
|
|
- title: '公司管理'
|
|
|
|
|
|
+ path: '/home',
|
|
|
|
+ name: 'home',
|
|
|
|
+ meta: {
|
|
|
|
+ icon: 'icon-shouye',
|
|
|
|
+ title: '首页'
|
|
|
|
+ },
|
|
|
|
+ component: () => import('@/views/page/Home'),
|
|
},
|
|
},
|
|
- component: () => import('@/views/system/CompanyManagement'),
|
|
|
|
- }]
|
|
|
|
|
|
+ // {
|
|
|
|
+ // path: '/UserManagement',
|
|
|
|
+ // name: 'UserManagement',
|
|
|
|
+ // meta: {
|
|
|
|
+ // icon: 'icon-yonghuguanli',
|
|
|
|
+ // title: '用户管理'
|
|
|
|
+ // },
|
|
|
|
+ // component: () => import('@/views/system/UserManagement'),
|
|
|
|
+ // },
|
|
|
|
+ {
|
|
|
|
+ path: '/interiorUserManagement',
|
|
|
|
+ name: 'interiorUserManagement',
|
|
|
|
+ meta: {
|
|
|
|
+ icon: 'icon-yonghuguanli',
|
|
|
|
+ title: '用户管理'
|
|
|
|
+ },
|
|
|
|
+ component: () => import('@/views/system/interiorUserManagement'),
|
|
|
|
+ }, {
|
|
|
|
+ path: '/CompanyManagement',
|
|
|
|
+ name: 'CompanyManagement',
|
|
|
|
+ meta: {
|
|
|
|
+ icon: 'icon-gongsi',
|
|
|
|
+ title: '公司管理'
|
|
|
|
+ },
|
|
|
|
+ component: () => import('@/views/system/CompanyManagement'),
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
const clientRouter = {
|
|
const clientRouter = {
|
|
name: 'index',
|
|
name: 'index',
|
|
@@ -61,6 +62,15 @@ const clientRouter = {
|
|
component: () => import('@/views/system/MyWaybill'),
|
|
component: () => import('@/views/system/MyWaybill'),
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
|
|
+const userRouter = {
|
|
|
|
+ path: '/UserManagement',
|
|
|
|
+ name: 'UserManagement',
|
|
|
|
+ meta: {
|
|
|
|
+ icon: 'icon-yonghuguanli',
|
|
|
|
+ title: '用户管理'
|
|
|
|
+ },
|
|
|
|
+ component: () => import('@/views/system/UserManagement'),
|
|
|
|
+}
|
|
// 根级菜单
|
|
// 根级菜单
|
|
const rootRouter = {
|
|
const rootRouter = {
|
|
name: 'index',
|
|
name: 'index',
|
|
@@ -76,15 +86,6 @@ const rootRouter = {
|
|
},
|
|
},
|
|
component: () => import('@/views/page/Home'),
|
|
component: () => import('@/views/page/Home'),
|
|
}, {
|
|
}, {
|
|
- path: '/UserManagement',
|
|
|
|
- name: 'UserManagement',
|
|
|
|
- meta: {
|
|
|
|
- icon: 'icon-yonghuguanli',
|
|
|
|
- title: '用户管理'
|
|
|
|
- },
|
|
|
|
- component: () => import('@/views/system/UserManagement'),
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
path: '/addressBook',
|
|
path: '/addressBook',
|
|
name: 'addressBook',
|
|
name: 'addressBook',
|
|
meta: {
|
|
meta: {
|
|
@@ -132,7 +133,57 @@ const rootRouter = {
|
|
icon: 'icon-yundan',
|
|
icon: 'icon-yundan',
|
|
title: '订单管理'
|
|
title: '订单管理'
|
|
},
|
|
},
|
|
- component: () => import('@/views/system/OrderManagement'),
|
|
|
|
|
|
+ component: () => import('@/views/OrderManagement/index'),
|
|
|
|
+ redirect: '/OrderManagement/uncertainOrder',
|
|
|
|
+ children: [{
|
|
|
|
+ path: 'uncertainOrder',
|
|
|
|
+ name: 'uncertainOrder',
|
|
|
|
+ meta: {
|
|
|
|
+ icon: 'icon-yueduye-mulu',
|
|
|
|
+ title: '未确定订单'
|
|
|
|
+ },
|
|
|
|
+ component: () => import('@/views/OrderManagement/uncertainOrder.vue'),
|
|
|
|
+ }, {
|
|
|
|
+ path: 'reviewedOrder',
|
|
|
|
+ name: 'reviewedOrder',
|
|
|
|
+ meta: {
|
|
|
|
+ icon: 'icon-daishenhe',
|
|
|
|
+ title: '待审核订单'
|
|
|
|
+ },
|
|
|
|
+ component: () => import('@/views/OrderManagement/reviewedOrder.vue'),
|
|
|
|
+ }, {
|
|
|
|
+ path: 'pendingOrder',
|
|
|
|
+ name: 'pendingOrder',
|
|
|
|
+ meta: {
|
|
|
|
+ icon: 'icon-daipeisong',
|
|
|
|
+ title: '待配送订单'
|
|
|
|
+ },
|
|
|
|
+ component: () => import('@/views/OrderManagement/pendingOrder.vue'),
|
|
|
|
+ }, {
|
|
|
|
+ path: 'deliveryOrder',
|
|
|
|
+ name: 'deliveryOrder',
|
|
|
|
+ meta: {
|
|
|
|
+ icon: 'icon-peisongzhong',
|
|
|
|
+ title: '配送中订单'
|
|
|
|
+ },
|
|
|
|
+ component: () => import('@/views/OrderManagement/deliveryOrder.vue'),
|
|
|
|
+ }, {
|
|
|
|
+ path: 'completedOrder',
|
|
|
|
+ name: 'completedOrder',
|
|
|
|
+ meta: {
|
|
|
|
+ icon: 'icon-yiwanchengdingdan',
|
|
|
|
+ title: '已完成订单'
|
|
|
|
+ },
|
|
|
|
+ component: () => import('@/views/OrderManagement/completedOrder.vue'),
|
|
|
|
+ }, {
|
|
|
|
+ path: 'cancelledOrder',
|
|
|
|
+ name: 'cancelledOrder',
|
|
|
|
+ meta: {
|
|
|
|
+ icon: 'icon-yiquxiaodingdan',
|
|
|
|
+ title: '已取消订单'
|
|
|
|
+ },
|
|
|
|
+ component: () => import('@/views/OrderManagement/cancelledOrder.vue'),
|
|
|
|
+ }, ]
|
|
}, {
|
|
}, {
|
|
path: '/WaybillManagement',
|
|
path: '/WaybillManagement',
|
|
name: 'WaybillManagement',
|
|
name: 'WaybillManagement',
|
|
@@ -164,6 +215,12 @@ export const generatorDynamicRouter = arrType => {
|
|
rootRouter.children = deleteObjectById(rootRouter.children, 'CompanyManagement')
|
|
rootRouter.children = deleteObjectById(rootRouter.children, 'CompanyManagement')
|
|
routers.push(notFoundRouter)
|
|
routers.push(notFoundRouter)
|
|
routers.push(rootRouter)
|
|
routers.push(rootRouter)
|
|
|
|
+ if (arrType.type == 1) {
|
|
|
|
+ rootRouter.children = deleteObjectById(rootRouter.children, 'UserManagement')
|
|
|
|
+ rootRouter.children.splice(1, 0, userRouter)
|
|
|
|
+ } else {
|
|
|
|
+ rootRouter.children = deleteObjectById(rootRouter.children, 'UserManagement')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
routers.push(notFoundRouter)
|
|
routers.push(notFoundRouter)
|