|
@@ -11,9 +11,13 @@ import Map from '@/components/map/map.vue'
|
|
|
import useStore from '@/pages/store'
|
|
import useStore from '@/pages/store'
|
|
|
import HomeService from './services/homepage.service'
|
|
import HomeService from './services/homepage.service'
|
|
|
import CehicleOperationService from './services/cehicleOperation.service'
|
|
import CehicleOperationService from './services/cehicleOperation.service'
|
|
|
|
|
+import MaintenanceDynamicsService from './services/maintenanceDynamics.Service'
|
|
|
|
|
+import PassengerFlowService from './services/passengerFlow.service'
|
|
|
|
|
|
|
|
const homeService = new HomeService()
|
|
const homeService = new HomeService()
|
|
|
const cehicleOperationService = new CehicleOperationService()
|
|
const cehicleOperationService = new CehicleOperationService()
|
|
|
|
|
+const passengerFlowService = new PassengerFlowService()
|
|
|
|
|
+const maintenanceDynamicsService = new MaintenanceDynamicsService()
|
|
|
|
|
|
|
|
const store = useStore()
|
|
const store = useStore()
|
|
|
const menus = [
|
|
const menus = [
|
|
@@ -135,7 +139,7 @@ const menus = [
|
|
|
},
|
|
},
|
|
|
{ label: '满载率', value: 14, util: '%' },
|
|
{ label: '满载率', value: 14, util: '%' },
|
|
|
{
|
|
{
|
|
|
- label: '免费换成', value: 8, util: '万人次', style: { right: '-40px' }
|
|
|
|
|
|
|
+ label: '免费换乘', value: 8, util: '万人次', style: { right: '-40px' }
|
|
|
},
|
|
},
|
|
|
{ label: '分担率 ', value: 0, util: '%' },
|
|
{ label: '分担率 ', value: 0, util: '%' },
|
|
|
{ label: '平均乘距', value: 1400, util: 'km' }
|
|
{ label: '平均乘距', value: 1400, util: 'km' }
|
|
@@ -319,7 +323,7 @@ const menus = [
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
-const active = ref(0)
|
|
|
|
|
|
|
+const active = ref(3)
|
|
|
const currentComponent = ref(menus[active.value].component)
|
|
const currentComponent = ref(menus[active.value].component)
|
|
|
const weather = computed(() => store.weather)
|
|
const weather = computed(() => store.weather)
|
|
|
const warningMsg = ref({
|
|
const warningMsg = ref({
|
|
@@ -366,6 +370,27 @@ async function getBusLineStatistics() {
|
|
|
menus[1].count[6].value = res.unloadedRatio
|
|
menus[1].count[6].value = res.unloadedRatio
|
|
|
}
|
|
}
|
|
|
getBusLineStatistics()
|
|
getBusLineStatistics()
|
|
|
|
|
+
|
|
|
|
|
+async function getTrafficAnalysis() {
|
|
|
|
|
+ const res = await passengerFlowService.getTrafficAnalysis()
|
|
|
|
|
+
|
|
|
|
|
+ menus[2].count[0].value = res.trafficVolume
|
|
|
|
|
+ menus[2].count[1].value = res.fullLoad
|
|
|
|
|
+ menus[2].count[2].value = res.freeTransfer
|
|
|
|
|
+ menus[2].count[3].value = res.shareRate
|
|
|
|
|
+ menus[2].count[4].value = res.avgRidingDistance
|
|
|
|
|
+ console.log('getTrafficAnalysis')
|
|
|
|
|
+}
|
|
|
|
|
+getTrafficAnalysis()
|
|
|
|
|
+
|
|
|
|
|
+async function getMaintenanceInfo() {
|
|
|
|
|
+ const res = await maintenanceDynamicsService.getMaintenanceInfo()
|
|
|
|
|
+ menus[3].count[0].value = res.maintenanceSite
|
|
|
|
|
+ menus[3].count[1].value = res.maintenanceStation
|
|
|
|
|
+ menus[3].count[2].value = res.maintained
|
|
|
|
|
+ menus[3].count[3].value = res.repaired
|
|
|
|
|
+}
|
|
|
|
|
+getMaintenanceInfo()
|
|
|
</script>
|
|
</script>
|
|
|
<template>
|
|
<template>
|
|
|
<div class="home">
|
|
<div class="home">
|