Răsfoiți Sursa

航班视图-集装器信息-时间格式修改

zhongxiaoyu 2 ani în urmă
părinte
comite
4b699c9d3e

+ 2 - 3
src/views/realTime/components/AirportView/useFormatter.ts

@@ -37,12 +37,11 @@ export function useFormatter(flag: Ref<boolean>) {
     ) {
       return ''
     }
-    if (property.includes('Time')) {
+    if (property.includes('Time') && typeof cellValue === 'string') {
       if (
         ['planDepartureTime', 'acLandingTime', 'planLandingTime'].includes(
           property
-        ) &&
-        typeof cellValue === 'string'
+        )
       ) {
         return cellValue
           .trim()

+ 10 - 2
src/views/realTime/components/FlightView/index.vue

@@ -155,8 +155,10 @@ const tableFormatter: CommonTableFormatter = (
     return execResult ? '通过' : '未通过'
   }
   const value = String(cellValue ?? '').trim()
+  if (column.property.includes('Time')) {
+    return datetimeToTime(value, flightDate as CommonValue)
+  }
   if (
-    column.property.includes('Time') ||
     [
       'tally',
       'pull',
@@ -169,7 +171,13 @@ const tableFormatter: CommonTableFormatter = (
       'pullSure',
     ].includes(column.property)
   ) {
-    return datetimeToTime(value, flightDate as CommonValue)
+    const splitValue = value.split('_')
+    if (splitValue.length === 2) {
+      const [count, datetime] = splitValue
+      return `${count}\n${datetimeToTime(datetime, flightDate as CommonValue)}`
+    } else {
+      return datetimeToTime(value, flightDate as CommonValue)
+    }
   }
   if (column.property === 'nodeCode') {
     if (props.name.includes('InternationalDeparture') && value === 'LS_CARGO') {