Browse Source

高级查询-详情页修改

zhaoke 2 years ago
parent
commit
02ea77cb8b
1 changed files with 149 additions and 93 deletions
  1. 149 93
      src/views/advancedQuery/views/advancedBag.vue

+ 149 - 93
src/views/advancedQuery/views/advancedBag.vue

@@ -36,27 +36,29 @@
     </div>
     <div class="part2">
       <div class="part2_info">
-        <div class="title">行李跟踪信息</div>
+        <div style="width: 120px" class="title">行李跟踪信息</div>
         <div v-if="infoBtn == '跟踪信息'" class="type normal">
           {{ infoData.BagStatus }}
         </div>
         <div v-if="infoBtn == '跟踪信息'" class="step">
-          <div class="stepLine">
-            <div :style="{ width: lineWidth }" class="stepLineBlue" />
-          </div>
-          <div
-            v-for="(item, index) in stepData"
-            :key="index"
-            class="stepItem"
-            :class="{ activeItem: item.date.length > 0 }"
-          >
-            <span class="head"
-              >{{ item.airPort }}
-              <span v-if="item.airPort && item.nodeName !== ''">-</span>
-              <span>{{ item.nodeName.split("/")[1] || item.nodeName }}</span>
-            </span>
-            <span>{{ item.date }}</span>
-            <span>{{ item.time }}</span>
+          <div class="ddd">
+            <div class="stepLine">
+              <div :style="{ width: lineWidth }" class="stepLineBlue" />
+            </div>
+            <div
+              v-for="(item, index) in stepData"
+              :key="index"
+              class="stepItem"
+              :class="{ activeItem: item.NodeNameEN }"
+            >
+              <span class="head">
+                <!-- {{ item.airPort }} -->
+                <!-- <span v-if="item.airPort && item.nodeName !== ''">-</span> -->
+                <span>{{ item.NodeNameEN }}</span>
+              </span>
+              <span>{{ item.DealTime }}</span>
+              <!-- <span>{{ item.time }}</span> -->
+            </div>
           </div>
         </div>
       </div>
@@ -173,7 +175,16 @@ export default {
     return {
       departureAirport: "",
       landingAirport: "",
-      infoData: null,
+      infoData: {
+        BagSN: "3666149457",
+        SpecialType: null,
+        PassengerInfoStatus: null,
+        PassengerNameUpcase: "AIJIAMEI",
+        bagExcType: null,
+        TeamOrGroup: null,
+        PNR: null,
+        BagStatus: null,
+      },
       dialogVisibledele: false,
       active: 2,
       infoBtn: "跟踪信息",
@@ -189,101 +200,109 @@ export default {
         // .W/K/l/0
         // .P/1CUI/DI ENDBSM`
       ],
-      lineWidth: "",
+      lineWidth: "100%",
       checkList: [],
       stepData: [
         {
-          airPort: this.departureAirport,
-          nodeCode: "CHECKIN",
-          nodeName: "值机",
-          date: "",
-          time: "",
+          NodeNameEN: "CHECKIN",
+          DealTime: null,
+        },
+        {
+          NodeNameEN: "SECURITY",
+          DealTime: null,
+        },
+        {
+          NodeNameEN: "SORT",
+          DealTime: null,
+        },
+        {
+          NodeNameEN: "存储",
+          DealTime: null,
+        },
+        {
+          NodeNameEN: "LOAD",
+          DealTime: null,
+        },
+        {
+          NodeNameEN: "离港运输",
+          DealTime: null,
+        },
+        {
+          NodeNameEN: "INFL",
+          DealTime: null,
+        },
+        {
+          NodeNameEN: "UNLOAD",
+          DealTime: null,
+        },
+        {
+          NodeNameEN: "进港运输",
+          DealTime: null,
+        },
+        {
+          NodeNameEN: "中转",
+          DealTime: null,
         },
         {
-          airPort: this.departureAirport,
-          nodeCode: "SECURITY",
-          nodeName: "安检",
-          date: "",
-          time: "",
+          NodeNameEN: "SORT",
+          DealTime: null,
         },
         {
-          airPort: this.departureAirport,
-          nodeCode: "SORT",
-          nodeName: "分拣",
-          date: "",
-          time: "",
+          NodeNameEN: "提取",
+          DealTime: null,
         },
         {
-          airPort: this.departureAirport,
-          nodeCode: "LOAD",
-          nodeName: "装载/装车",
-          date: "",
-          time: "",
+          NodeNameEN: "LOAD",
+          DealTime: null,
         },
         {
-          airPort: this.departureAirport,
-          nodeCode: "INF",
-          nodeName: "装机",
-          date: "",
-          time: "",
+          NodeNameEN: "INFL",
+          DealTime: null,
         },
-        // {
-        //   airPort: this.landingAirport,
-        //   nodeCode: '',
-        //   nodeName: '卸机',
-        //   date: '',
-        //   time: ''
-        // },
         {
-          airPort: this.landingAirport,
-          nodeCode: "UNLOAD",
-          nodeName: "卸车",
-          date: "",
-          time: "",
+          NodeNameEN: "OFFLOAD",
+          DealTime: null,
         },
         {
-          airPort: this.landingAirport,
-          nodeCode: "TiQu",
-          nodeName: "提取",
-          date: "",
-          time: "",
+          NodeNameEN: "ARRIVED",
+          DealTime: null,
         },
       ],
       tableCols: [
         {
           name: "航班号",
-          prop: "flightNo",
+          prop: "FlightNO",
           align: "center",
         },
-        { name: "航班日期", prop: "flightDate", align: "center" },
+        { name: "航班日期", prop: "FlightDate", align: "center" },
         {
           name: "起飞航站/预计起飞时间",
-          prop: "start",
+          prop: "PlanDepartureTime",
           align: "center",
         },
         {
           name: "目的航站/预计降落时间",
-          prop: "end",
+          prop: "PlanLandingTime",
           align: "center",
           sortable: "custom",
         },
-        { name: "旅客仓位", prop: "passengerCompartment", align: "center" },
-        { name: "旅客座位号", prop: "passengerSeatNumber", align: "center" },
-        { name: "值机序号", prop: "passengerCheckInNumber", align: "center" },
-        { name: "节点标识", prop: "nodeCode", align: "center" },
-        { name: "节点名称", prop: "nodeName", align: "center" },
-        { name: "位置码", prop: "locationCode", align: "center" },
-        { name: "位置描述", prop: "locationRemark", align: "center" },
-        { name: "读取时间", prop: "dealTime", align: "center" },
-        { name: "结果", prop: "status", align: "center" },
-        { name: "次级代码", prop: "secondaryCode", align: "center" },
+        { name: "旅客仓位", prop: "Canbin", align: "center" },
+        { name: "旅客座位号", prop: "SeatNO", align: "center" },
+        { name: "值机序号", prop: "CheckInNO", align: "center" },
+        { name: "节点标识", prop: "NodeCode", align: "center" },
+        { name: "节点名称", prop: "NodeName", align: "center" },
+        { name: "位置码", prop: "LocationMark", align: "center" },
+        { name: "位置描述", prop: "RemarkCN", align: "center" },
+        { name: "读取时间", prop: "DealTime", align: "center" },
+        { name: "结果", prop: "DealResult", align: "center" },
+        { name: "次级代码", prop: "SecondCode", align: "center" },
         { name: "操作人", prop: "creator", align: "center" },
-        { name: "设备ID", prop: "deviceId", align: "center" },
-        { name: "发往位置", prop: "toLocation", align: "center" },
-        { name: "位置描述", prop: "toLocationRemark", align: "center" },
-        { name: "装载序号", prop: "loadSequenceNumber", align: "center" },
-        { name: "容器编号", prop: "containerNumber", align: "center" },
-        { name: "报文", prop: "messageType", align: "center" },
+        { name: "设备ID", prop: "DeviceCode", align: "center" },
+        { name: "发往位置", prop: "ToPlaceCode", align: "center" },
+        { name: "位置描述", prop: "ToPlaceMark", align: "center" },
+        { name: "装载序号", prop: "LoadSN", align: "center" },
+        { name: "容器编号", prop: "containerNumber", align: "center" }, //容器编号
+        { name: "报文", prop: "ResourceFile", align: "center" },
       ],
       baggageTableData: [],
       spanArr: [],
@@ -300,7 +319,7 @@ export default {
     },
   },
   created() {
-    this.infoData = this._.cloneDeep(this.$route.query);
+    // this.infoData = this._.cloneDeep(this.$route.query);
     // console.log(this.infoData)
     // this.baggageTableColumnCheckList = this._.cloneDeep(this.baggageTableColumn)
     // const nodeData = {
@@ -310,6 +329,10 @@ export default {
     // };
     // this.getNodeinfoes(nodeData);
     // this.getFulltrackinfoAndNodeInfoList(nodeData);
+    const id = 3666149457;
+    this.baggageDetails(id);
+    this.baggageTrack(id);
+    this.baggageDatas(id);
   },
   methods: {
     async getFulltrackinfoAndNodeInfoList(data) {
@@ -319,11 +342,11 @@ export default {
           this.departureAirport = result.returnData[0].departureAirport;
           this.landingAirport = result.returnData[0].landingAirport;
         }
-        result.returnData.forEach((item) => {
-          item["start"] = item.departureAirport + "\n" + item.departureTime;
-          item["end"] = item.landingAirport + "\n" + item.landingTime;
-          item["dealTime"] = item.dealTime.split("T")[1];
-        });
+        // result.returnData.forEach((item) => {
+        //   item["start"] = item.departureAirport + "\n" + item.departureTime;
+        //   item["end"] = item.landingAirport + "\n" + item.landingTime;
+        //   item["dealTime"] = item.dealTime.split("T")[1];
+        // });
         this.baggageTableData = this._.cloneDeep(result.returnData);
         for (var i = 0; i < this.baggageTableData.length; i++) {
           if (i === 0) {
@@ -447,7 +470,35 @@ export default {
           dataContent: [params],
         });
         if (result.code == 0) {
-          this.baggageTableData = result.returnData;
+          if (result.returnData.length > 0) {
+            this.departureAirport = result.returnData[0].departureAirport;
+            this.landingAirport = result.returnData[0].landingAirport;
+          }
+          result.returnData.forEach((item) => {
+            item["start"] = item.departureAirport + "\n" + item.departureTime;
+            item["end"] = item.landingAirport + "\n" + item.landingTime;
+            item["dealTime"] = item.dealTime.split("T")[1];
+          });
+          this.baggageTableData = this._.cloneDeep(result.returnData);
+          for (var i = 0; i < this.baggageTableData.length; i++) {
+            if (i === 0) {
+              this.spanArr.push(1);
+              this.pos = 0;
+            } else {
+              // 判断当前元素与上一个元素是否相同
+              if (
+                this.baggageTableData[i].flightNo ===
+                this.baggageTableData[i - 1].flightNo
+              ) {
+                this.spanArr[this.pos] += 1;
+                this.spanArr.push(0);
+              } else {
+                this.spanArr.push(1);
+                this.pos = i;
+              }
+            }
+            // console.log(this.spanArr)
+          }
         } else {
           this.$message.error(result.message);
         }
@@ -536,12 +587,17 @@ export default {
       }
       .step {
         height: 80px;
-        width: 980px;
-        display: flex;
-        flex-direction: row;
-        justify-content: space-between;
-        align-items: center;
+        width: 1430px;
         position: relative;
+        .ddd {
+          display: flex;
+          flex-direction: row;
+          justify-content: space-between;
+          align-items: center;
+          width: 100%;
+          overflow-x: scroll;
+          overflow-y: hidden;
+        }
         .stepLine {
           width: 100%;
           height: 20px;