zhaoke 1 жил өмнө
parent
commit
f63f10daba

+ 11 - 1
src/views/newArrival/index.vue

@@ -80,7 +80,8 @@ export default {
       },
       loading: false,
       AirportList: [],
-      tableTag: {}
+      tableTag: {},
+      timer: null
     };
   },
   computed: {
@@ -92,6 +93,15 @@ export default {
   created () {
     this.getAirPortData()
   },
+  mounted () {
+    this.timer = setInterval(() => {
+      this.getAirPortData()
+    }, LOOP_INTERVAL.arrivalTable)
+  },
+  destroyed () {
+    clearInterval(this.timer)
+    this.timer = null
+  },
   methods: {
     airPortChange (val) {
       this.formData.currentAirport = val

+ 16 - 1
src/views/newDeparture/index.vue

@@ -11,6 +11,11 @@
     <div ref="formWrap" class="terminal-form-wrap">
       <el-form ref="form" :inline="true" :model="formData" :rules="rules" class="form">
         <div class="form-left">
+          <!-- <el-form-item prop="company">
+            <el-select v-model="formData.company" class="input-shadow" size="small" style="width: 150px" filterable default-first-option placeholder="请选择航班属性" @change="airPortChange">
+              <el-option v-for="(item, index) in companyOptions" :key="index" :label="item.label" :value="item.value" />
+            </el-select>
+          </el-form-item> -->
           <el-form-item prop="currentAirport">
             <el-select v-model="formData.currentAirport" class="input-shadow" size="small" style="width: 150px" filterable default-first-option placeholder="请选择机场" @change="airPortChange">
               <el-option v-for="(item, index) in AirportList" :key="index" :label="item.IATACode" :value="item.IATACode" />
@@ -80,7 +85,8 @@ export default {
       },
       loading: false,
       AirportList: [],
-      tableTag: {}
+      tableTag: {},
+      timer: null
     };
   },
   computed: {
@@ -92,6 +98,15 @@ export default {
   created () {
     this.getAirPortData()
   },
+  mounted () {
+    this.timer = setInterval(() => {
+      this.getAirPortData()
+    }, LOOP_INTERVAL.departureTable)
+  },
+  destroyed () {
+    clearInterval(this.timer)
+    this.timer = null
+  },
   methods: {
     airPortChange (val) {
       this.formData.currentAirport = val

+ 20 - 1
src/views/newDeparture/mixins/form.js

@@ -24,6 +24,7 @@ export default {
     return {
       formData: {
         // 搜索表单数据
+        company: '国航',
         currentAirport: [],
         relatedAirport: [],
         inboundCarrier: [],
@@ -78,7 +79,25 @@ export default {
         // startDate: [{ required: true, message: '请选择开始时间', trigger: 'change' }],
         // endDate: [{ required: true, message: '请选择结束时间', trigger: 'change' }]
         flightDate: [{ validator: dateValidator, trigger: ['change', 'blur'] }]
-      }
+      },
+      companyOptions: [
+        {
+          value: '国航',
+          label: '国航',
+        },
+        {
+          value: '代理国内',
+          label: '代理国内',
+        },
+        {
+          value: '代理国际',
+          label: '代理国际',
+        },
+        {
+          value: '非代理',
+          label: '非代理',
+        },
+      ],
     }
   },
   computed: {

+ 11 - 1
src/views/newTransfer/index.vue

@@ -83,7 +83,8 @@ export default {
       },
       loading: false,
       AirportList: [],
-      tableTag: {}
+      tableTag: {},
+      timer: null
     };
   },
   computed: {
@@ -95,6 +96,15 @@ export default {
   created () {
     this.getAirPortData()
   },
+  mounted () {
+    this.timer = setInterval(() => {
+      this.getAirPortData()
+    }, LOOP_INTERVAL.transferArrivalTable)
+  },
+  destroyed () {
+    clearInterval(this.timer)
+    this.timer = null
+  },
   methods: {
     airPortChange (val) {
       this.formData.currentAirport = val