|
@@ -157,15 +157,13 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item
|
|
|
label="航班号"
|
|
|
- prop="flightNumber"
|
|
|
+ prop="FlightNO"
|
|
|
>
|
|
|
<el-input
|
|
|
- v-model="form.flightNumber"
|
|
|
+ v-model="form.FlightNO"
|
|
|
size="small"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -186,8 +184,6 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="行李牌号">
|
|
|
<el-input
|
|
@@ -200,6 +196,7 @@
|
|
|
<el-form-item label="特殊行李类型">
|
|
|
<el-select
|
|
|
v-model="form.type"
|
|
|
+ size="small"
|
|
|
filterable
|
|
|
allow-create
|
|
|
default-first-option
|
|
@@ -222,8 +219,6 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="旅客姓名">
|
|
|
<el-input
|
|
@@ -243,7 +238,7 @@
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="值机序号">
|
|
|
<el-input
|
|
|
- v-model="form.check"
|
|
|
+ v-model="form.checkInSequence"
|
|
|
size="small"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -266,17 +261,90 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="已翻减">
|
|
|
- <!-- <el-input
|
|
|
- v-model="form.DealResult"
|
|
|
+ <el-select
|
|
|
+ v-model="form.unLoad"
|
|
|
size="small"
|
|
|
- /> -->
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ label="是"
|
|
|
+ :value="1"
|
|
|
+ />
|
|
|
+ <el-option
|
|
|
+ label="否"
|
|
|
+ :value="0"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="已值机">
|
|
|
<el-select
|
|
|
- v-model="form.DealResult"
|
|
|
+ v-model="form.checkIn"
|
|
|
+ size="small"
|
|
|
clearable
|
|
|
>
|
|
|
<el-option
|
|
|
- label="OFF"
|
|
|
- value="OFF"
|
|
|
+ label="是"
|
|
|
+ :value="1"
|
|
|
+ />
|
|
|
+ <el-option
|
|
|
+ label="否"
|
|
|
+ :value="0"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="已激活">
|
|
|
+ <el-select
|
|
|
+ v-model="form.active"
|
|
|
+ size="small"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ label="是"
|
|
|
+ :value="1"
|
|
|
+ />
|
|
|
+ <el-option
|
|
|
+ label="否"
|
|
|
+ :value="0"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="中转行李">
|
|
|
+ <el-select
|
|
|
+ v-model="form.transferIn"
|
|
|
+ size="small"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ label="是"
|
|
|
+ value="1"
|
|
|
+ />
|
|
|
+ <el-option
|
|
|
+ label="否"
|
|
|
+ value="0"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="已取消">
|
|
|
+ <el-select
|
|
|
+ v-model="form.canceled"
|
|
|
+ size="small"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ label="是"
|
|
|
+ value="1"
|
|
|
+ />
|
|
|
+ <el-option
|
|
|
+ label="否"
|
|
|
+ value="0"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -307,6 +375,8 @@ import Dialog from '@/layout/components/Dialog'
|
|
|
import { parseTime } from '@/utils/index'
|
|
|
import { queryMap, myQuery } from '@/api/dataIntegration'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
+import { setTableFilters } from '@/utils/table'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'Advance',
|
|
|
components: { Search, Dialog },
|
|
@@ -405,7 +475,7 @@ export default {
|
|
|
time: [parseTime(new Date(), '{y}-{m}-{d}'), parseTime(new Date(), '{y}-{m}-{d}')],
|
|
|
form: {
|
|
|
status: '',
|
|
|
- flightNumber: '',
|
|
|
+ FlightNO: '',
|
|
|
destination: '',
|
|
|
station: '',
|
|
|
grade: '',
|
|
@@ -413,16 +483,20 @@ export default {
|
|
|
U_Device_ID: '',
|
|
|
name: '',
|
|
|
pnr: '',
|
|
|
- check: '',
|
|
|
+ checkInSequence: '',
|
|
|
transferArrival: '',
|
|
|
transferDeparture: '',
|
|
|
- DealResult: ''
|
|
|
+ unLoad: '',
|
|
|
+ checkIn: '',
|
|
|
+ active: '',
|
|
|
+ transferIn: '',
|
|
|
+ canceled: ''
|
|
|
},
|
|
|
baggageTypeList: [],
|
|
|
dataContent: [],
|
|
|
rules: {
|
|
|
// 机器信息表单验证
|
|
|
- // flightNumber: [
|
|
|
+ // FlightNO: [
|
|
|
// { required: true, message: "请输入有效航班号", trigger: "blur" },
|
|
|
// ],
|
|
|
},
|
|
@@ -446,7 +520,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['clickedCells'])
|
|
|
+ ...mapGetters(['clickedCells', 'queryForm'])
|
|
|
},
|
|
|
created() {
|
|
|
// console.log(this.$store.state.app.queryForm)
|
|
@@ -456,11 +530,6 @@ export default {
|
|
|
// dataContent.push(null)
|
|
|
// }
|
|
|
// this.statItemsQueryByStatMain(dataContent);
|
|
|
- if (this.$store.state.app.queryForm) {
|
|
|
- this.form = this.$store.state.app.queryForm
|
|
|
- this.time = this.form.time
|
|
|
- this.onCheckGj()
|
|
|
- }
|
|
|
},
|
|
|
mounted() {
|
|
|
this.baggageTypeQuery()
|
|
@@ -468,79 +537,27 @@ export default {
|
|
|
document.querySelector('.interfaceLog_head_time_start .el-input__prefix').innerHTML = '开始:'
|
|
|
document.querySelector('.interfaceLog_head_time_end .el-input__prefix i').remove()
|
|
|
document.querySelector('.interfaceLog_head_time_end .el-input__prefix').innerHTML = '结束:'
|
|
|
- const {
|
|
|
- FlightNO,
|
|
|
- FlightDate,
|
|
|
- name,
|
|
|
- grade,
|
|
|
- startDate,
|
|
|
- endDate,
|
|
|
- station,
|
|
|
- destination,
|
|
|
- UDeviceID,
|
|
|
- transferArrival,
|
|
|
- transferDeparture
|
|
|
- } = this.$route.query
|
|
|
- if (FlightNO && FlightDate) {
|
|
|
- this.$router.replace(this.$route.path)
|
|
|
- const parsedTime = parseTime(new Date(FlightDate), '{y}-{m}-{d}')
|
|
|
- this.time[0] = this.time[1] = parsedTime
|
|
|
- this.$refs['search'].setSearch(FlightNO)
|
|
|
- this.getSearchData(FlightNO)
|
|
|
- }
|
|
|
- if (startDate && endDate) {
|
|
|
- this.time[0] = startDate
|
|
|
- this.time[1] = endDate
|
|
|
- }
|
|
|
|
|
|
- if (name && station) {
|
|
|
- this.form['name'] = name
|
|
|
- this.form['station'] = station
|
|
|
- this.onCheckGj()
|
|
|
- }
|
|
|
-
|
|
|
- if (grade && station) {
|
|
|
- this.form['grade'] = grade
|
|
|
- this.form['station'] = station
|
|
|
- this.onCheckGj()
|
|
|
- }
|
|
|
-
|
|
|
- if (FlightNO && station) {
|
|
|
- this.form['flightNumber'] = FlightNO
|
|
|
- this.form['station'] = station
|
|
|
- this.onCheckGj()
|
|
|
- }
|
|
|
-
|
|
|
- if (name && destination) {
|
|
|
- this.form['name'] = name
|
|
|
- this.form['destination'] = destination
|
|
|
- this.onCheckGj()
|
|
|
- }
|
|
|
-
|
|
|
- if (grade && destination) {
|
|
|
- this.form['grade'] = grade
|
|
|
- this.form['destination'] = destination
|
|
|
- this.onCheckGj()
|
|
|
- }
|
|
|
-
|
|
|
- if (FlightNO && destination) {
|
|
|
- this.form['flightNumber'] = FlightNO
|
|
|
- this.form['destination'] = destination
|
|
|
- this.onCheckGj()
|
|
|
- }
|
|
|
- if (UDeviceID && FlightNO) {
|
|
|
- this.form['flightNumber'] = FlightNO
|
|
|
- this.form['U_Device_ID'] = UDeviceID
|
|
|
- this.onCheckGj()
|
|
|
+ let flag = false
|
|
|
+ const query = this.$route.query
|
|
|
+ if (query) {
|
|
|
+ const { startDate, endDate } = query
|
|
|
+ Object.entries(query).forEach(([key, value]) => {
|
|
|
+ if (!['startDate', 'endDate'].includes(key) && (value ?? '') !== '') {
|
|
|
+ flag = true
|
|
|
+ this.form[key] = ['unLoad', 'checkIn', 'active', 'transferIn', 'canceled'].includes(key) ? Number(value) : value
|
|
|
+ }
|
|
|
+ })
|
|
|
+ startDate && (this.time[0] = startDate)
|
|
|
+ endDate && (this.time[1] = endDate)
|
|
|
}
|
|
|
- if (transferArrival && FlightNO) {
|
|
|
- this.form['flightNumber'] = FlightNO
|
|
|
- this.form['transferArrival'] = transferArrival
|
|
|
+ if (flag) {
|
|
|
this.onCheckGj()
|
|
|
- }
|
|
|
- if (transferDeparture && FlightNO) {
|
|
|
- this.form['flightNumber'] = FlightNO
|
|
|
- this.form['transferDeparture'] = transferDeparture
|
|
|
+ } else if (this.queryForm) {
|
|
|
+ Object.keys(this.form).forEach(key => {
|
|
|
+ this.form[key] = this.queryForm[key]
|
|
|
+ })
|
|
|
+ this.time = this.queryForm.time
|
|
|
this.onCheckGj()
|
|
|
}
|
|
|
},
|
|
@@ -552,11 +569,13 @@ export default {
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
// console.log(this.$route.matched.filter(item => item.name && item.meta.title))
|
|
|
- this.form.time = this.time
|
|
|
if (this.$route.matched.filter(item => item.name && item.meta.title).length > 1) {
|
|
|
- this.$store.state.app.queryForm = this.form
|
|
|
+ this.$store.dispatch('app/setQueryForm', {
|
|
|
+ ...this.form,
|
|
|
+ time: this.time
|
|
|
+ })
|
|
|
} else {
|
|
|
- this.$store.state.app.queryForm = null
|
|
|
+ this.$store.dispatch('app/setQueryForm', null)
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -633,6 +652,9 @@ export default {
|
|
|
if (this.time[0] === '' || this.time[1] === '' || val === '') {
|
|
|
this.$message.error('请先输入完整查询信息')
|
|
|
} else {
|
|
|
+ // 点击搜索后清除跳转携带的查询信息
|
|
|
+ this.$route.query && this.$router.replace(this.$route.path)
|
|
|
+
|
|
|
// let searchData = {dataContent:[this.time[0],this.time[1],val]}
|
|
|
const az = /^[a-zA-Z]+$/
|
|
|
const azNum = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]*$/
|
|
@@ -645,7 +667,7 @@ export default {
|
|
|
this.onCheckGj()
|
|
|
} else if (azNum.test(val) && top2.test(val)) {
|
|
|
// 字母加数字且前两位为字母则为航班号
|
|
|
- this.form['flightNumber'] = val
|
|
|
+ this.form['FlightNO'] = val
|
|
|
this.onCheckGj()
|
|
|
} else if (num.test(val) && val.length === 10) {
|
|
|
// 纯数字且位数等于10则为行李牌号
|
|
@@ -663,58 +685,56 @@ export default {
|
|
|
},
|
|
|
// 高级查询-确定
|
|
|
onCheckGj() {
|
|
|
- // 参数顺序 【航班开始日期,航班结束日期,航班号,航班号,行李牌号,行李牌号,起飞站,起飞站,目的站,目的站,特殊行李类型,特殊 行李类型,旅客姓名大写拼音,旅客姓名大写拼音,pnr,pnr,值机号,值机号】
|
|
|
+ /* 参数顺序
|
|
|
+ 【航班开始日期,航班结束日期,航班号,航班号,行李牌号,行李牌号,起飞站,起飞站,目的站,目的站,特殊行李类型,特殊行李类型,旅客姓名大写拼音,旅客姓名大写拼音,
|
|
|
+ pnr,pnr,值机号,值机号,中转进航班,中转进航班,中转出航班,中转出航班,容器编号,容器编号,
|
|
|
+ 是否已翻减(null/OFF/其他),是否已翻减(null/OFF/其他),是否值机(null/0/1),是否值机(null/0/1),
|
|
|
+ 是否激活(null/0/1),是否激活(null/0/1),是否中转(null/0/1),是否中转(null/0/1),是否取消行李(null/0/1),是否取消行李(null/0/1)】 */
|
|
|
this.dataContent = []
|
|
|
const time = this.time
|
|
|
- const {
|
|
|
- status,
|
|
|
- flightNumber,
|
|
|
- destination,
|
|
|
- station,
|
|
|
- grade,
|
|
|
- type,
|
|
|
- U_Device_ID,
|
|
|
- name,
|
|
|
- pnr,
|
|
|
- check,
|
|
|
- transferArrival,
|
|
|
- transferDeparture,
|
|
|
- DealResult
|
|
|
- } = this.form
|
|
|
if (time && time.length) {
|
|
|
this.dataContent.push(time[0])
|
|
|
this.dataContent.push(time[1])
|
|
|
- if (
|
|
|
- status === '' &&
|
|
|
- flightNumber === '' &&
|
|
|
- destination === '' &&
|
|
|
- station === '' &&
|
|
|
- grade === '' &&
|
|
|
- type === '' &&
|
|
|
- U_Device_ID === '' &&
|
|
|
- name === '' &&
|
|
|
- pnr === '' &&
|
|
|
- check === '' &&
|
|
|
- transferArrival === '' &&
|
|
|
- transferDeparture === '' &&
|
|
|
- DealResult === ''
|
|
|
- ) {
|
|
|
+ if (Object.values(this.form).every(value => value === '')) {
|
|
|
this.$message.error('请先输入查询信息')
|
|
|
} else {
|
|
|
+ const {
|
|
|
+ status,
|
|
|
+ FlightNO,
|
|
|
+ grade,
|
|
|
+ station,
|
|
|
+ destination,
|
|
|
+ type,
|
|
|
+ name,
|
|
|
+ pnr,
|
|
|
+ checkInSequence,
|
|
|
+ transferArrival,
|
|
|
+ transferDeparture,
|
|
|
+ U_Device_ID,
|
|
|
+ unLoad,
|
|
|
+ checkIn,
|
|
|
+ active,
|
|
|
+ transferIn,
|
|
|
+ canceled
|
|
|
+ } = this.form
|
|
|
this.setDataContent(
|
|
|
status,
|
|
|
- flightNumber,
|
|
|
+ FlightNO,
|
|
|
grade,
|
|
|
station,
|
|
|
destination,
|
|
|
type,
|
|
|
name,
|
|
|
pnr,
|
|
|
- check,
|
|
|
+ checkInSequence,
|
|
|
transferArrival,
|
|
|
transferDeparture,
|
|
|
U_Device_ID,
|
|
|
- DealResult
|
|
|
+ unLoad,
|
|
|
+ checkIn,
|
|
|
+ active,
|
|
|
+ transferIn,
|
|
|
+ canceled
|
|
|
)
|
|
|
this.statItemsQueryByStatMain(this.dataContent)
|
|
|
this.gjFlag = false
|
|
@@ -729,8 +749,8 @@ export default {
|
|
|
},
|
|
|
setDataContent(...dataContent) {
|
|
|
dataContent.forEach(target => {
|
|
|
- if (target) {
|
|
|
- target = target.trim()
|
|
|
+ target = typeof target === 'string' ? target.trim() : target
|
|
|
+ if ((target ?? '') !== '') {
|
|
|
this.dataContent.push(target, target)
|
|
|
} else {
|
|
|
this.dataContent.push(null, null)
|
|
@@ -742,29 +762,34 @@ export default {
|
|
|
this.loading = true
|
|
|
try {
|
|
|
const result = await myQuery(queryMap.advacedQuery, ...dataContent)
|
|
|
- this.tableData = this._.sortBy(result, ['FlightNO', 'FlightDate'])
|
|
|
- this.spanArr = []
|
|
|
- let contactDot = this.contactDot
|
|
|
- this.tableData.forEach((item, index) => {
|
|
|
- item.index = index
|
|
|
- item['deleted'] === 'DEL' || (item['deleted'] = '')
|
|
|
- item['activated'] = item['activated'] === 'I' ? '未激活' : '激活'
|
|
|
- if (index === 0) {
|
|
|
- this.spanArr.push(1)
|
|
|
- } else {
|
|
|
- if (
|
|
|
- item.FlightNO === this.tableData[index - 1].FlightNO &&
|
|
|
- item.FlightDate === this.tableData[index - 1].FlightDate
|
|
|
- ) {
|
|
|
- this.spanArr[contactDot] += 1
|
|
|
- this.spanArr.push(0)
|
|
|
- } else {
|
|
|
+ if (result.length) {
|
|
|
+ const tableData = this._.sortBy(result, ['FlightNO', 'FlightDate'])
|
|
|
+ this.spanArr = []
|
|
|
+ let contactDot = this.contactDot
|
|
|
+ this.tableData = tableData.map((item, index, arr) => {
|
|
|
+ item.index = index
|
|
|
+ item['deleted'] === 'DEL' || (item['deleted'] = '')
|
|
|
+ item['activated'] = item['activated'] === 'I' ? '未激活' : '激活'
|
|
|
+ if (index === 0) {
|
|
|
this.spanArr.push(1)
|
|
|
- contactDot = index
|
|
|
+ } else {
|
|
|
+ if (
|
|
|
+ item.FlightNO === arr[index - 1].FlightNO &&
|
|
|
+ item.FlightDate === arr[index - 1].FlightDate
|
|
|
+ ) {
|
|
|
+ this.spanArr[contactDot] += 1
|
|
|
+ this.spanArr.push(0)
|
|
|
+ } else {
|
|
|
+ this.spanArr.push(1)
|
|
|
+ contactDot = index
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
- this.setTableFilters(this.tableData, this.tableDataFilters)
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ setTableFilters(this.tableData, this.tableDataFilters)
|
|
|
+ } else {
|
|
|
+ this.$message.info('未查询到匹配结果')
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
console.log('出错了', error)
|
|
|
}
|
|
@@ -795,27 +820,6 @@ export default {
|
|
|
// console.log('出错了', error)
|
|
|
// }
|
|
|
// },
|
|
|
- // 表格添加过滤条件
|
|
|
- setTableFilters(tableData = this.tableData, filters = this.tableDataFilters) {
|
|
|
- const tempSets = {}
|
|
|
- Object.keys(filters).forEach(key => {
|
|
|
- tempSets[key] = new Set()
|
|
|
- })
|
|
|
- tableData.forEach(item => {
|
|
|
- Object.keys(tempSets).forEach(key => {
|
|
|
- (item[key] ?? '') !== '' && tempSets[key].add(item[key])
|
|
|
- })
|
|
|
- })
|
|
|
- Object.keys(tempSets).forEach(key => {
|
|
|
- filters[key] = this._.orderBy(
|
|
|
- [...tempSets[key]].map(value => ({
|
|
|
- text: value,
|
|
|
- value
|
|
|
- })),
|
|
|
- o => o.value
|
|
|
- )
|
|
|
- })
|
|
|
- },
|
|
|
filterHandler(value, row, column) {
|
|
|
const property = column['property']
|
|
|
return row[property] === value
|