|
@@ -8,17 +8,8 @@
|
|
|
<template>
|
|
|
<div class="transfer-out">
|
|
|
<!--功能区-表单-->
|
|
|
- <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,21 +24,8 @@
|
|
|
filterable
|
|
|
@change="setCurrentAirport"
|
|
|
/> -->
|
|
|
- <el-select
|
|
|
- v-model="formData.currentAirport"
|
|
|
- class="input-shadow"
|
|
|
- size="small"
|
|
|
- style="width: 100px;"
|
|
|
- filterable
|
|
|
- placeholder="请选择机场"
|
|
|
- @change="airPortChange"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item, index) in AirportList"
|
|
|
- :key="index"
|
|
|
- :label="item.planDepartureApt"
|
|
|
- :value="item.planDepartureApt"
|
|
|
- />
|
|
|
+ <el-select v-model="formData.currentAirport" class="input-shadow" size="small" style="width: 100px" filterable 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="inboundCarrier">
|
|
@@ -106,14 +84,11 @@
|
|
|
@change="endDateChangeHandler"
|
|
|
/>
|
|
|
</el-form-item> -->
|
|
|
- <el-form-item
|
|
|
- prop="flightDate"
|
|
|
- label="航班日期"
|
|
|
- >
|
|
|
+ <el-form-item prop="flightDate" label="航班日期">
|
|
|
<el-date-picker
|
|
|
v-model="formData.flightDate"
|
|
|
size="small"
|
|
|
- style="width: 300px;"
|
|
|
+ style="width: 300px"
|
|
|
type="daterange"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
start-placeholder="开始日期"
|
|
@@ -125,38 +100,24 @@
|
|
|
<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(0)"
|
|
|
- >
|
|
|
+ <div class="form-right" @keyup.enter="onSubmit(0)">
|
|
|
<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;"
|
|
|
+ style="width: 240px"
|
|
|
size="small"
|
|
|
placeholder="请输入内容"
|
|
|
prefix-icon="el-icon-search"
|
|
@@ -167,51 +128,34 @@
|
|
|
</el-popover>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button
|
|
|
- class="btn-shadow"
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- @click="onSubmit(0)"
|
|
|
- >搜索</el-button>
|
|
|
+ <el-button class="btn-shadow" size="mini" type="primary" @click="onSubmit(0)">搜索</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-is="['td_showTransit']">
|
|
|
- <el-button
|
|
|
- class="btn-shadow"
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- @click="changeView"
|
|
|
- >切换视角</el-button>
|
|
|
+ <el-button class="btn-shadow" size="mini" type="primary" @click="changeView">切换视角</el-button>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-is="['td_timeIcon']">
|
|
|
+ <!-- <el-form-item v-is="['td_timeIcon']">
|
|
|
+ <TimeZoneSelector />
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item>
|
|
|
<TimeZoneSelector />
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-is="['td_columnSettings']">
|
|
|
- <img
|
|
|
- class="btn-img btn-shadow"
|
|
|
- src="@/assets/baggage/ic_setting.png"
|
|
|
- title="列设置"
|
|
|
- @click="show"
|
|
|
- >
|
|
|
+ <!-- <el-form-item v-is="['td_columnSettings']">
|
|
|
+ <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" />
|
|
|
</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', '航站中转进港列表')"
|
|
|
- >
|
|
|
+ <!-- <el-form-item v-is="['dm_dt_columnSettings']">
|
|
|
+ <img class="btn-img btn-shadow" src="@/assets/baggage/ic_export.png" title="导出" @click="exportHandler('table', '航站中转进港列表')" />
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item>
|
|
|
+ <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)"
|
|
|
- >
|
|
|
+ <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"
|
|
@@ -228,27 +172,10 @@
|
|
|
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"
|
|
|
- >
|
|
|
+ <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"
|
|
|
- >
|
|
|
+ <el-tooltip :content="childCol.desc || childCol.label" placement="top">
|
|
|
<TableHeaderCell
|
|
|
:label="childCol.label"
|
|
|
:filter-options="tableDataFilters[childCol.prop]"
|
|
@@ -263,10 +190,7 @@
|
|
|
</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">
|
|
@@ -285,16 +209,8 @@
|
|
|
/>
|
|
|
</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>
|
|
@@ -302,166 +218,166 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import Dialog from '@/layout/components/Dialog'
|
|
|
-import TimeZoneSelector from '@/components/TimeZoneSelector'
|
|
|
-import terminalMixin from '../../mixins/terminal'
|
|
|
-import formMixin from '../../mixins/form'
|
|
|
-import tableColsMixin from '../../mixins/tableCols'
|
|
|
-import timeZoneMixin from '../../mixins/timeZone'
|
|
|
-import { getQuery } from '@/api/flight'
|
|
|
-import TableHeaderCell from '@/components/TableHeaderCell'
|
|
|
-import { setTableFilters, throttledExportToExcel } from '@/utils/table'
|
|
|
+import Dialog from "@/layout/components/Dialog";
|
|
|
+import TimeZoneSelector from "@/components/TimeZoneSelector";
|
|
|
+import terminalMixin from "../../mixins/terminal";
|
|
|
+import formMixin from "../../mixins/form";
|
|
|
+import tableColsMixin from "../../mixins/tableCols";
|
|
|
+import timeZoneMixin from "../../mixins/timeZone";
|
|
|
+import { getQuery } from "@/api/flight";
|
|
|
+import TableHeaderCell from "@/components/TableHeaderCell";
|
|
|
+import { setTableFilters, throttledExportToExcel } from "@/utils/table";
|
|
|
|
|
|
export default {
|
|
|
- name: 'DepartureTerminalView',
|
|
|
+ name: "DepartureTerminalView",
|
|
|
components: { Dialog, TimeZoneSelector, TableHeaderCell },
|
|
|
mixins: [terminalMixin, formMixin, tableColsMixin, timeZoneMixin],
|
|
|
data() {
|
|
|
return {
|
|
|
optionProps: {
|
|
|
- value: 'inAicompanyCode2',
|
|
|
- label: 'inAicompanyCode2'
|
|
|
+ value: "inAicompanyCode2",
|
|
|
+ label: "inAicompanyCode2",
|
|
|
},
|
|
|
optionPropser: {
|
|
|
- value: 'outAicompanyCode2',
|
|
|
- label: 'outAicompanyCode2'
|
|
|
+ value: "outAicompanyCode2",
|
|
|
+ label: "outAicompanyCode2",
|
|
|
},
|
|
|
popoverVisible: false,
|
|
|
- orderNum: ['0', '0', '0', '0', '0', '0'], // 默认总数
|
|
|
+ orderNum: ["0", "0", "0", "0", "0", "0"], // 默认总数
|
|
|
// 初始表头
|
|
|
tableCols: [
|
|
|
{
|
|
|
- prop: 'departureInfo',
|
|
|
- label: '离港航班',
|
|
|
+ prop: "departureInfo",
|
|
|
+ label: "离港航班",
|
|
|
width: 180,
|
|
|
- fixed: 'left',
|
|
|
+ fixed: "left",
|
|
|
children: [
|
|
|
{
|
|
|
- prop: 'flightNO',
|
|
|
- label: '航班号',
|
|
|
- desc: '指航班编号',
|
|
|
+ prop: "flightNO",
|
|
|
+ label: "航班号",
|
|
|
+ desc: "指航班编号",
|
|
|
width: 80,
|
|
|
filterable: true,
|
|
|
- sortable: true
|
|
|
+ sortable: true,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'flightDate',
|
|
|
- label: '航班日期',
|
|
|
- desc: '指航班计划起飞日期(不变的,机票上),不是预计起飞日期(预计起飞时间可能多个),也不是实际起飞日期(实际起飞等于最后预计)',
|
|
|
- width: 100
|
|
|
+ prop: "flightDate",
|
|
|
+ label: "航班日期",
|
|
|
+ desc: "指航班计划起飞日期(不变的,机票上),不是预计起飞日期(预计起飞时间可能多个),也不是实际起飞日期(实际起飞等于最后预计)",
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'actualDepartureTime',
|
|
|
- label: '起飞时间',
|
|
|
- desc: '根据优先级别显示时间。优先级别:1.实际起飞时间,2.预计起飞时间,3.计划起飞时间',
|
|
|
- width: 100
|
|
|
+ prop: "actualDepartureTime",
|
|
|
+ label: "起飞时间",
|
|
|
+ desc: "根据优先级别显示时间。优先级别:1.实际起飞时间,2.预计起飞时间,3.计划起飞时间",
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'targetAirport',
|
|
|
- label: '目的站',
|
|
|
- desc: '指航班执飞航段的目的航站,以航站三字码+航站简称显示',
|
|
|
+ prop: "targetAirport",
|
|
|
+ label: "目的站",
|
|
|
+ desc: "指航班执飞航段的目的航站,以航站三字码+航站简称显示",
|
|
|
filterable: true,
|
|
|
- sortable: true
|
|
|
+ sortable: true,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'departureBuild',
|
|
|
- label: '起飞航站楼',
|
|
|
- desc: '指航班执飞航段的起飞航站的航站楼',
|
|
|
+ prop: "departureBuild",
|
|
|
+ label: "起飞航站楼",
|
|
|
+ desc: "指航班执飞航段的起飞航站的航站楼",
|
|
|
width: 98,
|
|
|
filterable: true,
|
|
|
- sortable: true
|
|
|
+ sortable: true,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'bordingGate',
|
|
|
- label: '起飞登机口',
|
|
|
- desc: '指航班的登机口代码,数据是变化的,仅显示最新信息',
|
|
|
+ prop: "bordingGate",
|
|
|
+ label: "起飞登机口",
|
|
|
+ desc: "指航班的登机口代码,数据是变化的,仅显示最新信息",
|
|
|
width: 98,
|
|
|
filterable: true,
|
|
|
- sortable: true
|
|
|
+ sortable: true,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'standForDepartrue',
|
|
|
- label: '起飞停机位',
|
|
|
- desc: '指航班的停机位代码,数据是变化的,仅显示最新信息',
|
|
|
+ prop: "standForDepartrue",
|
|
|
+ label: "起飞停机位",
|
|
|
+ desc: "指航班的停机位代码,数据是变化的,仅显示最新信息",
|
|
|
width: 98,
|
|
|
filterable: true,
|
|
|
- sortable: true
|
|
|
+ sortable: true,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'timeDifference',
|
|
|
- label: '转运时间',
|
|
|
- desc: '指中转动作完成时间'
|
|
|
+ prop: "timeDifference",
|
|
|
+ label: "转运时间",
|
|
|
+ desc: "指中转动作完成时间",
|
|
|
},
|
|
|
{
|
|
|
- prop: 'outTransferredBaggageCount',
|
|
|
- label: '已中转进行李数',
|
|
|
- desc: '指其它航班实际已中转至本航班的行李数量',
|
|
|
- width: 120
|
|
|
- }
|
|
|
- ]
|
|
|
+ prop: "outTransferredBaggageCount",
|
|
|
+ label: "已中转进行李数",
|
|
|
+ desc: "指其它航班实际已中转至本航班的行李数量",
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- prop: 'arrivalInfo',
|
|
|
- label: '进港航班',
|
|
|
+ prop: "arrivalInfo",
|
|
|
+ label: "进港航班",
|
|
|
children: [
|
|
|
{
|
|
|
- prop: 'outTransferBaggageCount',
|
|
|
- label: '中转进行李数',
|
|
|
- desc: '指其它航班预计中转至本航班的行李数量',
|
|
|
- width: 100
|
|
|
+ prop: "outTransferBaggageCount",
|
|
|
+ label: "中转进行李数",
|
|
|
+ desc: "指其它航班预计中转至本航班的行李数量",
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'preFlightNO',
|
|
|
- label: '航班号',
|
|
|
- desc: '进港航班编号',
|
|
|
+ prop: "preFlightNO",
|
|
|
+ label: "航班号",
|
|
|
+ desc: "进港航班编号",
|
|
|
width: 80,
|
|
|
filterable: true,
|
|
|
- sortable: true
|
|
|
+ sortable: true,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'preFlightDate',
|
|
|
- label: '航班日期',
|
|
|
- desc: '指航班计划起飞日期(不变的,机票上),不是预计起飞日期(预计起飞时间可能多个),也不是实际起飞日期(实际起飞等于最后预计)',
|
|
|
- width: 100
|
|
|
+ prop: "preFlightDate",
|
|
|
+ label: "航班日期",
|
|
|
+ desc: "指航班计划起飞日期(不变的,机票上),不是预计起飞日期(预计起飞时间可能多个),也不是实际起飞日期(实际起飞等于最后预计)",
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'preAirport',
|
|
|
- label: '起飞航站',
|
|
|
- desc: '指进港航班的起飞机场三字码',
|
|
|
+ prop: "preAirport",
|
|
|
+ label: "起飞航站",
|
|
|
+ desc: "指进港航班的起飞机场三字码",
|
|
|
width: 100,
|
|
|
filterable: true,
|
|
|
- sortable: true
|
|
|
+ sortable: true,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'actualLandingTime',
|
|
|
- label: '降落时间',
|
|
|
- desc: '指航班预计到达时间,数据是变化的,仅显示最新结果',
|
|
|
- width: 100
|
|
|
+ prop: "actualLandingTime",
|
|
|
+ label: "降落时间",
|
|
|
+ desc: "指航班预计到达时间,数据是变化的,仅显示最新结果",
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'landingBuild',
|
|
|
- label: '降落航站楼',
|
|
|
- desc: '指航班降落后位于机场的哪个航站楼',
|
|
|
+ prop: "landingBuild",
|
|
|
+ label: "降落航站楼",
|
|
|
+ desc: "指航班降落后位于机场的哪个航站楼",
|
|
|
width: 98,
|
|
|
filterable: true,
|
|
|
- sortable: true
|
|
|
+ sortable: true,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'carousel',
|
|
|
- label: '行李转盘',
|
|
|
- desc: '指航班到达后行李提取的地方,仅显示最新信息',
|
|
|
+ prop: "carousel",
|
|
|
+ label: "行李转盘",
|
|
|
+ desc: "指航班到达后行李提取的地方,仅显示最新信息",
|
|
|
width: 100,
|
|
|
filterable: true,
|
|
|
- sortable: true
|
|
|
+ sortable: true,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'standForLanding',
|
|
|
- label: '降落停机位',
|
|
|
- desc: '指航班的停机位代码,数据是变化的,仅显示最新信息',
|
|
|
+ prop: "standForLanding",
|
|
|
+ label: "降落停机位",
|
|
|
+ desc: "指航班的停机位代码,数据是变化的,仅显示最新信息",
|
|
|
width: 98,
|
|
|
filterable: true,
|
|
|
- sortable: true
|
|
|
- }
|
|
|
+ sortable: true,
|
|
|
+ },
|
|
|
// {
|
|
|
// prop: 'inTransferBaggageCount',
|
|
|
// label: '中转行李数',
|
|
@@ -473,8 +389,8 @@ export default {
|
|
|
// desc: '指航班在本航站实际已经中转至对应航班的行李数量',
|
|
|
// width: 100
|
|
|
// }
|
|
|
- ]
|
|
|
- }
|
|
|
+ ],
|
|
|
+ },
|
|
|
],
|
|
|
loading: false,
|
|
|
AirportList: [],
|
|
@@ -487,30 +403,30 @@ export default {
|
|
|
spanArr: [],
|
|
|
contactDot: 0,
|
|
|
flag: 0,
|
|
|
- table: null
|
|
|
- }
|
|
|
+ table: null,
|
|
|
+ };
|
|
|
},
|
|
|
computed: {
|
|
|
singleDay() {
|
|
|
- return this.startDate === this.endDate
|
|
|
- }
|
|
|
+ return this.startDate === this.endDate;
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
// this.getAirPortData()
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.$refs['form'].validateField('flightDate')
|
|
|
- this.getAirPortData()
|
|
|
- this.table = this.$refs.table.bodyWrapper
|
|
|
- const that = this
|
|
|
- this.table.addEventListener('scroll', () => {
|
|
|
- that.scrollTop = this.table.scrollTop
|
|
|
- })
|
|
|
+ this.$refs["form"].validateField("flightDate");
|
|
|
+ this.getAirPortData();
|
|
|
+ this.table = this.$refs.table.bodyWrapper;
|
|
|
+ const that = this;
|
|
|
+ this.table.addEventListener("scroll", () => {
|
|
|
+ that.scrollTop = this.table.scrollTop;
|
|
|
+ });
|
|
|
},
|
|
|
activated() {
|
|
|
- this.table.scrollTop = this.scrollTop
|
|
|
- this.getTableData()
|
|
|
- this.loopEvent = setInterval(this.getTableData, LOOP_INTERVAL.transferDepartureTable)
|
|
|
+ this.table.scrollTop = this.scrollTop;
|
|
|
+ this.getTableData();
|
|
|
+ this.loopEvent = setInterval(this.getTableData, LOOP_INTERVAL.transferDepartureTable);
|
|
|
// const { startDate, endDate } = this.$route.query
|
|
|
// Object.entries(this.$route.query).forEach(([key, value]) => {
|
|
|
// if ((value ?? '') !== '' && JSON.stringify(value) !== '[]') {
|
|
@@ -526,41 +442,41 @@ export default {
|
|
|
},
|
|
|
deactivated() {
|
|
|
if (this.loopEvent) {
|
|
|
- clearInterval(this.loopEvent)
|
|
|
- this.loopEvent = null
|
|
|
+ clearInterval(this.loopEvent);
|
|
|
+ this.loopEvent = null;
|
|
|
}
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
if (this.loopEvent) {
|
|
|
- clearInterval(this.loopEvent)
|
|
|
- this.loopEvent = null
|
|
|
+ clearInterval(this.loopEvent);
|
|
|
+ this.loopEvent = null;
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
resetLoopEvent() {
|
|
|
- this.loading = true
|
|
|
- this.hasSetTableScroll = false
|
|
|
- this.loopEvent && clearInterval(this.loopEvent)
|
|
|
- this.getTableData()
|
|
|
- this.loopEvent = setInterval(this.getTableData, LOOP_INTERVAL.transferDepartureTable)
|
|
|
+ this.loading = true;
|
|
|
+ this.hasSetTableScroll = false;
|
|
|
+ this.loopEvent && clearInterval(this.loopEvent);
|
|
|
+ this.getTableData();
|
|
|
+ this.loopEvent = setInterval(this.getTableData, LOOP_INTERVAL.transferDepartureTable);
|
|
|
},
|
|
|
headerCellClass({ row, column }) {
|
|
|
- const classes = []
|
|
|
- const rule = this.tableDataSortRules[column.property]
|
|
|
+ const classes = [];
|
|
|
+ const rule = this.tableDataSortRules[column.property];
|
|
|
if (rule) {
|
|
|
- classes.push(rule)
|
|
|
+ classes.push(rule);
|
|
|
}
|
|
|
- return classes.join(' ')
|
|
|
+ return classes.join(" ");
|
|
|
},
|
|
|
tableRowClassName({ row, rowIndex }) {
|
|
|
- const classes = []
|
|
|
+ const classes = [];
|
|
|
if (row.hasTakeOff) {
|
|
|
- classes.push('bgl-hui')
|
|
|
+ classes.push("bgl-hui");
|
|
|
if (rowIndex === this.leaveCount - 1) {
|
|
|
- classes.push('redBorder')
|
|
|
+ classes.push("redBorder");
|
|
|
}
|
|
|
}
|
|
|
- return classes.join(' ')
|
|
|
+ return classes.join(" ");
|
|
|
},
|
|
|
changeView() {
|
|
|
// const query = {
|
|
@@ -573,36 +489,36 @@ export default {
|
|
|
// path: '/transfer/arrival',
|
|
|
// query
|
|
|
// })
|
|
|
- this.$router.push('/transfer/arrival')
|
|
|
+ this.$router.push("/transfer/arrival");
|
|
|
},
|
|
|
airPortChange() {
|
|
|
- this.getAviationData()
|
|
|
- this.upAviationData()
|
|
|
- this.resetLoopEvent()
|
|
|
+ this.getAviationData();
|
|
|
+ this.upAviationData();
|
|
|
+ this.resetLoopEvent();
|
|
|
},
|
|
|
dateChangeHandler() {
|
|
|
- this.getAviationData()
|
|
|
- this.upAviationData()
|
|
|
- this.resetLoopEvent()
|
|
|
+ this.getAviationData();
|
|
|
+ this.upAviationData();
|
|
|
+ this.resetLoopEvent();
|
|
|
},
|
|
|
// 选择机场
|
|
|
async getAirPortData() {
|
|
|
try {
|
|
|
const res = await getQuery({
|
|
|
id: DATACONTENT_ID.departureAirLtId,
|
|
|
- dataContent: []
|
|
|
- })
|
|
|
+ dataContent: [],
|
|
|
+ });
|
|
|
if (Number(res.code) === 0) {
|
|
|
- this.AirportList = res.returnData.listValues
|
|
|
- this.formData.currentAirport = 'PEK'
|
|
|
- this.getAviationData()
|
|
|
- this.upAviationData()
|
|
|
- this.resetLoopEvent()
|
|
|
+ this.AirportList = res.returnData.listValues;
|
|
|
+ this.formData.currentAirport = "PEK";
|
|
|
+ this.getAviationData();
|
|
|
+ this.upAviationData();
|
|
|
+ this.resetLoopEvent();
|
|
|
} else {
|
|
|
- this.$message.error(res.message)
|
|
|
+ this.$message.error(res.message);
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- console.log('出错了', error.message || error)
|
|
|
+ console.log("出错了", error.message || error);
|
|
|
}
|
|
|
},
|
|
|
// 选择航司
|
|
@@ -610,15 +526,15 @@ export default {
|
|
|
try {
|
|
|
const res = await getQuery({
|
|
|
id: DATACONTENT_ID.departureAviJoinLtId,
|
|
|
- dataContent: [this.formData.currentAirport]
|
|
|
- })
|
|
|
+ dataContent: [this.formData.currentAirport],
|
|
|
+ });
|
|
|
if (Number(res.code) === 0) {
|
|
|
- this.carrierProps = res.returnData.listValues
|
|
|
+ this.carrierProps = res.returnData.listValues;
|
|
|
} else {
|
|
|
- this.$message.error(res.message)
|
|
|
+ this.$message.error(res.message);
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- console.log('出错了', error.message || error)
|
|
|
+ console.log("出错了", error.message || error);
|
|
|
}
|
|
|
},
|
|
|
// 选择航司
|
|
@@ -626,15 +542,15 @@ export default {
|
|
|
try {
|
|
|
const res = await getQuery({
|
|
|
id: DATACONTENT_ID.departureAviLeaveLtId,
|
|
|
- dataContent: [this.formData.currentAirport]
|
|
|
- })
|
|
|
+ dataContent: [this.formData.currentAirport],
|
|
|
+ });
|
|
|
if (Number(res.code) === 0) {
|
|
|
- this.carrierPropsop = res.returnData.listValues
|
|
|
+ this.carrierPropsop = res.returnData.listValues;
|
|
|
} else {
|
|
|
- this.$message.error(res.message)
|
|
|
+ this.$message.error(res.message);
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- console.log('出错了', error.message || error)
|
|
|
+ console.log("出错了", error.message || error);
|
|
|
}
|
|
|
},
|
|
|
// 获取表单下拉框数据
|
|
@@ -650,10 +566,10 @@ export default {
|
|
|
// 获取表格数据
|
|
|
async getTableData() {
|
|
|
if (!this.formData.currentAirport || !this.startDate || !this.endDate) {
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
- const arrs1 = [this.formData.inboundCarrier.length === 0 ? '' : this.formData.inboundCarrier[0]]
|
|
|
- const arrs2 = [this.formData.outgoingAirline.length === 0 ? '' : this.formData.outgoingAirline[0]]
|
|
|
+ const arrs1 = [this.formData.inboundCarrier.length === 0 ? "" : this.formData.inboundCarrier[0]];
|
|
|
+ const arrs2 = [this.formData.outgoingAirline.length === 0 ? "" : this.formData.outgoingAirline[0]];
|
|
|
const arr = [
|
|
|
this.formData.currentAirport,
|
|
|
this.startDate,
|
|
@@ -663,123 +579,123 @@ export default {
|
|
|
...arrs1,
|
|
|
...arrs2,
|
|
|
...arrs2,
|
|
|
- ...arrs2
|
|
|
+ ...arrs2,
|
|
|
// this.formData.inboundCarrier,
|
|
|
// this.formData.outgoingAirline,
|
|
|
// JSON.stringify(this.formData.inboundCarrier),
|
|
|
// JSON.stringify(this.formData.outgoingAirline),
|
|
|
- ]
|
|
|
+ ];
|
|
|
try {
|
|
|
const res = await getQuery({
|
|
|
id: DATACONTENT_ID.departureTableLtId,
|
|
|
- dataContent: [...arr]
|
|
|
- })
|
|
|
+ dataContent: [...arr],
|
|
|
+ });
|
|
|
if (Number(res.code) === 0) {
|
|
|
- this.initTableData(res.returnData.listValues)
|
|
|
+ this.initTableData(res.returnData.listValues);
|
|
|
} else {
|
|
|
- console.log(res.message)
|
|
|
+ console.log(res.message);
|
|
|
}
|
|
|
- this.loading = false
|
|
|
+ this.loading = false;
|
|
|
} catch (error) {
|
|
|
if (this.loopEvent) {
|
|
|
- clearInterval(this.loopEvent)
|
|
|
- this.loopEvent = null
|
|
|
+ clearInterval(this.loopEvent);
|
|
|
+ this.loopEvent = null;
|
|
|
}
|
|
|
- this.loading = false
|
|
|
- console.log('出错了', error.message || error)
|
|
|
+ this.loading = false;
|
|
|
+ console.log("出错了", error.message || error);
|
|
|
}
|
|
|
},
|
|
|
initTableData(tableData) {
|
|
|
- this.leaveCount = 0
|
|
|
- this.baggageCount = 0
|
|
|
- tableData.forEach(item => {
|
|
|
+ this.leaveCount = 0;
|
|
|
+ this.baggageCount = 0;
|
|
|
+ tableData.forEach((item) => {
|
|
|
if (this.hasTakeOff(item)) {
|
|
|
- this.leaveCount++
|
|
|
+ this.leaveCount++;
|
|
|
}
|
|
|
- this.baggageCount = this.baggageCount + item.outTransferBaggageCount
|
|
|
- })
|
|
|
- this.tableData = this._.sortBy(tableData, ['actualDepartureTime', 'flightNO', 'actualLandingTime', 'preFlightNO'])
|
|
|
- setTableFilters(this.tableData, this.tableDataFilters)
|
|
|
- this.toOrderNum(this.baggageCount)
|
|
|
+ this.baggageCount = this.baggageCount + item.outTransferBaggageCount;
|
|
|
+ });
|
|
|
+ this.tableData = this._.sortBy(tableData, ["actualDepartureTime", "flightNO", "actualLandingTime", "preFlightNO"]);
|
|
|
+ setTableFilters(this.tableData, this.tableDataFilters);
|
|
|
+ this.toOrderNum(this.baggageCount);
|
|
|
this.$nextTick(() => {
|
|
|
- this.setTableScroll()
|
|
|
- })
|
|
|
+ this.setTableScroll();
|
|
|
+ });
|
|
|
},
|
|
|
hasTakeOff(flight) {
|
|
|
if (flight.actualDepartureTime) {
|
|
|
- const now = new Date()
|
|
|
- const actualDepartureTime = new Date(flight.actualDepartureTime.replace('T', ' '))
|
|
|
- flight['hasTakeOff'] = now > actualDepartureTime && !flight['flightCanceled']
|
|
|
+ const now = new Date();
|
|
|
+ const actualDepartureTime = new Date(flight.actualDepartureTime.replace("T", " "));
|
|
|
+ flight["hasTakeOff"] = now > actualDepartureTime && !flight["flightCanceled"];
|
|
|
} else {
|
|
|
- flight['hasTakeOff'] = false
|
|
|
+ flight["hasTakeOff"] = false;
|
|
|
}
|
|
|
- return flight['hasTakeOff']
|
|
|
+ return flight["hasTakeOff"];
|
|
|
},
|
|
|
setTableScroll() {
|
|
|
if (!this.singleDay || this.hasSetTableScroll || this.leaveCount === 0) {
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
- const table = this.$refs['table'].$el
|
|
|
- const scrollParent = table.querySelector('.el-table__body-wrapper')
|
|
|
+ const table = this.$refs["table"].$el;
|
|
|
+ const scrollParent = table.querySelector(".el-table__body-wrapper");
|
|
|
if (scrollParent.scrollHeight <= scrollParent.offsetHeight) {
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
- const lastRow = table.querySelectorAll('.el-table__body tr')[this.leaveCount - 1]
|
|
|
+ const lastRow = table.querySelectorAll(".el-table__body tr")[this.leaveCount - 1];
|
|
|
setTimeout(() => {
|
|
|
- const scrollMid = lastRow.offsetTop + lastRow.offsetHeight - scrollParent.offsetHeight / 2
|
|
|
- const scrollMax = scrollParent.scrollHeight - scrollParent.offsetHeight
|
|
|
+ const scrollMid = lastRow.offsetTop + lastRow.offsetHeight - scrollParent.offsetHeight / 2;
|
|
|
+ const scrollMax = scrollParent.scrollHeight - scrollParent.offsetHeight;
|
|
|
if (scrollMid > 0) {
|
|
|
- const scrollHeight = Math.min(scrollMid, scrollMax)
|
|
|
- scrollParent.scrollTo(0, scrollHeight)
|
|
|
+ const scrollHeight = Math.min(scrollMid, scrollMax);
|
|
|
+ scrollParent.scrollTo(0, scrollHeight);
|
|
|
}
|
|
|
- }, 0)
|
|
|
- this.hasSetTableScroll = true
|
|
|
+ }, 0);
|
|
|
+ this.hasSetTableScroll = true;
|
|
|
},
|
|
|
setNumberTransform() {
|
|
|
- const numberItems = this.$refs.numberItem // 拿到数字的ref,计算元素数量
|
|
|
- const numberArr = this.orderNum.filter(item => !isNaN(item))
|
|
|
+ const numberItems = this.$refs.numberItem; // 拿到数字的ref,计算元素数量
|
|
|
+ const numberArr = this.orderNum.filter((item) => !isNaN(item));
|
|
|
// 结合CSS 对数字字符进行滚动,显示订单数量
|
|
|
for (let index = 0; index < numberItems.length; index++) {
|
|
|
- const elem = numberItems[index]
|
|
|
- elem.style.transform = `translate(-50%, -${numberArr[index] * 10}%)`
|
|
|
+ const elem = numberItems[index];
|
|
|
+ elem.style.transform = `translate(-50%, -${numberArr[index] * 10}%)`;
|
|
|
}
|
|
|
},
|
|
|
|
|
|
toOrderNum(num) {
|
|
|
- num = num.toString()
|
|
|
+ num = num.toString();
|
|
|
if (num.length < 6) {
|
|
|
- num = '0' + num // 如未满八位数,添加"0"补位
|
|
|
- this.toOrderNum(num) // 递归添加"0"补位
|
|
|
+ num = "0" + num; // 如未满八位数,添加"0"补位
|
|
|
+ this.toOrderNum(num); // 递归添加"0"补位
|
|
|
} else if (num.length >= 6) {
|
|
|
- this.orderNum = num.split('') // 将其便变成数据,渲染至滚动数组
|
|
|
+ this.orderNum = num.split(""); // 将其便变成数据,渲染至滚动数组
|
|
|
} else {
|
|
|
// 订单总量数字超过八位显示异常
|
|
|
- this.$message.warning('总量数字过大')
|
|
|
+ this.$message.warning("总量数字过大");
|
|
|
}
|
|
|
- this.setNumberTransform()
|
|
|
+ this.setNumberTransform();
|
|
|
},
|
|
|
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
for (let i = 0; i < 7; i++) {
|
|
|
if (columnIndex === i) {
|
|
|
- const _row = this.spanArr[rowIndex]
|
|
|
- const _col = _row > 0 ? 1 : 0
|
|
|
+ const _row = this.spanArr[rowIndex];
|
|
|
+ const _col = _row > 0 ? 1 : 0;
|
|
|
return {
|
|
|
rowspan: _row,
|
|
|
- colspan: _col
|
|
|
- }
|
|
|
+ colspan: _col,
|
|
|
+ };
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
exportHandler(refName, tableName) {
|
|
|
if (this.loading) {
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
- const table = this.$refs[refName].$el.cloneNode(true)
|
|
|
- const fileName = `${tableName}-${this.currentAirport}-${this.startDate}-${this.endDate}.xlsx`
|
|
|
- throttledExportToExcel(table, tableName, fileName, 2)
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ const table = this.$refs[refName].$el.cloneNode(true);
|
|
|
+ const fileName = `${tableName}-${this.currentAirport}-${this.startDate}-${this.endDate}.xlsx`;
|
|
|
+ throttledExportToExcel(table, tableName, fileName, 2);
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -803,7 +719,7 @@ export default {
|
|
|
optgroup,
|
|
|
select,
|
|
|
textarea {
|
|
|
- font-family: Helvetica, 'Microsoft YaHei';
|
|
|
+ font-family: Helvetica, "Microsoft YaHei";
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
.el-switch__label {
|
|
@@ -909,7 +825,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 {
|
|
@@ -943,7 +859,7 @@ export default {
|
|
|
&.redBorder {
|
|
|
position: relative;
|
|
|
&::after {
|
|
|
- content: '';
|
|
|
+ content: "";
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
bottom: 0;
|