|
@@ -5,17 +5,17 @@
|
|
|
<div class="airport-count">
|
|
|
<CountBox
|
|
|
:count-number="airportCount.flightNum"
|
|
|
- :length="4"
|
|
|
label="今日计划航班数"
|
|
|
+ :length="4"
|
|
|
/>
|
|
|
<CountBox
|
|
|
:count-number="airportCount.finishFlightNum"
|
|
|
- :length="4"
|
|
|
label="已完成航班数"
|
|
|
+ :length="4"
|
|
|
/>
|
|
|
<CountBox
|
|
|
:count-number="airportCount.weight"
|
|
|
- label="已转载重量(吨)"
|
|
|
+ :label="`已${isDeparture ? '装载' : '卸载'}重量(吨)`"
|
|
|
:length="8"
|
|
|
/>
|
|
|
</div>
|
|
@@ -126,7 +126,8 @@ const getAirportCount = async () => {
|
|
|
const { flightNum, finishFlightNum, weight } = listValues[0]
|
|
|
airportCount.flightNum = flightNum ?? 0
|
|
|
airportCount.finishFlightNum = finishFlightNum ?? 0
|
|
|
- airportCount.weight = weight ? parseFloat((weight / 1000).toFixed(2)) : 0
|
|
|
+ // airportCount.weight = weight ? Math.ceil(weight / 1000) : 0 // 向上取整
|
|
|
+ airportCount.weight = weight ? parseFloat((weight / 1000).toFixed(2)) : 0 // 四舍五入保留两位
|
|
|
} catch (error) {
|
|
|
console.error(error)
|
|
|
}
|