|
@@ -0,0 +1,615 @@
|
|
|
+<template>
|
|
|
+ <div class="new-container-view">
|
|
|
+ <div class="list">
|
|
|
+ <div class="title flex">
|
|
|
+ <div class="manageTitle">航班基本信息</div>
|
|
|
+ <el-button @click="toContainer" type="primary" size="small">历史记录</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="part1">
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="4">
|
|
|
+ <div class="grid-content bg-purple">容器编号:111</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <div class="grid-content bg-purple">容器类型:2222</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <div class="grid-content bg-purple">航班号:CA1111</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <div class="grid-content bg-purple">航班日期:2022-9-30 10:55:26</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <div class="grid-content bg-purple">舱位:11</div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="list">
|
|
|
+ <div class="title">
|
|
|
+ <div class="manageTitle">航班行李列表</div>
|
|
|
+ </div>
|
|
|
+ <div class="part2">
|
|
|
+ <el-table ref="flightBaggageTable" :data="dealedTableData" border style="width: 100%" height="calc(77vh - 64px)" stripe size="mini" show-summary :summary-method="summaryRow(dealedTableData.length)" :header-cell-class-name="headerCellClass" :header-cell-style="{ color: '#101116' }" :row-class-name="rowClass" :cell-class-name="cellClass" @cell-click="cellClickHandler">
|
|
|
+ <el-table-column v-for="col in tableColsCopy" :key="col.index" :prop="col.prop" :label="col.label" :align="col.align || 'center'" :width="col.width" :fixed="col.fixed" :formatter="tableFormat">
|
|
|
+ <template #header>
|
|
|
+ <TableHeaderCell :label="col.label" :filter-options="flightBaggageTableFilters[col.prop]" :filter-values.sync="filterValues[col.prop]" :sortable="col.sortable" :sort-rule.sync="tableDataSortRules[col.prop]" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import TimeZoneSelector from '@/components/TimeZoneSelector'
|
|
|
+import { myQuery } from '@/api/dataIntegration'
|
|
|
+import tableColsMixin from '../../mixins/tableCols'
|
|
|
+import timeZoneMixin from '../../mixins/timeZone'
|
|
|
+import TableHeaderCell from '@/components/TableHeaderCell'
|
|
|
+import { setTableFilters } from '@/utils/table'
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
+import { throttledExportToExcel } from '@/utils/table'
|
|
|
+export default {
|
|
|
+ name: 'NewContainerView',
|
|
|
+ directives: {
|
|
|
+ dragHeight: {
|
|
|
+ inserted (el, binding, vnode) {
|
|
|
+ const that = vnode.context
|
|
|
+ let mousedownY
|
|
|
+ let dragY
|
|
|
+ let dragHeight
|
|
|
+ const offsetTop = el.offsetParent.offsetTop
|
|
|
+ function mousemoveHandler (e) {
|
|
|
+ e.stopPropagation()
|
|
|
+ e.preventDefault()
|
|
|
+ dragY = dragHeight + mousedownY - e.screenY
|
|
|
+ dragY = dragY < 0 ? 0 : dragY > offsetTop ? offsetTop : dragY
|
|
|
+ that.dragY = dragY
|
|
|
+ }
|
|
|
+ function mouseupHandler (e) {
|
|
|
+ e.stopPropagation()
|
|
|
+ e.preventDefault()
|
|
|
+ that.dragHeight = that.dragY
|
|
|
+ that.dragY = 0
|
|
|
+ that.dragActive = false
|
|
|
+ document.removeEventListener('mousemove', mousemoveHandler)
|
|
|
+ document.removeEventListener('mouseup', mouseupHandler)
|
|
|
+ }
|
|
|
+ el.addEventListener('mousedown', e => {
|
|
|
+ that.dragActive = true
|
|
|
+ mousedownY = e.screenY
|
|
|
+ dragHeight = that.dragHeight
|
|
|
+ that.dragY = dragHeight
|
|
|
+ document.addEventListener('mousemove', mousemoveHandler)
|
|
|
+ document.addEventListener('mouseup', mouseupHandler)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ TimeZoneSelector,
|
|
|
+ TableHeaderCell
|
|
|
+ },
|
|
|
+ mixins: [tableColsMixin, timeZoneMixin],
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ fullscreenLoading: false,
|
|
|
+ airlineList: [],
|
|
|
+ selectedAirline: '',
|
|
|
+ queryData: {},
|
|
|
+ flightInfo: {},
|
|
|
+ keyWords: '',
|
|
|
+ containerTableColumn: [
|
|
|
+ { label: '容器编号', prop: 'containerNumber', width: 100 },
|
|
|
+ { label: '类型', prop: 'style' },
|
|
|
+ { label: '行李数', prop: 'numberOfBags' },
|
|
|
+ { label: '舱位', prop: 'containerSpace' }
|
|
|
+ ],
|
|
|
+ // transferInTableColumn: [
|
|
|
+ // { label: '航班号', prop: 'preFlightNO' },
|
|
|
+ // { label: '日期', prop: 'preFlightDate' },
|
|
|
+ // { label: '时间', prop: 'flightTime' },
|
|
|
+ // { label: '始发站', prop: 'planDepartureApt' },
|
|
|
+ // { label: '航班状态', prop: 'flightStatus' },
|
|
|
+ // { label: '中转数', prop: 'totalNumber' }
|
|
|
+ // ],
|
|
|
+ // transferOutTableColumn: [
|
|
|
+ // { label: '航班号', prop: 'transferFlightNO' },
|
|
|
+ // { label: '日期', prop: 'transferFlightDate' },
|
|
|
+ // { label: '时间', prop: 'flightTime' },
|
|
|
+ // { label: '始发站', prop: 'planDepartureApt' },
|
|
|
+ // { label: '目的站', prop: 'planLandingApt' },
|
|
|
+ // { label: '中转数', prop: 'transferNumber' }
|
|
|
+ // ],
|
|
|
+ tableCols: [
|
|
|
+ // { label: '序号', prop: 'index' },
|
|
|
+ {
|
|
|
+ label: '旅客姓名',
|
|
|
+ prop: 'PassengerNameUpcase',
|
|
|
+ width: 140,
|
|
|
+ fixed: 'left',
|
|
|
+ filterable: true,
|
|
|
+ sortable: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '行李牌号',
|
|
|
+ prop: 'BagSN',
|
|
|
+ width: 120,
|
|
|
+ fixed: 'left',
|
|
|
+ filterable: true,
|
|
|
+ sortable: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '特殊行李类型',
|
|
|
+ prop: 'SpecialType',
|
|
|
+ width: 120,
|
|
|
+ filterable: true,
|
|
|
+ sortable: true
|
|
|
+ },
|
|
|
+ { label: '装载序号', prop: 'LoadSN' },
|
|
|
+ { label: '值机', prop: 'checkInTime', width: 140 },
|
|
|
+ { label: '状态', prop: 'latestStatus', filterable: true, sortable: true },
|
|
|
+ { label: '安检', prop: 'securityTime', width: 140 },
|
|
|
+ { label: '分拣', prop: 'sortTime', width: 140 },
|
|
|
+ { label: '装车', prop: 'loadTime', width: 140 },
|
|
|
+ { label: '装机', prop: 'inflTime', width: 140 },
|
|
|
+ { label: '中转进航班', prop: 'inFlightNO', filterable: true, sortable: true, width: 105 },
|
|
|
+ { label: '中转出航班', prop: 'transferFlightNO', filterable: true, sortable: true, width: 105 },
|
|
|
+ ],
|
|
|
+ containerTableData: [], // 容器统计
|
|
|
+ transferInBaggageTableData: [], // 中转进
|
|
|
+ transferOutBaggageTableData: [], // 中转出
|
|
|
+ flightBaggageTableData: [], // 行李列表
|
|
|
+ flightBaggageTableFilters: {},
|
|
|
+ filterValues: {},
|
|
|
+ tableDataSortRules: {},
|
|
|
+ warningContainers: [],
|
|
|
+ dragHeight: 0,
|
|
|
+ dragY: 0,
|
|
|
+ dragActive: false,
|
|
|
+ containerID: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['clickedCells']),
|
|
|
+ dealedTableData () {
|
|
|
+ const filtered = this.flightBaggageTableData.filter(item => {
|
|
|
+ let flag = true
|
|
|
+ Object.entries(this.filterValues).forEach(([key, arr]) => {
|
|
|
+ if (arr.length && !arr.includes(item[key])) {
|
|
|
+ flag = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return flag
|
|
|
+ })
|
|
|
+ const sortRules = Object.entries(this.tableDataSortRules).reduce(
|
|
|
+ (pre, [key, value]) => {
|
|
|
+ if (value) {
|
|
|
+ pre[0].push(key)
|
|
|
+ value = value === 'ascending' ? 'asc' : 'desc'
|
|
|
+ pre[1].push(value)
|
|
|
+ }
|
|
|
+ return pre
|
|
|
+ },
|
|
|
+ [[], []]
|
|
|
+ )
|
|
|
+ return this._.orderBy(filtered, sortRules[0], sortRules[1])
|
|
|
+ },
|
|
|
+ draggableStyle () {
|
|
|
+ return {
|
|
|
+ height: `calc(100vh - 80px - 64px - 16px - 344px + ${this.dragHeight}px)`
|
|
|
+ }
|
|
|
+ },
|
|
|
+ dragLineStyle () {
|
|
|
+ return {
|
|
|
+ transform: `translateY(${this.dragHeight - this.dragY}px)`
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ $route: {
|
|
|
+ handler ({ path, query }) {
|
|
|
+ if (path.includes('newContainerView')) {
|
|
|
+ const { flightNO, flightDate, containerID } = query
|
|
|
+ this.containerID = containerID
|
|
|
+ if (flightNO && flightDate) {
|
|
|
+ const { flightNO: oldFlightNO, flightDate: oldFlightDate } = this.queryData
|
|
|
+ if (flightNO !== oldFlightNO || flightDate !== oldFlightDate) {
|
|
|
+ this.queryData = { flightNO, flightDate }
|
|
|
+ this.queryAirline([flightNO, flightDate])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ immediate: true
|
|
|
+ },
|
|
|
+ fullscreenLoading (val) {
|
|
|
+ if (val) {
|
|
|
+ this.loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.loading?.close()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selectedAirline (val) {
|
|
|
+ const { flightNO, flightDate } = this.queryData
|
|
|
+ const [departureAirport, landingAirport] = val.split('-')
|
|
|
+ this.queryAll([flightNO, flightDate, departureAirport, landingAirport])
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ Object.values(this.tableCols).forEach(({ prop, filterable, sortable }) => {
|
|
|
+ if (filterable) {
|
|
|
+ this.$set(this.flightBaggageTableFilters, prop, [])
|
|
|
+ this.$set(this.filterValues, prop, [])
|
|
|
+ }
|
|
|
+ if (sortable) {
|
|
|
+ this.$set(this.tableDataSortRules, prop, '')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ activated () {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs['containerTable']?.doLayout()
|
|
|
+ // this.$refs['transferInBaggageTable']?.doLayout()
|
|
|
+ // this.$refs['transferOutBaggageTable']?.doLayout()
|
|
|
+ this.$refs['flightBaggageTable']?.doLayout()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ updated () {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs['containerTable']?.doLayout()
|
|
|
+ // this.$refs['transferInBaggageTable']?.doLayout()
|
|
|
+ // this.$refs['transferOutBaggageTable']?.doLayout()
|
|
|
+ this.$refs['flightBaggageTable']?.doLayout()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ deactivated () {
|
|
|
+ this.loading?.close()
|
|
|
+ },
|
|
|
+ beforeDestroy () {
|
|
|
+ this.loading?.close()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ rowClass ({ row, rowIndex }) {
|
|
|
+ const classes = []
|
|
|
+ if (this.warningContainers.includes(row['containerNumber']) || row['latestStatus'] === '待翻减') {
|
|
|
+ classes.push('row-warning')
|
|
|
+ }
|
|
|
+ if (row['Status'] === 'DEL') {
|
|
|
+ classes.push('bgl-deleted')
|
|
|
+ }
|
|
|
+ return classes.join(' ')
|
|
|
+ },
|
|
|
+ // 给表头单元格加上 ascending 或 descending 使用 element 自带的排序箭头变色
|
|
|
+ headerCellClass ({ row, column, rowIndex, columnIndex }) {
|
|
|
+ const classes = []
|
|
|
+ const rule = this.tableDataSortRules[column.property]
|
|
|
+ if (rule) {
|
|
|
+ classes.push(rule)
|
|
|
+ }
|
|
|
+ return classes.join(' ')
|
|
|
+ },
|
|
|
+ cellClass ({ row, column, rowIndex, columnIndex }) {
|
|
|
+ const classes = []
|
|
|
+ if (
|
|
|
+ ['checkInTime', 'DealInfo', 'sortLocationMark', 'loadLocationMark', 'inflLocationMark'].includes(
|
|
|
+ column.property
|
|
|
+ )
|
|
|
+ ) {
|
|
|
+ classes.push('pre-line')
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ [
|
|
|
+ 'preFlightNO',
|
|
|
+ 'totalNumber',
|
|
|
+ 'inFlightNO',
|
|
|
+ 'transferFlightNO',
|
|
|
+ 'transferNumber',
|
|
|
+ 'PassengerNameUpcase',
|
|
|
+ 'BagSN',
|
|
|
+ 'U_Device_ID'
|
|
|
+ ].includes(column.property) &&
|
|
|
+ row[column.property] &&
|
|
|
+ row[column.property] !== 'FBULK'
|
|
|
+ ) {
|
|
|
+ classes.push('cell-click')
|
|
|
+ if (
|
|
|
+ this.clickedCells.some(
|
|
|
+ cell =>
|
|
|
+ cell.pageName === this.$route.name &&
|
|
|
+ Object.entries(cell.row).every(([key, value]) => row[key] === value) &&
|
|
|
+ cell.columnProp === column.property
|
|
|
+ )
|
|
|
+ ) {
|
|
|
+ classes.push('cell-clicked')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return classes.join(' ')
|
|
|
+ },
|
|
|
+ cellClickHandler (row, column, cell, event) {
|
|
|
+ if (
|
|
|
+ [
|
|
|
+ 'preFlightNO',
|
|
|
+ 'totalNumber',
|
|
|
+ 'transferFlightNO',
|
|
|
+ 'transferNumber',
|
|
|
+ 'PassengerNameUpcase',
|
|
|
+ 'BagSN',
|
|
|
+ 'U_Device_ID'
|
|
|
+ ].includes(column.property) &&
|
|
|
+ row[column.property] &&
|
|
|
+ row[column.property] !== 'FBULK'
|
|
|
+ ) {
|
|
|
+ this.$store.dispatch('keepAlive/addClickedCell', {
|
|
|
+ row,
|
|
|
+ columnProp: column.property,
|
|
|
+ pageName: this.$route.name
|
|
|
+ })
|
|
|
+ switch (column.property) {
|
|
|
+ case 'preFlightNO':
|
|
|
+ this.$router.push({
|
|
|
+ path: '/advance/flightView',
|
|
|
+ query: {
|
|
|
+ flightNO: row.preFlightNO,
|
|
|
+ flightDate: row.preFlightDate
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break
|
|
|
+ case 'totalNumber':
|
|
|
+ this.$router.push({
|
|
|
+ path: '/advance',
|
|
|
+ query: {
|
|
|
+ flightNO: this.queryData.flightNO,
|
|
|
+ startDate: this.queryData.flightDate,
|
|
|
+ endDate: this.queryData.flightDate,
|
|
|
+ transferArrival: row.preFlightNO
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break
|
|
|
+ case 'inFlightNO':
|
|
|
+ this.$router.push({
|
|
|
+ path: '/advance/flightView',
|
|
|
+ query: {
|
|
|
+ flightNO: row.inFlightNO,
|
|
|
+ flightDate: row.inFlightDate
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break
|
|
|
+ case 'transferFlightNO':
|
|
|
+ this.$router.push({
|
|
|
+ path: '/advance/flightView',
|
|
|
+ query: {
|
|
|
+ flightNO: row.transferFlightNO,
|
|
|
+ flightDate: row.transferFlightDate
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break
|
|
|
+ case 'transferNumber':
|
|
|
+ this.$router.push({
|
|
|
+ path: '/advance',
|
|
|
+ query: {
|
|
|
+ flightNO: this.queryData.flightNO,
|
|
|
+ startDate: this.queryData.flightDate,
|
|
|
+ endDate: this.queryData.flightDate,
|
|
|
+ transferDeparture: row.transferFlightNO
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break
|
|
|
+ case 'PassengerNameUpcase':
|
|
|
+ this.$message.info('开发中')
|
|
|
+ break
|
|
|
+ case 'BagSN':
|
|
|
+ this.$router.push({
|
|
|
+ path: `/${this.$route.path.split('/').slice(1, -1).join('/')}/baggageView`,
|
|
|
+ query: {
|
|
|
+ bagSN: row.BagSN,
|
|
|
+ flightNO: this.queryData.flightNO,
|
|
|
+ flightDate: this.queryData.flightDate
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break
|
|
|
+ case 'U_Device_ID':
|
|
|
+ this.$router.push('/departure/newContainerView')
|
|
|
+ // this.$router.push({
|
|
|
+ // path: `/${this.$route.path.split('/').slice(1, -1).join('/')}/containerView`,
|
|
|
+ // query: {
|
|
|
+ // containerID: row.U_Device_ID
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ toContainer () {
|
|
|
+ this.$router.push({
|
|
|
+ path: `/${this.$route.path.split('/').slice(1, -1).join('/')}/containerView`,
|
|
|
+ query: {
|
|
|
+ containerID: this.containerID
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 合计行
|
|
|
+ summaryMethod ({ columns, data }) {
|
|
|
+ const sums = []
|
|
|
+ if (columns.length > 0) {
|
|
|
+ columns.forEach((column, index) => {
|
|
|
+ if (index === 0) {
|
|
|
+ sums[index] = '合计'
|
|
|
+ } else if (
|
|
|
+ // 需要计算的列
|
|
|
+ ['numberOfBags', 'totalNumber', 'transferNumber'].includes(column.property)
|
|
|
+ ) {
|
|
|
+ const values = data.map(item => Number(item[column.property]))
|
|
|
+ if (values.some(value => !isNaN(value))) {
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
+ const value = Number(curr)
|
|
|
+ if (!isNaN(value)) {
|
|
|
+ return Number(prev) + Number(curr)
|
|
|
+ } else {
|
|
|
+ return Number(prev)
|
|
|
+ }
|
|
|
+ }, 0)
|
|
|
+ } else {
|
|
|
+ sums[index] = 0
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 过滤某些字段不参与计算
|
|
|
+ sums[index] = '-'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return sums
|
|
|
+ },
|
|
|
+ // 统计行数
|
|
|
+ summaryRow (num) {
|
|
|
+ return function () {
|
|
|
+ return ['合计', `共${num}件`]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ containerClick (row) {
|
|
|
+ if (row.containerNumber === 'FBULK') {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/advance',
|
|
|
+ query: {
|
|
|
+ flightNO: this.queryData.flightNO,
|
|
|
+ startDate: this.queryData.flightDate,
|
|
|
+ endDate: this.queryData.flightDate,
|
|
|
+ loadType: 1
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/advance',
|
|
|
+ query: {
|
|
|
+ flightNO: this.queryData.flightNO,
|
|
|
+ startDate: this.queryData.flightDate,
|
|
|
+ endDate: this.queryData.flightDate,
|
|
|
+ U_Device_ID: row.containerNumber
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ exportHandler (refName, tableName) {
|
|
|
+ const table = this.$refs[refName].$el.cloneNode(true)
|
|
|
+ const fileName = `${tableName}-${this.queryData.flightNO}-${this.queryData.flightDate}.xlsx`
|
|
|
+ throttledExportToExcel(table, tableName, fileName)
|
|
|
+ },
|
|
|
+ queryflightInfo (dataContent) {
|
|
|
+ return myQuery(DATACONTENT_ID.flightInfo, ...dataContent)
|
|
|
+ },
|
|
|
+ queryContainer (dataContent) {
|
|
|
+ return myQuery(DATACONTENT_ID.flightContainer, ...dataContent)
|
|
|
+ },
|
|
|
+ queryBaggageByFlightNO (dataContent) {
|
|
|
+ return myQuery(DATACONTENT_ID.flightBaggage, ...dataContent)
|
|
|
+ },
|
|
|
+ async queryAirline (dataContent) {
|
|
|
+ try {
|
|
|
+ const listValues = await myQuery(DATACONTENT_ID.flightAirline, ...dataContent)
|
|
|
+ this.airlineList = listValues.map(({ departureAirport, landingAirport, departureBuild, landingBuild }) => ({
|
|
|
+ label: `${departureAirport}${departureBuild ? `(${departureBuild})` : ''}-${landingAirport}${landingBuild ? `(${landingBuild})` : ''}`,
|
|
|
+ value: `${departureAirport}-${landingAirport}`
|
|
|
+ }))
|
|
|
+ if (this.airlineList.length) {
|
|
|
+ this.selectedAirline = this.airlineList[0].value
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error('失败')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async queryAll (dataContent) {
|
|
|
+ this.fullscreenLoading = true
|
|
|
+ this.flightInfo = {}
|
|
|
+ try {
|
|
|
+ const [flightInfo, containerTableDataData, flightBaggageTableData] = await Promise.all([
|
|
|
+ this.queryflightInfo(dataContent),
|
|
|
+ this.queryContainer(dataContent),
|
|
|
+ this.queryBaggageByFlightNO(dataContent)
|
|
|
+ ])
|
|
|
+ if (flightInfo.length) {
|
|
|
+ this.flightInfo = flightInfo[0]
|
|
|
+ } else {
|
|
|
+ this.$message.info('未查询到航班基础数据')
|
|
|
+ }
|
|
|
+ this.containerTableData = containerTableDataData
|
|
|
+ // this.transferOutBaggageTableData = transferOutBaggageTableData.map(item => {
|
|
|
+ // item['flightTime'] = item['flightDate'] ? item['flightDate'].split('T')[1] : ''
|
|
|
+ // return item
|
|
|
+ // })
|
|
|
+ // this.transferInBaggageTableData = transferInBaggageTableData.map(item => {
|
|
|
+ // item['flightTime'] = item['flightDate'] ? item['flightDate'].split('T')[1] : ''
|
|
|
+ // return item
|
|
|
+ // })
|
|
|
+
|
|
|
+ this.warningContainers = []
|
|
|
+ this.flightBaggageTableData = flightBaggageTableData.map((item, index) => {
|
|
|
+ item['latestStatus'] === '待翻减' && this.warningContainers.push(item['U_Device_ID'])
|
|
|
+ // item['transitFlag'] = item['preFlightNO'] || item['inFlightNO'] ? '是' : '否'
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ setTableFilters(this.flightBaggageTableData, this.flightBaggageTableFilters)
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error('失败')
|
|
|
+ }
|
|
|
+ this.fullscreenLoading = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.new-container-view {
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100vh - 81px);
|
|
|
+ overflow: hidden;
|
|
|
+ background: #dfe3ea;
|
|
|
+ padding: 0px 8px 16px 8px;
|
|
|
+ .list {
|
|
|
+ .title {
|
|
|
+ padding: 16px 0;
|
|
|
+ }
|
|
|
+ .part1 {
|
|
|
+ width: 100%;
|
|
|
+ background: #041741;
|
|
|
+ padding: 16px 30px;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ .part2 {
|
|
|
+ background-color: #fff;
|
|
|
+ ::v-deep .el-table {
|
|
|
+ .cell-click {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #2d7cff;
|
|
|
+ &.cell-clicked {
|
|
|
+ color: purple;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-table__body-wrapper,
|
|
|
+ .el-table__fixed-body-wrapper {
|
|
|
+ tr.bgl-deleted {
|
|
|
+ background: #d2d6df;
|
|
|
+ td {
|
|
|
+ background: #d2d6df;
|
|
|
+ font-style: italic;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .row-warning .el-table__cell {
|
|
|
+ background: red;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|