|
@@ -8,17 +8,8 @@
|
|
|
<template>
|
|
|
<div class="arrival-one">
|
|
|
<!--功能区-表单-->
|
|
|
- <div
|
|
|
- ref="formWrap"
|
|
|
- class="terminal-form-wrap"
|
|
|
- >
|
|
|
- <el-form
|
|
|
- ref="form"
|
|
|
- :inline="true"
|
|
|
- :model="formData"
|
|
|
- :rules="rules"
|
|
|
- class="form"
|
|
|
- >
|
|
|
+ <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="currentAirport">
|
|
|
<!-- <el-cascader
|
|
@@ -33,22 +24,8 @@
|
|
|
filterable
|
|
|
@change="setCurrentAirport"
|
|
|
/> -->
|
|
|
- <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.planLandingApt"
|
|
|
- :value="item.planLandingApt"
|
|
|
- />
|
|
|
+ <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.planDepartureApt" :value="item.planDepartureApt" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item prop="startDate">
|
|
@@ -75,76 +52,30 @@
|
|
|
@change="endDateChangeHandler"
|
|
|
/>
|
|
|
</el-form-item> -->
|
|
|
- <el-form-item
|
|
|
- prop="flightDate"
|
|
|
- label="航班日期"
|
|
|
- >
|
|
|
- <el-date-picker
|
|
|
- v-model="formData.flightDate"
|
|
|
- :clearable="false"
|
|
|
- size="small"
|
|
|
- style="width: 300px"
|
|
|
- type="daterange"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- :picker-options="dateRangePickerOptions"
|
|
|
- @change="dateChangeHandler"
|
|
|
- />
|
|
|
+ <el-form-item prop="flightDate" label="航班日期">
|
|
|
+ <el-date-picker v-model="formData.flightDate" :clearable="false" size="small" style="width: 300px" type="daterange" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="dateRangePickerOptions" @change="dateChangeHandler" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<div class="box-item">
|
|
|
<p>预计装载总数:</p>
|
|
|
- <li
|
|
|
- v-for="(item, index) in orderNum"
|
|
|
- :key="index"
|
|
|
- :class="{ 'number-item': !isNaN(item), 'mark-item': isNaN(item) }"
|
|
|
- >
|
|
|
+ <li v-for="(item, index) in orderNum" :key="index" :class="{ 'number-item': !isNaN(item), 'mark-item': isNaN(item) }">
|
|
|
<span v-if="!isNaN(item)">
|
|
|
<i ref="numberItem">0123456789</i>
|
|
|
</span>
|
|
|
- <span
|
|
|
- v-else
|
|
|
- class="comma"
|
|
|
- >{{ item }}</span
|
|
|
- >
|
|
|
+ <span v-else class="comma">{{ item }}</span>
|
|
|
</li>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="form-right"
|
|
|
- @keyup.enter="onSubmit(1)"
|
|
|
- >
|
|
|
+ <div class="form-right" @keyup.enter="onSubmit(1)">
|
|
|
<el-form-item prop="search">
|
|
|
- <el-popover
|
|
|
- :value="popoverVisible"
|
|
|
- placement="bottom"
|
|
|
- trigger="manual"
|
|
|
- >
|
|
|
+ <el-popover :value="popoverVisible" placement="bottom" trigger="manual">
|
|
|
<span>请输入航班号(示例:CA1234)或行李牌号(示例:1234567890)</span>
|
|
|
- <el-input
|
|
|
- slot="reference"
|
|
|
- v-model="formData.search"
|
|
|
- class="input-shadow"
|
|
|
- style="width: 240px; margin-left: 105px"
|
|
|
- size="small"
|
|
|
- placeholder="请输入内容"
|
|
|
- prefix-icon="el-icon-search"
|
|
|
- clearable
|
|
|
- @focus="popoverVisible = true"
|
|
|
- @blur="popoverVisible = false"
|
|
|
- />
|
|
|
+ <el-input slot="reference" v-model="formData.search" class="input-shadow" style="width: 240px; margin-left: 105px" size="small" placeholder="请输入内容" prefix-icon="el-icon-search" clearable @focus="popoverVisible = true" @blur="popoverVisible = false" />
|
|
|
</el-popover>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button
|
|
|
- class="btn-shadow"
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- @click="onSubmit(1)"
|
|
|
- >搜索</el-button
|
|
|
- >
|
|
|
+ <el-button class="btn-shadow" size="mini" type="primary" @click="onSubmit(1)">搜索</el-button>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item v-is="['is_timeIcon']">
|
|
|
<TimeZoneSelector />
|
|
@@ -156,75 +87,22 @@
|
|
|
<img class="btn-img btn-shadow" src="@/assets/baggage/ic_setting.png" title="列设置" @click="show" />
|
|
|
</el-form-item> -->
|
|
|
<el-form-item>
|
|
|
- <img
|
|
|
- class="btn-img btn-shadow"
|
|
|
- src="@/assets/baggage/ic_setting.png"
|
|
|
- title="列设置"
|
|
|
- @click="show"
|
|
|
- />
|
|
|
+ <img class="btn-img btn-shadow" src="@/assets/baggage/ic_setting.png" title="列设置" @click="show" />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-is="['dm_dt_columnSettings']">
|
|
|
- <img
|
|
|
- class="btn-img btn-shadow"
|
|
|
- src="@/assets/baggage/ic_export.png"
|
|
|
- title="导出"
|
|
|
- @click="exportHandler('table', '航站进港列表')"
|
|
|
- />
|
|
|
+ <img class="btn-img btn-shadow" src="@/assets/baggage/ic_export.png" title="导出" @click="exportHandler('table', '航站进港列表')" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<!--表格-->
|
|
|
- <div
|
|
|
- v-loading="loading"
|
|
|
- class="terminal-table"
|
|
|
- element-loading-text="拼命加载中"
|
|
|
- element-loading-spinner="el-icon-loading"
|
|
|
- element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
- >
|
|
|
- <el-table
|
|
|
- ref="table"
|
|
|
- class="table"
|
|
|
- :height="computedTableHeight"
|
|
|
- :data="dealedTableData"
|
|
|
- :header-cell-class-name="headerCellClass"
|
|
|
- :row-class-name="tableRowClassName"
|
|
|
- :cell-class-name="cellClass"
|
|
|
- show-summary
|
|
|
- :summary-method="summaryMethod"
|
|
|
- border
|
|
|
- stripe
|
|
|
- fit
|
|
|
- @cell-click="cellClickHandler"
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- v-for="col in tableColsCopy"
|
|
|
- :key="col.prop"
|
|
|
- :prop="col.prop"
|
|
|
- :label="col.label"
|
|
|
- :width="col.width"
|
|
|
- :fixed="col.fixed"
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- v-for="childCol in col.children"
|
|
|
- :key="childCol.prop"
|
|
|
- :prop="childCol.prop"
|
|
|
- :label="childCol.label"
|
|
|
- :width="childCol.width"
|
|
|
- :formatter="tableFormat"
|
|
|
- >
|
|
|
+ <div v-loading="loading" class="terminal-table" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)">
|
|
|
+ <el-table ref="table" class="table" :height="computedTableHeight" :data="dealedTableData" :header-cell-class-name="headerCellClass" :row-class-name="tableRowClassName" :cell-class-name="cellClass" show-summary :summary-method="summaryMethod" border stripe fit @cell-click="cellClickHandler">
|
|
|
+ <el-table-column v-for="col in tableColsCopy" :key="col.prop" :prop="col.prop" :label="col.label" :width="col.width" :fixed="col.fixed">
|
|
|
+ <el-table-column v-for="childCol in col.children" :key="childCol.prop" :prop="childCol.prop" :label="childCol.label" :width="childCol.width" :formatter="tableFormat">
|
|
|
<template #header>
|
|
|
- <el-tooltip
|
|
|
- :content="childCol.desc || childCol.label"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
- <TableHeaderCell
|
|
|
- :label="childCol.label"
|
|
|
- :filter-options="tableDataFilters[childCol.prop]"
|
|
|
- :filter-values.sync="filterValues[childCol.prop]"
|
|
|
- :sortable="childCol.sortable"
|
|
|
- :sort-rule.sync="tableDataSortRules[childCol.prop]"
|
|
|
- />
|
|
|
+ <el-tooltip :content="childCol.desc || childCol.label" placement="top">
|
|
|
+ <TableHeaderCell :label="childCol.label" :filter-options="tableDataFilters[childCol.prop]" :filter-values.sync="filterValues[childCol.prop]" :sortable="childCol.sortable" :sort-rule.sync="tableDataSortRules[childCol.prop]" />
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -232,41 +110,18 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<!--列设置-->
|
|
|
- <Dialog
|
|
|
- :flag="dialogFlag"
|
|
|
- class="dialog-check-group"
|
|
|
- >
|
|
|
+ <Dialog :flag="dialogFlag" class="dialog-check-group">
|
|
|
<div class="dialog-wrapper">
|
|
|
<div class="title">列设置</div>
|
|
|
<div class="content">
|
|
|
- <el-tree
|
|
|
- ref="columnSetTree"
|
|
|
- :data="tableCols"
|
|
|
- :class="colsCheckClass"
|
|
|
- show-checkbox
|
|
|
- node-key="index"
|
|
|
- :default-expand-all="true"
|
|
|
- :props="{
|
|
|
+ <el-tree ref="columnSetTree" :data="tableCols" :class="colsCheckClass" show-checkbox node-key="index" :default-expand-all="true" :props="{
|
|
|
label: 'label',
|
|
|
children: 'children'
|
|
|
- }"
|
|
|
- :default-checked-keys="checkedKeysTemp"
|
|
|
- @check="handleCheck"
|
|
|
- />
|
|
|
+ }" :default-checked-keys="checkedKeysTemp" @check="handleCheck" />
|
|
|
</div>
|
|
|
<div class="foot right t30">
|
|
|
- <el-button
|
|
|
- size="medium"
|
|
|
- class="r24"
|
|
|
- type="primary"
|
|
|
- @click="onCheck"
|
|
|
- >确定</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- size="medium"
|
|
|
- @click="hide"
|
|
|
- >取消</el-button
|
|
|
- >
|
|
|
+ <el-button size="medium" class="r24" type="primary" @click="onCheck">确定</el-button>
|
|
|
+ <el-button size="medium" @click="hide">取消</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</Dialog>
|
|
@@ -289,7 +144,7 @@ export default {
|
|
|
name: 'DepartureTerminalView',
|
|
|
components: { Dialog, TimeZoneSelector, TableHeaderCell },
|
|
|
mixins: [terminalMixin, formMixin, tableColsMixin, timeZoneMixin, pf],
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
orderNum: ['0', '0', '0', '0', '0', '0'], // 默认总数
|
|
|
popoverVisible: false,
|
|
@@ -486,11 +341,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- singleDay() {
|
|
|
+ singleDay () {
|
|
|
return this.startDate === this.endDate
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ mounted () {
|
|
|
this.getAirPortData()
|
|
|
this.table = this.$refs.table.bodyWrapper
|
|
|
const that = this
|
|
@@ -498,39 +353,39 @@ export default {
|
|
|
that.scrollTop = this.table.scrollTop
|
|
|
})
|
|
|
},
|
|
|
- activated() {
|
|
|
+ activated () {
|
|
|
this.table.scrollTop = this.scrollTop
|
|
|
this.getTableData()
|
|
|
this.loopEvent = setInterval(this.getTableData, LOOP_INTERVAL.arrivalTable)
|
|
|
},
|
|
|
- deactivated() {
|
|
|
+ deactivated () {
|
|
|
if (this.loopEvent) {
|
|
|
clearInterval(this.loopEvent)
|
|
|
this.loopEvent = null
|
|
|
}
|
|
|
},
|
|
|
- beforeDestroy() {
|
|
|
+ beforeDestroy () {
|
|
|
if (this.loopEvent) {
|
|
|
clearInterval(this.loopEvent)
|
|
|
this.loopEvent = null
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- resetLoopEvent() {
|
|
|
+ resetLoopEvent () {
|
|
|
this.loading = true
|
|
|
this.hasSetTableScroll = false
|
|
|
this.loopEvent && clearInterval(this.loopEvent)
|
|
|
this.getTableData()
|
|
|
this.loopEvent = setInterval(this.getTableData, LOOP_INTERVAL.arrivalTable)
|
|
|
},
|
|
|
- airPortChange() {
|
|
|
+ airPortChange () {
|
|
|
this.resetLoopEvent()
|
|
|
},
|
|
|
- dateChangeHandler() {
|
|
|
+ dateChangeHandler () {
|
|
|
this.resetLoopEvent()
|
|
|
},
|
|
|
// 选择机场
|
|
|
- async getAirPortData() {
|
|
|
+ async getAirPortData () {
|
|
|
try {
|
|
|
// const res = await TempQuery({
|
|
|
// id: SERVICE_ID.arrivalAirId,
|
|
@@ -548,7 +403,7 @@ export default {
|
|
|
this.$message.error('失败')
|
|
|
}
|
|
|
},
|
|
|
- tableRowClassName({ row, rowIndex }) {
|
|
|
+ tableRowClassName ({ row, rowIndex }) {
|
|
|
const classes = []
|
|
|
if (row.flightStatus === 'DLY') {
|
|
|
classes.push('bgl-delayed')
|
|
@@ -564,7 +419,7 @@ export default {
|
|
|
}
|
|
|
return classes.join(' ')
|
|
|
},
|
|
|
- headerCellClass({ row, column }) {
|
|
|
+ headerCellClass ({ row, column }) {
|
|
|
const classes = []
|
|
|
const rule = this.tableDataSortRules[column.property]
|
|
|
if (rule) {
|
|
@@ -583,7 +438,7 @@ export default {
|
|
|
// this.flightAttrQuery(params)
|
|
|
// },
|
|
|
// 获取表格数据
|
|
|
- async getTableData() {
|
|
|
+ async getTableData () {
|
|
|
if (!this.formData.currentAirport || !this.startDate || !this.endDate) {
|
|
|
return
|
|
|
}
|
|
@@ -606,7 +461,7 @@ export default {
|
|
|
this.loading = false
|
|
|
}
|
|
|
},
|
|
|
- initTableData(tableData) {
|
|
|
+ initTableData (tableData) {
|
|
|
this.baggageCount = 0
|
|
|
tableData.forEach(item => {
|
|
|
item['flightCanceled'] = item['flightStatus'] === 'CAN' ? 1 : 0
|
|
@@ -630,7 +485,7 @@ export default {
|
|
|
this.setTableScroll()
|
|
|
})
|
|
|
},
|
|
|
- setTableScroll() {
|
|
|
+ setTableScroll () {
|
|
|
this.arrivalCount = 0
|
|
|
this.dealedTableData.forEach(row => {
|
|
|
if (row['hasArrived']) {
|
|
@@ -656,7 +511,7 @@ export default {
|
|
|
}, 0)
|
|
|
this.hasSetTableScroll = true
|
|
|
},
|
|
|
- setNumberTransform() {
|
|
|
+ setNumberTransform () {
|
|
|
const numberItems = this.$refs.numberItem // 拿到数字的ref,计算元素数量
|
|
|
const numberArr = this.orderNum.filter(item => !isNaN(item))
|
|
|
// 结合CSS 对数字字符进行滚动,显示订单数量
|
|
@@ -666,7 +521,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- toOrderNum(num) {
|
|
|
+ toOrderNum (num) {
|
|
|
num = num.toString()
|
|
|
if (num.length < 6) {
|
|
|
num = '0' + num // 如未满八位数,添加"0"补位
|
|
@@ -679,7 +534,7 @@ export default {
|
|
|
}
|
|
|
this.setNumberTransform()
|
|
|
},
|
|
|
- exportHandler(refName, tableName) {
|
|
|
+ exportHandler (refName, tableName) {
|
|
|
if (this.loading) {
|
|
|
return
|
|
|
}
|
|
@@ -715,7 +570,7 @@ export default {
|
|
|
optgroup,
|
|
|
select,
|
|
|
textarea {
|
|
|
- font-family: Helvetica, 'Microsoft YaHei';
|
|
|
+ font-family: Helvetica, "Microsoft YaHei";
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
.el-switch__label {
|
|
@@ -821,7 +676,7 @@ export default {
|
|
|
padding: 0;
|
|
|
text-align: center;
|
|
|
font-size: 14px;
|
|
|
- font-family: Helvetica, 'Microsoft YaHei';
|
|
|
+ font-family: Helvetica, "Microsoft YaHei";
|
|
|
letter-spacing: 0;
|
|
|
}
|
|
|
.cell-click {
|
|
@@ -855,7 +710,7 @@ export default {
|
|
|
&.redBorder {
|
|
|
position: relative;
|
|
|
&::after {
|
|
|
- content: '';
|
|
|
+ content: "";
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
bottom: 0;
|