Browse Source

中转运单视图节点修改

zhongxiaoyu 2 years ago
parent
commit
1ca44006be
1 changed files with 43 additions and 7 deletions
  1. 43 7
      src/views/realTime/hooks/useTrackData.ts

+ 43 - 7
src/views/realTime/hooks/useTrackData.ts

@@ -195,10 +195,41 @@ const trackNodesMap = {
       nodeCode: 'DLV报',
     },
   ],
+  internationalTransferDeparture: [
+    {
+      name: '入园',
+      nodeCode: 'EPORTREL',
+    },
+    {
+      name: '海关',
+      nodeCode: 'MTREL_out',
+    },
+    {
+      name: '运抵',
+      nodeCode: 'FOH',
+    },
+    {
+      name: '安检',
+      nodeCode: 'REH',
+    },
+    {
+      name: '收运核单',
+      nodeCode: 'RCS',
+    },
+    {
+      name: '理货',
+      nodeCode: 'ACC_BUP',
+    },
+    {
+      name: '实配',
+      nodeCode: 'LS_CARGO',
+    },
+  ],
 }
 
 export function useTrackData(name: string, trackData: MaybeRef<CommonData[]>) {
   const isInternational = name.includes('International')
+  const isTransfer = name.includes('Transfer')
 
   const computedTrackData = computed(() => {
     // if (name !== 'DepartureWaybill') {
@@ -238,13 +269,16 @@ export function useTrackData(name: string, trackData: MaybeRef<CommonData[]>) {
           return airlines
         }
         const isDeparture =
-          trackNodesMap.departure
-            .concat(trackNodesMap.internationalDeparture)
-            .some(node => node.nodeCode === nodeCode) ||
+          [
+            ...trackNodesMap.departure,
+            ...trackNodesMap.internationalDeparture,
+            ...trackNodesMap.internationalTransferDeparture,
+          ].some(node => node.nodeCode === nodeCode) ||
           (name.includes('Departure') &&
-            !trackNodesMap.arrival
-              .concat(trackNodesMap.internationalArrival)
-              .some(node => node.nodeCode === nodeCode))
+            ![
+              ...trackNodesMap.arrival,
+              ...trackNodesMap.internationalArrival,
+            ].some(node => node.nodeCode === nodeCode))
         const airport = isDeparture
           ? String(departureAirport ?? '')
           : String(arriveAirport ?? '')
@@ -263,7 +297,9 @@ export function useTrackData(name: string, trackData: MaybeRef<CommonData[]>) {
           ],
         }
         const nodeList = trackNodesMap[
-          isDeparture
+          isTransfer
+            ? 'internationalTransferDeparture'
+            : isDeparture
             ? isInternational
               ? 'internationalDeparture'
               : 'departure'