Răsfoiți Sursa

修改行李详情日期

zhaoke 2 ani în urmă
părinte
comite
ca822d2c44
2 a modificat fișierele cu 27 adăugiri și 2 ștergeri
  1. 1 0
      public/config.js
  2. 26 2
      src/views/newBagDetails/components/baggageView.vue

+ 1 - 0
public/config.js

@@ -74,6 +74,7 @@ window.SERVICE_ID = {
   baggageTrack: 18010, // 行李-追踪节点
   baggageDetails: 44, // 行李-详情列表
   baggageMessage: 3066, // 行李-原始报文
+  baggageTime: 20039, //行李-起飞降落日期
 
   /***-----容器视图------***/
   containerHistory: 18026,

+ 26 - 2
src/views/newBagDetails/components/baggageView.vue

@@ -9,7 +9,7 @@
                 <div class="fightNo">{{ item.carrierFlights || item.inflightNo }}</div>
                 <div class="fightDate">{{ item.carrierFlightsDate || item.inflightDate }}</div>
                 <div class="fightLine">{{ item.outAirport }}{{ item.takeoff_terminal }} -- {{item.landAirport}}{{ item.target_terminal }}</div>
-                <div class="fightTime">{{ item.takeoff_time }} -- {{ item.land_time }}</div>
+                <div class="fightTime">{{ item.takeTime }} -- {{ item.landTime }}</div>
               </div>
               <div class="baggage-track-chart">
                 <div class="step-line">
@@ -168,7 +168,7 @@ export default {
         this.load()
       },
       deep: true
-    }
+    },
   },
   created () {
     this.dataContent = this.queryObj
@@ -201,6 +201,7 @@ export default {
               }
             })
           })
+          this.getBagTime(this.tableData)
           this.loading = false;
         } else {
           this.page--;
@@ -226,6 +227,26 @@ export default {
         this.getLuggageList(SERVICE_ID.bagTableId, this.dataContent, ++this.page, this.pageSize);
       }
     },
+    getBagTime (arr) {
+      arr.forEach(async item => {
+        const { carrierFlights, carrierFlightsDate, outAirport, landAirport } = item
+        const { code, returnData } = await this.getQueryList(SERVICE_ID.baggageTime, {
+          carrierFlights,
+          carrierFlightsDate,
+          outAirport,
+          landAirport
+        })
+        if (code == 0 && returnData && returnData.length) {
+          const newArray = [...returnData]
+          const itemObj = newArray[0]
+          const { actualTakeOffTime, estimateTakeOffTime, scheduleTakeOffTime, actualLandInTime, estimateLandInTime, scheduleLandInTime } = itemObj
+          item.newTakeoff_time = actualTakeOffTime ? actualTakeOffTime : estimateTakeOffTime ? estimateTakeOffTime : scheduleTakeOffTime
+          item.newLand_time = actualLandInTime ? actualLandInTime : estimateLandInTime ? estimateLandInTime : scheduleLandInTime
+          item.takeTime = item.newTakeoff_time.split('T').at(-1)
+          item.landTime = item.newLand_time.split('T').at(-1)
+        }
+      })
+    }
   }
 }
 </script>
@@ -275,6 +296,9 @@ export default {
           .fightLine {
             margin-bottom: 8px;
           }
+          .fightTime {
+            margin-top: 13px;
+          }
         }
         .type {
           font-size: 18px;