|
@@ -13,11 +13,13 @@ 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 MaintenanceDynamicsService from './services/maintenanceDynamics.Service'
|
|
|
import PassengerFlowService from './services/passengerFlow.service'
|
|
import PassengerFlowService from './services/passengerFlow.service'
|
|
|
|
|
+import FacilityManagementService from './services/facilityManagement.service'
|
|
|
|
|
|
|
|
const homeService = new HomeService()
|
|
const homeService = new HomeService()
|
|
|
const cehicleOperationService = new CehicleOperationService()
|
|
const cehicleOperationService = new CehicleOperationService()
|
|
|
const passengerFlowService = new PassengerFlowService()
|
|
const passengerFlowService = new PassengerFlowService()
|
|
|
const maintenanceDynamicsService = new MaintenanceDynamicsService()
|
|
const maintenanceDynamicsService = new MaintenanceDynamicsService()
|
|
|
|
|
+const facilityManagementService = new FacilityManagementService()
|
|
|
|
|
|
|
|
const store = useStore()
|
|
const store = useStore()
|
|
|
const menus = [
|
|
const menus = [
|
|
@@ -323,7 +325,7 @@ const menus = [
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
-const active = ref(3)
|
|
|
|
|
|
|
+const active = ref(4)
|
|
|
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({
|
|
@@ -391,6 +393,29 @@ async function getMaintenanceInfo() {
|
|
|
menus[3].count[3].value = res.repaired
|
|
menus[3].count[3].value = res.repaired
|
|
|
}
|
|
}
|
|
|
getMaintenanceInfo()
|
|
getMaintenanceInfo()
|
|
|
|
|
+
|
|
|
|
|
+async function getFacilityStatistics() {
|
|
|
|
|
+ const res = await facilityManagementService.getFacilityStatistics()
|
|
|
|
|
+ let vehicleNumTotal = 0
|
|
|
|
|
+ let stationNumTotal = 0
|
|
|
|
|
+ let carWasherNumTotal = 0
|
|
|
|
|
+ let chargingStationNumTotal = 0
|
|
|
|
|
+ let vehicleComponentsNumTotal = 0
|
|
|
|
|
+ for (let i = 0; i < res.length; i++) {
|
|
|
|
|
+ const item = res[i]
|
|
|
|
|
+ vehicleNumTotal += +item.vehicleNum
|
|
|
|
|
+ stationNumTotal += +item.stationNum
|
|
|
|
|
+ carWasherNumTotal += +item.carWasherNum
|
|
|
|
|
+ chargingStationNumTotal += +item.chargingStationNum
|
|
|
|
|
+ vehicleComponentsNumTotal += +item.vehicleComponentsNum
|
|
|
|
|
+ }
|
|
|
|
|
+ menus[4].count[0].value = vehicleNumTotal
|
|
|
|
|
+ menus[4].count[1].value = stationNumTotal
|
|
|
|
|
+ menus[4].count[2].value = carWasherNumTotal
|
|
|
|
|
+ menus[4].count[3].value = chargingStationNumTotal
|
|
|
|
|
+ menus[4].count[4].value = vehicleComponentsNumTotal
|
|
|
|
|
+}
|
|
|
|
|
+getFacilityStatistics()
|
|
|
</script>
|
|
</script>
|
|
|
<template>
|
|
<template>
|
|
|
<div class="home">
|
|
<div class="home">
|