فهرست منبع

Merge branch 'master' of http://120.26.64.82:10880/BFFE/SMAirports

zhongxiaoyu 2 سال پیش
والد
کامیت
002cf21826
4فایلهای تغییر یافته به همراه232 افزوده شده و 11 حذف شده
  1. 1 1
      public/config.js
  2. 9 4
      src/layout/mixin/publicFunc.js
  3. 208 0
      src/views/newFlightView/index.vue
  4. 14 6
      src/views/newQuery/components/table.vue

+ 1 - 1
public/config.js

@@ -17,7 +17,7 @@ window.SERVICE_ID = {
   serTableId: 203, //服务设置-表头
   bagTableId: 20030, //行李详情-表头
   bagDetailId: 20027, //行李详情-表格
-
+  bagViewId: 20036, //航班视图-基础信息
   /***-----高级查询------***/
   baggageTypeId: 86, //高级查询-特殊行李类型下拉选项查询-id
   advancedQueryId: 30, //高级查询-数据查询-id

+ 9 - 4
src/layout/mixin/publicFunc.js

@@ -4,7 +4,8 @@ export default {
   data () {
     return {
       AauthId: null,
-      AqueryId: null
+      AqueryId: null,
+      AauthTable: []
     }
   },
   created () {
@@ -12,9 +13,13 @@ export default {
     const { arrs } = getAuthData(auth_id)
     const table = arrs.filter(item => item.auth_type == 4)
     if (table && table.length) {
-      const obj = table[0]
-      this.AqueryId = obj.queryTemplateID
-      this.AauthId = obj.auth_id
+      if (table.length == 1) {
+        const obj = table[0]
+        this.AqueryId = obj.queryTemplateID
+        this.AauthId = obj.auth_id
+      } else {
+        this.AauthTable = table
+      }
     } else {
       this.AauthId = auth_id
       this.AqueryId = auth_id

+ 208 - 0
src/views/newFlightView/index.vue

@@ -0,0 +1,208 @@
+<template>
+  <div class="newFlightView">
+    <div class="newFlightView-left">
+      <div class="newFlightView-left-top">
+        <div class="newFlightView-left-top-top">
+          <div class="newFlightView-left-top-top-title flex-wrap">
+            <div class="newFlightView-left-top-top-title-info">航班基本信息</div>
+            <div class="newFlightView-left-top-top-title-no">{{ flightObj.flightNo }}</div>
+          </div>
+          <div class="newFlightView-left-top-top-status">
+            PEK-<el-radio v-model="radio" label="1" />-NKG- <el-radio v-model="radio" label="1" />-STU- -HGH- -
+          </div>
+        </div>
+        <div class="newFlightView-left-top-list">
+          <el-descriptions :column="2">
+            <el-descriptions-item label="起飞机场简称">{{ infoObj.takeoff_airport_name }}</el-descriptions-item>
+            <el-descriptions-item label="起飞机场三字码">{{ infoObj.depStation_iataCd }}</el-descriptions-item>
+            <el-descriptions-item :span="2" label="日期">{{ formatTime(infoObj.actualTakeOffTime,infoObj.estimateTakeOffTime,infoObj.scheduleTakeOffTime) }}</el-descriptions-item>
+            <el-descriptions-item label="登机口">{{ infoObj.gateCd }}</el-descriptions-item>
+            <el-descriptions-item label="停机位"> {{ infoObj.depstandCd }}</el-descriptions-item>
+          </el-descriptions>
+        </div>
+        <div class="newFlightView-left-top-list">
+          <el-descriptions :column="2">
+            <el-descriptions-item label="降落机场简称">{{ infoObj.target_airport_name }}</el-descriptions-item>
+            <el-descriptions-item label="降落机场三字码">{{ infoObj.arrStation_iataCd }}</el-descriptions-item>
+            <el-descriptions-item :span="2" label="日期">{{ formatTime(infoObj.actualLandInTime,infoObj.estimateLandInTime,infoObj.scheduleLandInTime) }}</el-descriptions-item>
+            <el-descriptions-item label="提取转盘">{{infoObj.arrcarouselCd}}</el-descriptions-item>
+            <el-descriptions-item label="停机位"> {{ infoObj.arrstandCd }}</el-descriptions-item>
+          </el-descriptions>
+        </div>
+        <div class="newFlightView-left-top-list">
+          <el-descriptions :column="2">
+            <el-descriptions-item label="航班状态">{{ infoObj.normalState }}</el-descriptions-item>
+            <el-descriptions-item label="托运旅客数">{{ infoObj.checked_passengers_number }}</el-descriptions-item>
+            <el-descriptions-item label="中转行李数">{{ infoObj.transfer_baggage_number }}</el-descriptions-item>
+            <el-descriptions-item label="终点行李数">{{ infoObj.destination_bags_number }}</el-descriptions-item>
+          </el-descriptions>
+        </div>
+      </div>
+      <div class="newFlightView-left-bottom">
+        <Table tableName="容器列表" />
+      </div>
+    </div>
+    <div class="newFlightView-right">
+      <div class="newFlightView-right-top flex">
+        <div class="newFlightView-right-top-left flex-wrap">
+          <div class="manageTitle">航班行李列表</div>
+          <div class="newFlightView-right-top-left-select">快捷筛选
+            <el-select style="margin-left: 8px;border-radius: 4px;" size="small" v-model="value" filterable placeholder="请选择">
+              <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+              </el-option>
+            </el-select>
+          </div>
+        </div>
+        <div class="newFlightView-right-top-right">
+          <TimeZoneSelector />
+          <img class="btn-img btn-shadow" src="@/assets/baggage/ic_export.png" title="导出" @click="exportHandler('table', '航班行李列表')" />
+        </div>
+      </div>
+      <div class="newFlightView-right-bottom">
+        <Table ref="table" :btnStyle="{top:'-52px'}" :istableCol="true" tableName="航班行李列表" />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import Table from '@/views/newQuery/components/table.vue'
+import TimeZoneSelector from "@/components/TimeZoneSelector"
+import { throttledExportToExcel } from "@/utils/table"
+import pf from '@/layout/mixin/publicFunc'
+export default {
+  components: { Table, TimeZoneSelector },
+  mixins: [pf],
+  data () {
+    return {
+      radio: '1',
+      options: [{
+        value: '选项1',
+        label: '黄金糕'
+      }, {
+        value: '选项2',
+        label: '双皮奶'
+      }, {
+        value: '选项3',
+        label: '蚵仔煎'
+      }, {
+        value: '选项4',
+        label: '龙须面'
+      }, {
+        value: '选项5',
+        label: '北京烤鸭'
+      }],
+      value: '',
+      dataContent: {},
+      flightObj: {},
+      infoObj: {}
+    }
+  },
+  async created () {
+    const query = this.$route.query
+    const { flightNo, flightDate } = query
+    this.flightObj = query
+    this.dataContent = query
+    const res = await this.getViewInfo(query)
+    this.infoObj = res[0]
+    const sts = await this.getViewInfo({ flightNo, flightDate })
+    console.log(sts)
+  },
+  methods: {
+    // 获取基本信息
+    async getViewInfo (dataContent = this.dataContent) {
+      const { code, returnData } = await this.getQueryList(SERVICE_ID.bagViewId, dataContent)
+      if (code == 0) {
+        return returnData
+      } else {
+        return []
+      }
+    },
+    // 显示日期
+    formatTime (t1, t2, t3) {
+      return t1 ? t1 : t2 ? t2 : t3 ? t3 : ''
+    },
+    // 导出
+    exportHandler (refName, tableName) {
+      const table = this.$refs[refName].$el.cloneNode(true);
+      const fileName = `${tableName}-${this.currentAirport}-${this.startDate}-${this.endDate}.xlsx`;
+      throttledExportToExcel(table, tableName, fileName);
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.newFlightView {
+  height: calc(100vh - 80px);
+  padding: 8px;
+  display: flex;
+  flex-wrap: wrap;
+  &-left {
+    width: 408px;
+    margin-right: 8px;
+    &-top {
+      height: 505px;
+      background-color: #fff;
+      &-top {
+        padding: 25px 16px;
+        border-bottom: 1px solid #c8cfdb;
+        &-title {
+          line-height: 23px;
+          font-size: 20px;
+          font-family: Microsoft YaHei;
+          font-weight: bold;
+          color: #101116;
+          margin-bottom: 25px;
+          &-info {
+            margin-right: 16px;
+          }
+        }
+        &-status {
+          font-size: 18px;
+          font-family: Microsoft YaHei;
+          font-weight: bold;
+          color: #101116;
+          ::v-deep .el-radio {
+            margin-right: 0;
+            .el-radio__label {
+              display: none;
+            }
+          }
+        }
+      }
+      &-list {
+        padding: 25px 16px 13px 16px;
+        border-bottom: 1px solid #c8cfdb;
+        &:last-child {
+          border-bottom: none;
+        }
+      }
+    }
+    &-bottom {
+      height: calc(100% - 515px);
+      margin-top: 8px;
+    }
+  }
+  &-right {
+    flex: 1;
+    height: 100%;
+    width: calc(100% - 416px);
+    &-top {
+      padding: 18px 0;
+      &-left {
+        line-height: 30px;
+      }
+      &-right {
+        padding-right: 70px;
+        .btn-img {
+          margin-left: 10px;
+        }
+      }
+    }
+    &-bottom {
+      height: calc(100% - 68px);
+    }
+  }
+}
+</style>

+ 14 - 6
src/views/newQuery/components/table.vue

@@ -75,14 +75,14 @@ export default {
       type: Boolean,
       default: true,
     },
-    isTable: {
-      type: Boolean,
-      default: false,
-    },
     tableTag: {
       type: Object,
       default: () => { }
     },
+    tableName: {
+      type: String,
+      default: ''
+    },
     istableCol: {
       type: Boolean,
       default: false,
@@ -162,8 +162,16 @@ export default {
       deep: true
     }
   },
-  mounted () {
+  created () {
+    if (this.AauthTable && this.AauthTable.length) {
+      const t = this.AauthTable.filter(item => item.auth_name == this.tableName)
+      const obj = t[0]
+      this.AqueryId = obj.queryTemplateID
+      this.AauthId = obj.auth_id
+    }
     this.getColumnData()
+  },
+  mounted () {
     this.setCellClick()
   },
   updated () {
@@ -273,7 +281,7 @@ export default {
       this.tableData = []
     },
     load () {
-      if (Object.keys(this.tableTag).length) {
+      if (this.tableTag && Object.keys(this.tableTag).length) {
         if (this.noMore || this.loading) {
           return;
         }