feat: refs #7119 add vehicle routing and summary components
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
0a6c38f959
commit
23aa972a85
|
@ -9,7 +9,7 @@ import VehicleFilter from '../VehicleFilter.js';
|
||||||
import { downloadFile } from 'src/composables/downloadFile';
|
import { downloadFile } from 'src/composables/downloadFile';
|
||||||
import { dashIfEmpty } from 'src/filters';
|
import { dashIfEmpty } from 'src/filters';
|
||||||
|
|
||||||
const props = defineProps({ id: { type: [Number, String], default: 0 } });
|
const props = defineProps({ id: { type: [Number, String], default: null } });
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const entityId = computed(() => props.id || +route.params.id);
|
const entityId = computed(() => props.id || +route.params.id);
|
||||||
|
|
|
@ -167,7 +167,6 @@ const columns = computed(() => [
|
||||||
data-key="VehicleList"
|
data-key="VehicleList"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
redirect="route/vehicle"
|
redirect="route/vehicle"
|
||||||
:right-search="false"
|
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'Vehicles',
|
urlCreate: 'Vehicles',
|
||||||
title: t('vehicle.create'),
|
title: t('vehicle.create'),
|
||||||
|
|
|
@ -160,6 +160,36 @@ const roadmapCard = {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const vehicleCard = {
|
||||||
|
path: ':id',
|
||||||
|
name: 'VehicleCard',
|
||||||
|
component: () => import('src/pages/Route/Vehicle/Card/VehicleCard.vue'),
|
||||||
|
redirect: { name: 'VehicleSummary' },
|
||||||
|
meta: {
|
||||||
|
menu: ['VehicleBasicData'],
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'VehicleSummary',
|
||||||
|
path: 'summary',
|
||||||
|
meta: {
|
||||||
|
title: 'summary',
|
||||||
|
icon: 'view_list',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Route/Vehicle/Card/VehicleSummary.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'VehicleBasicData',
|
||||||
|
path: 'basic-data',
|
||||||
|
meta: {
|
||||||
|
title: 'basicData',
|
||||||
|
icon: 'vn:settings',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Route/Vehicle/Card/VehicleBasicData.vue'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Route',
|
name: 'Route',
|
||||||
path: '/route',
|
path: '/route',
|
||||||
|
@ -281,6 +311,27 @@ export default {
|
||||||
agencyCard,
|
agencyCard,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'vehicle',
|
||||||
|
name: 'RouteVehicle',
|
||||||
|
redirect: { name: 'VehicleList' },
|
||||||
|
meta: {
|
||||||
|
title: 'vehicle',
|
||||||
|
icon: 'directions_car',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Route/Vehicle/VehicleList.vue'),
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'list',
|
||||||
|
name: 'VehicleList',
|
||||||
|
meta: {
|
||||||
|
title: 'vehicleList',
|
||||||
|
icon: 'directions_car',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
vehicleCard,
|
||||||
|
],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue