zhaoke 2 年之前
父節點
當前提交
a637db8485
共有 2 個文件被更改,包括 18 次插入8 次删除
  1. 4 4
      src/views/newBagDetails/components/baggageView.vue
  2. 14 4
      src/views/newBagDetails/index.vue

+ 4 - 4
src/views/newBagDetails/components/baggageView.vue

@@ -6,9 +6,9 @@
           <div class="part2">
             <div class="part2_info">
               <div class="title">
-                <div class="fightNo">{{ item.flightNo }}</div>
-                <div class="fightDate">{{ item.flightDate }}</div>
-                <div class="fightLine">{{ item.sourceAirport }}{{ item.takeoff_terminal }} -- {{item.target_airport}}{{ item.target_terminal }}</div>
+                <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.andAirport}}{{ item.target_terminal }}</div>
                 <div class="fightTime">08:22 -- 10:22</div>
               </div>
               <div class="baggage-track-chart">
@@ -185,7 +185,7 @@ export default {
       if (this.noMore || this.loading) {
         return;
       }
-      this.getLuggageList(SERVICE_ID.bagDetailId, this.dataContent, ++this.page, this.pageSize);
+      this.getLuggageList(SERVICE_ID.bagTableId, this.dataContent, ++this.page, this.pageSize);
     },
   }
 }

+ 14 - 4
src/views/newBagDetails/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="newBagDetails">
-    <div class="newBagDetails-info">
+    <div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="newBagDetails-info">
       <div class="newBagDetails-info-look">
         <el-row :gutter="20">
           <el-col :span="4">
@@ -82,7 +82,9 @@ export default {
       passengerName: '',
       PNRNO: '',
       tagObj: {},
-      tableDatas: []
+      tableDatas: [],
+      tableDatas5Id: '',
+      loading: false
     }
   },
   created () {
@@ -95,6 +97,7 @@ export default {
       const tableDatas5 = table.filter(item => item.auth_type == 5)
       if (tableDatas5 && tableDatas5.length) {
         const { auth_id } = tableDatas5[0]
+        this.tableDatas5Id = auth_id
         this.getColumnData(auth_id)
       }
     }
@@ -111,8 +114,8 @@ export default {
         if (code == 0) {
           if (returnData && returnData.length) {
             const nodeDatas = returnData.filter(item => item.needShow)
-            const newNodeDatas = nodeDatas.sort((a, b) => a.orderNumber - b.orderNumber)
-            this.infoArrs = newNodeDatas.slice(0, 6)
+            const newNodeDatas = nodeDatas.sort((a, b) => b.orderNumber - a.orderNumber)
+            this.infoArrs = newNodeDatas.slice(0, 6).sort((a, b) => a.orderNumber - b.orderNumber)
             this.msgs1 = newNodeDatas.slice(6)
             this.getLuggageInfo(auth_id)
           }
@@ -126,6 +129,7 @@ export default {
     //获取行李信息
     async getLuggageInfo (auth_id) {
       try {
+        this.loading = true
         const { code, returnData } = await this.getQueryListAuth(SERVICE_ID.bagTableId, this.query, 1, 20, auth_id)
         if (code == 0 && returnData && returnData.length) {
           const datasObj = [...returnData][0]
@@ -144,8 +148,12 @@ export default {
             })
           }
           this.getLuggageNums()
+          this.loading = false
+        } else {
+          this.loading = false
         }
       } catch (error) {
+        this.loading = false
         console.log(error)
       }
     },
@@ -172,7 +180,9 @@ export default {
         carrierFlights,
         carrierFlightsDate
       }
+      this.query = this.tagObj
       this.activeIndex = index
+      this.getLuggageInfo(this.tableDatas5Id)
     },
     tabClick (item, index) {
       this.tabIndex = index