|
@@ -106,10 +106,60 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
selectedFilter: [],
|
|
|
+ viewClassName: [
|
|
|
+ {
|
|
|
+ label: '值机',
|
|
|
+ value: 'check_in_baggage_number'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '未激活',
|
|
|
+ value: 'NO_activate_number'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '预计装载',
|
|
|
+ value: 'estimated_load_number'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '安检',
|
|
|
+ value: 'screened_number'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '分拣',
|
|
|
+ value: 'sorted_number'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '装车',
|
|
|
+ value: 'loaded_number'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '装机',
|
|
|
+ value: 'onaiecraft_number'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '待翻检',
|
|
|
+ value: 'NO_check_number'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '已翻减',
|
|
|
+ value: 'checked_number'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '取消托运',
|
|
|
+ value: 'cancel_consignment_number'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '无bsm',
|
|
|
+ value: 'NO_BSM_number'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '中转行李',
|
|
|
+ value: 'transfer_baggage_number'
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- fastFilter() {
|
|
|
+ fastFilter () {
|
|
|
const [key, value] = this.selectedFilter
|
|
|
if (!key) {
|
|
|
return () => true
|
|
@@ -119,6 +169,30 @@ export default {
|
|
|
case 'inflightNo':
|
|
|
case 'transferFlightNO':
|
|
|
return value ? row[key] === value : (row[key] ?? '') !== ''
|
|
|
+ case 'check_in_baggage_number':
|
|
|
+ return row['No_BSM'] == 0
|
|
|
+ case 'NO_activate_number':
|
|
|
+ return row['activeState'] == 1
|
|
|
+ case 'estimated_load_number':
|
|
|
+ return row['dataState'] != 'DEL' && row['activeState'] != 1
|
|
|
+ case 'screened_number':
|
|
|
+ return row['securityInspectionResults']
|
|
|
+ case 'sorted_number':
|
|
|
+ return row['sorting_time']
|
|
|
+ case 'loaded_number':
|
|
|
+ return row['loading_time'] && (row['abnormalType'] == 'OFF' || !row['abnormalType'])
|
|
|
+ case 'onaiecraft_number':
|
|
|
+ return row['installation_time']
|
|
|
+ case 'NO_check_number':
|
|
|
+ return row['dataState'] == 'DEL' && row['loading_time'] && (row['abnormalType'] != 'OFF' || !row['abnormalType'])
|
|
|
+ case 'checked_number':
|
|
|
+ return row['dataState'] == 'DEL' && row['abnormalType'] == 'OFF'
|
|
|
+ case 'cancel_consignment_number':
|
|
|
+ return row['dataState'] == 'DEL'
|
|
|
+ case 'NO_BSM_number':
|
|
|
+ return row['No_BSM'] == 1
|
|
|
+ case 'transfer_baggage_number':
|
|
|
+ return row['inflightNo'] && row['dataState'] != 'DEL'
|
|
|
default:
|
|
|
return (row[key] ?? '') !== ''
|
|
|
}
|
|
@@ -146,7 +220,7 @@ export default {
|
|
|
k2: 'departure_flights_date'
|
|
|
}
|
|
|
]
|
|
|
- const nq = this.formatParams(np, query)
|
|
|
+ const nq = this.formatParams(np, { ...query })
|
|
|
const filterMap = {
|
|
|
Inbound_flight_number: 'inflightNo',
|
|
|
departure_flights_number: 'transferFlightNO'
|
|
@@ -166,6 +240,17 @@ export default {
|
|
|
delete nq[key]
|
|
|
}
|
|
|
})
|
|
|
+ let tableKey = null
|
|
|
+ Object.keys({ ...query }).forEach((key) => {
|
|
|
+ const findKey = this.viewClassName.filter(item => item.value === key)
|
|
|
+ if (findKey?.length) {
|
|
|
+ tableKey = [...findKey]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (tableKey?.length) {
|
|
|
+ const { value } = tableKey[0]
|
|
|
+ this.selectedFilter = [value]
|
|
|
+ }
|
|
|
const { carrierFlights, carrierFlightsDate } = nq
|
|
|
this.flightObj = nq
|
|
|
this.dataContent = nq
|
|
@@ -276,10 +361,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 获取行李列表后设置快捷筛选
|
|
|
- tableLoad(tableData) {
|
|
|
- this.setFastFilterOptions(tableData)
|
|
|
+ tableLoad (tableData) {
|
|
|
+ const query = this.$route.query
|
|
|
+ let tableKey = null
|
|
|
+ Object.keys(query).forEach((key) => {
|
|
|
+ const findKey = this.viewClassName.filter(item => item.value === key)
|
|
|
+ if (findKey?.length) {
|
|
|
+ tableKey = [...findKey]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (tableKey?.length) {
|
|
|
+ this.fastFilterOptions = []
|
|
|
+ this.fastFilterOptions = [...this.viewClassName].map(item => ({
|
|
|
+ label: item.label,
|
|
|
+ value: item.value
|
|
|
+ }))
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.setFastFilterOptions(tableData)
|
|
|
+ }
|
|
|
},
|
|
|
- setFastFilterOptions(tableData) {
|
|
|
+ setFastFilterOptions (tableData) {
|
|
|
const inFlightNOList = new Set()
|
|
|
const transferFlightNOList = new Set()
|
|
|
tableData.forEach(item => {
|