Pārlūkot izejas kodu

航站视图修改

zhongxiaoyu 2 gadi atpakaļ
vecāks
revīzija
d9741035db

+ 5 - 4
src/views/realTime/components/AirportView/index.vue

@@ -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)
   }

+ 4 - 0
src/views/realTime/components/AirportView/useAirportTable.ts

@@ -45,6 +45,7 @@ const columnGroupsMap: {
         {
           columnName: 'target',
           columnLabel: '航程',
+          width: 100,
           needFilters: 1,
           fixed: true,
         },
@@ -260,6 +261,7 @@ const columnGroupsMap: {
         {
           columnName: 'target',
           columnLabel: '航程',
+          width: 100,
           needFilters: 1,
         },
         {
@@ -375,6 +377,7 @@ const columnGroupsMap: {
         {
           columnName: 'target',
           columnLabel: '航程',
+          width: 100,
           needFilters: 1,
           fixed: true,
         },
@@ -625,6 +628,7 @@ const columnGroupsMap: {
         {
           columnName: 'target',
           columnLabel: '航程',
+          width: 100,
           needFilters: 1,
         },
         {