feat #7271 router
This commit is contained in:
parent
331484dbc7
commit
42591d0781
|
@ -15,6 +15,7 @@ import Department from './department';
|
|||
import Entry from './entry';
|
||||
import roadmap from './roadmap';
|
||||
import Parking from './parking';
|
||||
import Zone from './zone';
|
||||
|
||||
export default [
|
||||
Item,
|
||||
|
@ -34,4 +35,5 @@ export default [
|
|||
Entry,
|
||||
roadmap,
|
||||
Parking,
|
||||
Zone,
|
||||
];
|
||||
|
|
|
@ -0,0 +1,139 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
export default {
|
||||
path: '/zone',
|
||||
name: 'Zone',
|
||||
meta: {
|
||||
title: 'zones',
|
||||
icon: 'vn:zone',
|
||||
moduleName: 'Zone',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'ZoneMain' },
|
||||
menus: {
|
||||
main: ['ZoneList', 'ZoneDeliveryList', 'ZoneUpcomingList'],
|
||||
card: [],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/zone',
|
||||
name: 'ZoneMain',
|
||||
component: () => import('src/pages/Zone/ZoneMain.vue'),
|
||||
redirect: { name: 'ZoneList' },
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'ZoneList',
|
||||
meta: {
|
||||
title: 'zonesList',
|
||||
icon: 'vn:zone',
|
||||
},
|
||||
component: () => import('src/pages/Zone/ZoneList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'ZoneCreate',
|
||||
meta: {
|
||||
title: 'zoneCreate',
|
||||
icon: 'create',
|
||||
},
|
||||
component: () => import('src/pages/Zone/ZoneCreate.vue'),
|
||||
},
|
||||
{
|
||||
path: ':id/edit',
|
||||
name: 'ZoneEdit',
|
||||
meta: {
|
||||
title: 'zoneEdit',
|
||||
icon: 'edit',
|
||||
},
|
||||
component: () => import('src/pages/Zone/ZoneCreate.vue'),
|
||||
},
|
||||
{
|
||||
path: 'counter',
|
||||
name: 'ZoneCounter',
|
||||
meta: {
|
||||
title: 'zoneCounter',
|
||||
icon: 'add_circle',
|
||||
},
|
||||
component: () => import('src/pages/Zone/ZoneCounter.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/zone/delivery',
|
||||
name: 'ZoneDeliveryMain',
|
||||
component: () => import('src/pages/Zone/ZoneMain.vue'),
|
||||
redirect: { name: 'ZoneDeliveryList' },
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'ZoneDeliveryList',
|
||||
meta: {
|
||||
title: 'deliveryList',
|
||||
icon: 'today',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Zone/Delivery/ZoneDeliveryList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'ZoneDeliveryCreate',
|
||||
meta: {
|
||||
title: 'deliveryCreate',
|
||||
icon: 'create',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Zone/Delivery/ZoneDeliveryCreate.vue'),
|
||||
},
|
||||
{
|
||||
path: ':id/edit',
|
||||
name: 'ZoneDeliveryEdit',
|
||||
meta: {
|
||||
title: 'deliveryEdit',
|
||||
icon: 'edit',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Zone/Delivery/ZoneDeliveryCreate.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/zone/upcoming',
|
||||
name: 'ZoneUpcomingMain',
|
||||
component: () => import('src/pages/Zone/ZoneMain.vue'),
|
||||
redirect: { name: 'ZoneUpcomingList' },
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'ZoneUpcomingList',
|
||||
meta: {
|
||||
title: 'upcomingList',
|
||||
icon: 'today',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Zone/Upcoming/ZoneUpcomingList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'ZoneUpcomingCreate',
|
||||
meta: {
|
||||
title: 'upcomingCreate',
|
||||
icon: 'create',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue'),
|
||||
},
|
||||
{
|
||||
path: ':id/edit',
|
||||
name: 'ZoneUpcomingEdit',
|
||||
meta: {
|
||||
title: 'upcomingEdit',
|
||||
icon: 'edit',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -15,6 +15,7 @@ import order from 'src/router/modules/order';
|
|||
import entry from 'src/router/modules/entry';
|
||||
import roadmap from 'src/router/modules/roadmap';
|
||||
import parking from 'src/router/modules/parking';
|
||||
import zone from 'src/router/modules/zone';
|
||||
|
||||
const routes = [
|
||||
{
|
||||
|
@ -71,6 +72,7 @@ const routes = [
|
|||
roadmap,
|
||||
entry,
|
||||
parking,
|
||||
zone,
|
||||
{
|
||||
path: '/:catchAll(.*)*',
|
||||
name: 'NotFound',
|
||||
|
|
|
@ -21,6 +21,7 @@ export const useNavigationStore = defineStore('navigationStore', () => {
|
|||
'ticket',
|
||||
'worker',
|
||||
'wagon',
|
||||
'zone',
|
||||
];
|
||||
const pinnedModules = ref([]);
|
||||
const role = useRole();
|
||||
|
|
Loading…
Reference in New Issue