chenjun 3 years ago
parent
commit
78aabcc0fa
1 changed files with 60 additions and 69 deletions
  1. 60 69
      src/views/baggageManagement/components/departure/index.vue

+ 60 - 69
src/views/baggageManagement/components/departure/index.vue

@@ -19,7 +19,7 @@
         <el-form-item prop="currentAirport">
           <el-cascader
             v-model="formData.currentAirport"
-            style="width:144px;"
+            style="width:144px;margin-left:10px"
             placeholder="全部机场"
             size="small"
             :options="currentAirportList"
@@ -30,62 +30,6 @@
             @change="setCurrentAirport"
           />
         </el-form-item>
-        <el-form-item prop="relatedAirport">
-          <el-cascader
-            v-model="formData.relatedAirport"
-            style="width:136px;"
-            size="small"
-            :options="relatedAirportList"
-            :props="relatedAirportProps"
-            placeholder="全部目的地"
-            collapse-tags
-            clearable
-            filterable
-            @change="onSubmit"
-          />
-        </el-form-item>
-        <el-form-item prop="outgoingAirline">
-          <el-cascader
-            v-model="formData.outgoingAirline"
-            style="width:164px;"
-            size="small"
-            :options="carrierList"
-            :props="carrierProps"
-            placeholder="全部航司"
-            collapse-tags
-            clearable
-            filterable
-            @change="onSubmit"
-          />
-        </el-form-item>
-        <el-form-item prop="craftType">
-          <el-cascader
-            v-model="formData.craftType"
-            style="width:120px;"
-            size="small"
-            :options="craftTypeList"
-            :props="craftTypeProps"
-            placeholder="全部机型"
-            collapse-tags
-            clearable
-            filterable
-            @change="onSubmit"
-          />
-        </el-form-item>
-        <el-form-item prop="flightAttr">
-          <el-cascader
-            v-model="formData.flightAttr"
-            style="width:120px;"
-            size="small"
-            :options="flightAttrList"
-            :props="flightAttrProps"
-            placeholder="国际/国内"
-            collapse-tags
-            clearable
-            filterable
-            @change="onSubmit"
-          />
-        </el-form-item>
         <el-form-item prop="startDate">
           <el-date-picker
             v-model="formData.startDate"
@@ -108,7 +52,8 @@
             @change="setEndDate"
           />
         </el-form-item>
-        <el-form-item prop="search">
+        <div style="float:right">
+            <el-form-item prop="search">
           <el-input
             v-model="formData.search"
             style="width:240px;margin-left:105px;"
@@ -127,7 +72,7 @@
             @click="onSubmit"
           >搜索</el-button>
         </el-form-item>
-        <el-form-item v-is="['i_showTransit']">
+        <el-form-item>
           <el-switch
             v-model="formData.switch"
             style="margin-left:40px;"
@@ -157,6 +102,8 @@
             @click="show"
           >
         </el-form-item>
+        </div>
+
       </el-form>
     </div>
     <!--表格-->
@@ -187,6 +134,8 @@
           :label="item.statName"
           :width="item.width"
           :formatter="tableFormat"
+          :filters="item.filters"
+          :filter-method="item.filterMethod"
         />
       </el-table>
     </div>
@@ -234,6 +183,7 @@ 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'
 
 export default {
   name: 'DepartureTerminalView',
@@ -246,37 +196,51 @@ export default {
         {
           statCode: 'FlightNO',
           statName: '航班号',
-          width: 132
+          width: 132,
+          filters:this.bagLocationItem,
+          filterMethod:this.filterHandler
         },
         {
           statCode: 'FlightDate',
           statName: '执飞日期',
-          width: 105
+          width: 105,
+          filters:this.FlightDateItemArr,
+          filterMethod:this.filterHandler
         },
         {
           statCode: 'PlanDepartureTime',
           statName: '预计起飞时间',
-          width: 115
+          width: 115,
+          filters:this.PlanDepartureTimeItemArr,
+          filterMethod:this.filterHandler
         },
         {
           statCode: 'PlanLandingApt',
           statName: '目的站',
-          width: 71
+          width: 71,
+          filters:this.PlanLandingAptItemArr,
+          filterMethod:this.filterHandler
         },
         {
           statCode: 'DepartureBuild',
           statName: '航站楼',
-          width: 65
+          width: 65,
+          filters:this.DepartureBuildItemArr,
+          filterMethod:this.filterHandler
         },
         {
           statCode: 'BordingGate',
           statName: '登机口',
-          width: 68
+          width: 68,
+          filters:this.BordingGateItemArr,
+          filterMethod:this.filterHandler
         },
         {
           statCode: 'StandForDepartrue',
           statName: '停机位',
-          width: 54
+          width: 60,
+          filters:this.StandForDepartrueItemArr,
+          filterMethod:this.filterHandler
         },
         {
           statCode: 'passagernum',
@@ -352,10 +316,33 @@ export default {
           statCode: 'transfer_all',
           statName: '中转进行李'
         }
-      ]
+      ],
+      FlightNOItem: [],
+      PlanDepartureTimeItemArr:[],
+      PlanLandingAptItemArr:[],
+      BordingGateItemArr:[],
+      StandForDepartrueItemArr:[]
     }
   },
+  created(){
+    this.getAirPortData()
+  },
   methods: {
+    async getAirPortData(){
+      try {
+        const res = await getQuery({
+          id: 65,
+          dataContent:[]
+        })
+        if (res.code == 0) {
+          console.log(res)
+        } else {
+          this.$message.error(res.message)
+        }
+      } catch (error) {
+        console.log('出错了', error)
+      }
+    },
     tableRowClassName({ row, rowIndex }) {
       if (rowIndex < 5) {
         return 'bgl-hui'
@@ -392,7 +379,11 @@ export default {
         item['wantfanj'] = item['delbag'] - item['hasfanj']
       })
       this.tableData = this._.sortBy(tableData, ['FlightDate', 'PlanDepartureTime'])
-    }
+    },
+    filterHandler(value, row, column) {
+      const property = column['property']
+      return row[property] === value
+    },
   }
 }
 </script>
@@ -430,7 +421,7 @@ export default {
   }
 }
 .departure-table {
-  width: calc(100vw - 60px);
+  width: 100%;
   ::v-deep .table {
     width: 100%;
     .cell {