chenjun 2 年之前
父节点
当前提交
719d2c12c6

+ 44 - 20
src/views/baggageManagement/components/departure/index.vue

@@ -17,7 +17,7 @@
         class="form"
       >
         <el-form-item prop="currentAirport">
-          <el-cascader
+          <!-- <el-cascader
             v-model="formData.currentAirport"
             style="width:144px;margin-left:10px"
             placeholder="全部机场"
@@ -28,7 +28,16 @@
             clearable
             filterable
             @change="setCurrentAirport"
-          />
+          /> -->
+          <el-select v-model="formData.currentAirport" clearable  @change="airPortChange" placeholder="请选择机场">
+            <el-option
+              v-for="(item,index) in AirportList"
+              :key="index"
+              :label="item.PlanDepartureApt"
+              :value="item.PlanDepartureApt"
+             >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item prop="startDate">
           <el-date-picker
@@ -183,12 +192,12 @@ import Dialog from '@/layout/components/Dialog'
 import terminalMixin from '../../mixins/terminal'
 import formMixin from '../../mixins/form'
 import tableColsMixin from '../../mixins/tableCols'
-import { advancedInquiry, getQuery } from '@/api/flight'
+import { getQuery } from '@/api/flight'
 
 export default {
   name: 'DepartureTerminalView',
   components: { Dialog },
-  mixins: [terminalMixin, formMixin, tableColsMixin],
+  mixins: [terminalMixin,formMixin, tableColsMixin],
   data() {
     return {
       // 初始表头
@@ -317,6 +326,7 @@ export default {
           statName: '中转进行李'
         }
       ],
+      AirportList:[],
       FlightNOItem: [],
       PlanDepartureTimeItemArr:[],
       PlanLandingAptItemArr:[],
@@ -325,9 +335,12 @@ export default {
     }
   },
   created(){
-    this.getAirPortData()
+    this.getAirPortData();
   },
   methods: {
+    airPortChange(){
+      this.getTableData()
+    },
     async getAirPortData(){
       try {
         const res = await getQuery({
@@ -335,7 +348,9 @@ export default {
           dataContent:[]
         })
         if (res.code == 0) {
-          console.log(res)
+         this.AirportList = res.returnData
+         this.formData.currentAirport = "PEK"
+         this.getTableData()
         } else {
           this.$message.error(res.message)
         }
@@ -358,21 +373,30 @@ export default {
       }
     },
     // 获取表单下拉框数据
-    getFormData(params) {
-      this.relatedAirportQuery({
-        ...params,
-        type: 'OUT'
-      })
-      this.outgoingAirlineQuery(params)
-      this.craftTypeQuery(params)
-      this.flightAttrQuery(params)
-    },
+    // getFormData(params) {
+    //   this.relatedAirportQuery({
+    //     ...params,
+    //     type: 'OUT'
+    //   })
+    //   this.outgoingAirlineQuery(params)
+    //   this.craftTypeQuery(params)
+    //   this.flightAttrQuery(params)
+    // },
     // 获取表格数据
-    getTableData(params) {
-      this.integratedQuery({
-        ...params,
-        type: 'OUT'
-      })
+    async getTableData() {
+      try {
+        const res = await getQuery({
+          id: 66,
+          dataContent:[this.formData.currentAirport,this.formData.startDate,this.formData.endDate]
+        })
+        if (res.code == 0) {
+         console.log(res)
+        } else {
+          this.$message.error(res.message)
+        }
+      } catch (error) {
+        console.log('出错了', error)
+      }
     },
     initTableData(tableData) {
       tableData.forEach(item => {

+ 1 - 1
src/views/baggageManagement/mixins/terminal.js

@@ -32,7 +32,7 @@ export default {
   //   this.currentAirportQuery()
   // },
   mounted() {
-    this.queryDepartureAirport()
+    // this.queryDepartureAirport()
   },
   computed: {
     dates() {