|
@@ -1,7 +1,12 @@
|
|
|
import { Query } from '@/api/webApi'
|
|
|
import { CommonData, CommonTableColumn } from '~/common'
|
|
|
|
|
|
-const columnGroupsMap = {
|
|
|
+const columnGroupsMap: {
|
|
|
+ [x: string]: {
|
|
|
+ groupName: string
|
|
|
+ children: { columnName: string; columnLabel: string; [x: string]: any }[]
|
|
|
+ }[]
|
|
|
+} = {
|
|
|
departure: [
|
|
|
{
|
|
|
groupName: '航班相关',
|
|
@@ -9,6 +14,7 @@ const columnGroupsMap = {
|
|
|
{
|
|
|
columnName: 'flightNO',
|
|
|
columnLabel: '航班号',
|
|
|
+ needFilters: 1,
|
|
|
},
|
|
|
{
|
|
|
columnName: 'flightDate',
|
|
@@ -21,6 +27,7 @@ const columnGroupsMap = {
|
|
|
{
|
|
|
columnName: 'landingAirport',
|
|
|
columnLabel: '目的站',
|
|
|
+ needFilters: 1,
|
|
|
},
|
|
|
{
|
|
|
columnName: 'takeOffStand',
|
|
@@ -64,26 +71,50 @@ const columnGroupsMap = {
|
|
|
columnName: 'C5',
|
|
|
columnLabel: '收运核单\n(运单/件/重量)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C5_time',
|
|
|
+ columnLabel: '收运核单\n时间',
|
|
|
+ },
|
|
|
{
|
|
|
columnName: 'C6',
|
|
|
columnLabel: '查验\n(拒运/查验)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C6_time',
|
|
|
+ columnLabel: '查验时间',
|
|
|
+ },
|
|
|
{
|
|
|
columnName: 'C7',
|
|
|
columnLabel: '安检\n(运单/件)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C7_time',
|
|
|
+ columnLabel: '安检时间',
|
|
|
+ },
|
|
|
{
|
|
|
columnName: 'C8',
|
|
|
columnLabel: '加货\n(运单/板卡/件/重量)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C8_time',
|
|
|
+ columnLabel: '加货时间',
|
|
|
+ },
|
|
|
{
|
|
|
columnName: 'C9',
|
|
|
columnLabel: '待运区\n(板卡/件)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C9_time',
|
|
|
+ columnLabel: '待运区时间',
|
|
|
+ },
|
|
|
{
|
|
|
columnName: 'C10',
|
|
|
columnLabel: '配载\n(板卡/件)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C10_time',
|
|
|
+ columnLabel: '配载时间',
|
|
|
+ },
|
|
|
{
|
|
|
columnName: 'C11',
|
|
|
columnLabel: '计划交接\n时间',
|
|
@@ -92,26 +123,50 @@ const columnGroupsMap = {
|
|
|
columnName: 'C12',
|
|
|
columnLabel: '货站交接\n(板卡/件)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C12_time',
|
|
|
+ columnLabel: '货站交接\n时间',
|
|
|
+ },
|
|
|
{
|
|
|
columnName: 'C13',
|
|
|
columnLabel: '运输前复核\n(板卡/件)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C13_time',
|
|
|
+ columnLabel: '运输前复核\n时间',
|
|
|
+ },
|
|
|
{
|
|
|
columnName: 'C14',
|
|
|
columnLabel: '机下交接\n(板卡/件)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C14_time',
|
|
|
+ columnLabel: '机下交接\n时间',
|
|
|
+ },
|
|
|
{
|
|
|
columnName: 'C15',
|
|
|
columnLabel: '装机\n(板卡/件)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C15_time',
|
|
|
+ columnLabel: '装机时间',
|
|
|
+ },
|
|
|
{
|
|
|
columnName: 'C16',
|
|
|
columnLabel: '拉货登记\n(板卡/件)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C16_time',
|
|
|
+ columnLabel: '拉货登记\n时间',
|
|
|
+ },
|
|
|
{
|
|
|
columnName: 'C17',
|
|
|
columnLabel: '拉回确认\n(板卡/件)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C17_time',
|
|
|
+ columnLabel: '拉回确认\n时间',
|
|
|
+ },
|
|
|
],
|
|
|
},
|
|
|
],
|
|
@@ -122,6 +177,7 @@ const columnGroupsMap = {
|
|
|
{
|
|
|
columnName: 'flightNO',
|
|
|
columnLabel: '航班号',
|
|
|
+ needFilters: 1,
|
|
|
},
|
|
|
{
|
|
|
columnName: 'flightDate',
|
|
@@ -134,6 +190,7 @@ const columnGroupsMap = {
|
|
|
{
|
|
|
columnName: 'landingAirport',
|
|
|
columnLabel: '目的站',
|
|
|
+ needFilters: 1,
|
|
|
},
|
|
|
{
|
|
|
columnName: 'landingStand',
|
|
@@ -169,288 +226,103 @@ const columnGroupsMap = {
|
|
|
columnName: 'C5',
|
|
|
columnLabel: '卸机\n(板/箱/卡)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C5_time',
|
|
|
+ columnLabel: '卸机时间',
|
|
|
+ },
|
|
|
{
|
|
|
columnName: 'C6',
|
|
|
columnLabel: '机下交接\n(板/箱/卡)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C6_time',
|
|
|
+ columnLabel: '机下交接\n时间',
|
|
|
+ },
|
|
|
{
|
|
|
columnName: 'C7',
|
|
|
columnLabel: '货站交接\n(板/箱/卡)',
|
|
|
},
|
|
|
{
|
|
|
- columnName: 'C8',
|
|
|
- columnLabel: '理货\n(板卡/运单/件/重量)',
|
|
|
+ columnName: 'C7_time',
|
|
|
+ columnLabel: '货站交接\n时间',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnName: 'C8_time',
|
|
|
+ columnLabel: '理货时间',
|
|
|
},
|
|
|
{
|
|
|
columnName: 'C9',
|
|
|
columnLabel: '出库\n(批/运单/件)',
|
|
|
},
|
|
|
+ {
|
|
|
+ columnName: 'C9_time',
|
|
|
+ columnLabel: '出库时间',
|
|
|
+ },
|
|
|
],
|
|
|
},
|
|
|
],
|
|
|
}
|
|
|
|
|
|
const simulateTableDataMap = {
|
|
|
- DepartureAirport: [
|
|
|
- {
|
|
|
- flightNO: 'ZH3423',
|
|
|
- flightDate: '2022/09/10',
|
|
|
- planDepartureTime: '22/09/10 12:01',
|
|
|
- landingAirport: '-NGK-PEK',
|
|
|
- takeOffStand: '84',
|
|
|
- inFlightNO: 'HU2451',
|
|
|
- planLandingTime: '2022/09/10 11:01',
|
|
|
- C1: '锂2/冷1',
|
|
|
- C2: '365/536',
|
|
|
- C3: '1/2',
|
|
|
- C4: '',
|
|
|
- C5: '364/534/1254KG',
|
|
|
- C6: '0/7',
|
|
|
- C7: '364/534',
|
|
|
- C8: '8/365/536/1254KG',
|
|
|
- C9: '8/536',
|
|
|
- C10: '8/536',
|
|
|
- C11: '11:45',
|
|
|
- C12: '8/536',
|
|
|
- C13: '8/536',
|
|
|
- C14: '8/536',
|
|
|
- C15: '8/536',
|
|
|
- C16: '0/358/5',
|
|
|
- C17: '0/5',
|
|
|
- },
|
|
|
- {
|
|
|
- flightNO: 'CA1512',
|
|
|
- flightDate: '2022/09/10',
|
|
|
- planDepartureTime: '22/09/10 12:01',
|
|
|
- landingAirport: '-NGK-PEK',
|
|
|
- takeOffStand: '84',
|
|
|
- inFlightNO: 'HU2451',
|
|
|
- planLandingTime: '2022/09/10 11:01',
|
|
|
- C1: '锂2/冷1',
|
|
|
- C2: '365/536',
|
|
|
- C3: '1/2',
|
|
|
- C4: '',
|
|
|
- C5: '364/534/1254KG',
|
|
|
- C6: '0/7',
|
|
|
- C7: '364/534',
|
|
|
- C8: '8/365/536/1254KG',
|
|
|
- C9: '4/243',
|
|
|
- C10: '8/536',
|
|
|
- C11: '11:45',
|
|
|
- C12: '8/536',
|
|
|
- C13: '8/536',
|
|
|
- C14: '8/536',
|
|
|
- C15: '8/536',
|
|
|
- C16: '0/358/5',
|
|
|
- C17: '0/5',
|
|
|
- },
|
|
|
- {
|
|
|
- flightNO: 'ZH3456',
|
|
|
- flightDate: '2022/09/10',
|
|
|
- planDepartureTime: '22/09/10 12:01',
|
|
|
- landingAirport: '-NGK-PEK',
|
|
|
- takeOffStand: '84',
|
|
|
- inFlightNO: 'HU2451',
|
|
|
- planLandingTime: '2022/09/10 11:01',
|
|
|
- C1: '锂2/冷1',
|
|
|
- C2: '365/536',
|
|
|
- C3: '1/2',
|
|
|
- C4: '',
|
|
|
- C5: '364/534/1254KG',
|
|
|
- C6: '0/7',
|
|
|
- C7: '364/534',
|
|
|
- C8: '8/365/536/1254KG',
|
|
|
- C9: '8/536',
|
|
|
- C10: '5/357',
|
|
|
- C11: '11:45',
|
|
|
- C12: '8/536',
|
|
|
- C13: '8/536',
|
|
|
- C14: '8/536',
|
|
|
- C15: '8/536',
|
|
|
- C16: '0/358/5',
|
|
|
- C17: '0/5',
|
|
|
- },
|
|
|
- ],
|
|
|
- ArrivalAirport: [
|
|
|
- {
|
|
|
- flightNO: 'ZH3423',
|
|
|
- flightDate: '2022/09/10',
|
|
|
- planLandingTime: '22/09/10 12:01',
|
|
|
- landingAirport: 'NKG-PEK-',
|
|
|
- landingStand: '84',
|
|
|
- C1: '锂2/冷1',
|
|
|
- C2: '363/543',
|
|
|
- C3: '',
|
|
|
- C4: '0/6',
|
|
|
- C5: '8/8/8',
|
|
|
- C6: '8/8/8',
|
|
|
- C7: '8/8/8',
|
|
|
- C8: '8/363/537/1254KG',
|
|
|
- C9: '3/363/537',
|
|
|
- },
|
|
|
- {
|
|
|
- flightNO: 'CA1512',
|
|
|
- flightDate: '2022/09/10',
|
|
|
- planLandingTime: '22/09/10 12:01',
|
|
|
- landingAirport: 'NKG-PEK-',
|
|
|
- landingStand: '84',
|
|
|
- C1: '锂2/冷1',
|
|
|
- C2: '363/543',
|
|
|
- C3: '',
|
|
|
- C4: '',
|
|
|
- C5: '8/8/8',
|
|
|
- C6: '8/8/8',
|
|
|
- C7: '8/8/8',
|
|
|
- C8: '8/363/537/1254KG',
|
|
|
- C9: '3/363/537',
|
|
|
- },
|
|
|
- {
|
|
|
- flightNO: 'ZH3456',
|
|
|
- flightDate: '2022/09/10',
|
|
|
- planLandingTime: '22/09/10 12:01',
|
|
|
- landingAirport: 'NKG-PEK-',
|
|
|
- landingStand: '84',
|
|
|
- C1: '锂2/冷1',
|
|
|
- C2: '363/543',
|
|
|
- C3: '',
|
|
|
- C4: '',
|
|
|
- C5: '8/8/8',
|
|
|
- C6: '8/8/8',
|
|
|
- C7: '8/8/8',
|
|
|
- C8: '8/363/537/1254KG',
|
|
|
- C9: '3/363/537',
|
|
|
- },
|
|
|
- ],
|
|
|
- InternationalDepartureAirport: [
|
|
|
- {
|
|
|
- flightNO: 'ZH3423',
|
|
|
- flightDate: '2022/09/10',
|
|
|
- planDepartureTime: '22/09/10 12:01',
|
|
|
- landingAirport: '-NGK-PEK',
|
|
|
- takeOffStand: '84',
|
|
|
- inFlightNO: 'HU2451',
|
|
|
- planLandingTime: '2022/09/10 11:01',
|
|
|
- C1: '锂2/冷1',
|
|
|
- C2: '365/536',
|
|
|
- C3: '1/2',
|
|
|
- C4: '',
|
|
|
- C5: '364/534/1254KG',
|
|
|
- C6: '0/7',
|
|
|
- C7: '364/534',
|
|
|
- C8: '8/365/536/1254KG',
|
|
|
- C9: '8/536',
|
|
|
- C10: '8/536',
|
|
|
- C11: '11:45',
|
|
|
- C12: '8/536',
|
|
|
- C13: '8/536',
|
|
|
- C14: '8/536',
|
|
|
- C15: '8/536',
|
|
|
- C16: '0/358/5',
|
|
|
- C17: '0/5',
|
|
|
- },
|
|
|
- {
|
|
|
- flightNO: 'CA1512',
|
|
|
- flightDate: '2022/09/10',
|
|
|
- planDepartureTime: '22/09/10 12:01',
|
|
|
- landingAirport: '-NGK-PEK',
|
|
|
- takeOffStand: '84',
|
|
|
- inFlightNO: 'HU2451',
|
|
|
- planLandingTime: '2022/09/10 11:01',
|
|
|
- C1: '锂2/冷1',
|
|
|
- C2: '365/536',
|
|
|
- C3: '1/2',
|
|
|
- C4: '',
|
|
|
- C5: '364/534/1254KG',
|
|
|
- C6: '0/7',
|
|
|
- C7: '364/534',
|
|
|
- C8: '8/365/536/1254KG',
|
|
|
- C9: '4/243',
|
|
|
- C10: '8/536',
|
|
|
- C11: '11:45',
|
|
|
- C12: '8/536',
|
|
|
- C13: '8/536',
|
|
|
- C14: '8/536',
|
|
|
- C15: '8/536',
|
|
|
- C16: '0/358/5',
|
|
|
- C17: '0/5',
|
|
|
- },
|
|
|
- {
|
|
|
- flightNO: 'ZH3456',
|
|
|
- flightDate: '2022/09/10',
|
|
|
- planDepartureTime: '22/09/10 12:01',
|
|
|
- landingAirport: '-NGK-PEK',
|
|
|
- takeOffStand: '84',
|
|
|
- inFlightNO: 'HU2451',
|
|
|
- planLandingTime: '2022/09/10 11:01',
|
|
|
- C1: '锂2/冷1',
|
|
|
- C2: '365/536',
|
|
|
- C3: '1/2',
|
|
|
- C4: '',
|
|
|
- C5: '364/534/1254KG',
|
|
|
- C6: '0/7',
|
|
|
- C7: '364/534',
|
|
|
- C8: '8/365/536/1254KG',
|
|
|
- C9: '8/536',
|
|
|
- C10: '5/357',
|
|
|
- C11: '11:45',
|
|
|
- C12: '8/536',
|
|
|
- C13: '8/536',
|
|
|
- C14: '8/536',
|
|
|
- C15: '8/536',
|
|
|
- C16: '0/358/5',
|
|
|
- C17: '0/5',
|
|
|
- },
|
|
|
- ],
|
|
|
- InternationalArrivalAirport: [
|
|
|
- {
|
|
|
- flightNO: 'ZH3423',
|
|
|
- flightDate: '2022/09/10',
|
|
|
- planLandingTime: '22/09/10 12:01',
|
|
|
- landingAirport: 'NKG-PEK-',
|
|
|
- landingStand: '84',
|
|
|
- C1: '锂2/冷1',
|
|
|
- C2: '363/543',
|
|
|
- C3: '',
|
|
|
- C4: '0/6',
|
|
|
- C5: '8/8/8',
|
|
|
- C6: '8/8/8',
|
|
|
- C7: '8/8/8',
|
|
|
- C8: '8/363/537/1254KG',
|
|
|
- C9: '3/363/537',
|
|
|
- },
|
|
|
- {
|
|
|
- flightNO: 'CA1512',
|
|
|
- flightDate: '2022/09/10',
|
|
|
- planLandingTime: '22/09/10 12:01',
|
|
|
- landingAirport: 'NKG-PEK-',
|
|
|
- landingStand: '84',
|
|
|
- C1: '锂2/冷1',
|
|
|
- C2: '363/543',
|
|
|
- C3: '',
|
|
|
- C4: '',
|
|
|
- C5: '8/8/8',
|
|
|
- C6: '8/8/8',
|
|
|
- C7: '8/8/8',
|
|
|
- C8: '8/363/537/1254KG',
|
|
|
- C9: '3/363/537',
|
|
|
- },
|
|
|
- {
|
|
|
- flightNO: 'ZH3456',
|
|
|
- flightDate: '2022/09/10',
|
|
|
- planLandingTime: '22/09/10 12:01',
|
|
|
- landingAirport: 'NKG-PEK-',
|
|
|
- landingStand: '84',
|
|
|
- C1: '锂2/冷1',
|
|
|
- C2: '363/543',
|
|
|
- C3: '',
|
|
|
- C4: '',
|
|
|
- C5: '8/8/8',
|
|
|
- C6: '8/8/8',
|
|
|
- C7: '8/8/8',
|
|
|
- C8: '8/363/537/1254KG',
|
|
|
- C9: '3/363/537',
|
|
|
- },
|
|
|
- ],
|
|
|
+ departure: Array.from({ length: 3 }, (_, i) => ({
|
|
|
+ flightNO: 'ZH3423',
|
|
|
+ flightDate: '2022/09/10',
|
|
|
+ planDepartureTime: '22/09/10 12:01',
|
|
|
+ landingAirport: '-NGK-PEK',
|
|
|
+ takeOffStand: '84',
|
|
|
+ inFlightNO: 'HU2451',
|
|
|
+ planLandingTime: '2022/09/10 11:01',
|
|
|
+ C1: '锂2/冷1',
|
|
|
+ C2: '365/536',
|
|
|
+ C3: '1/2',
|
|
|
+ C4: '',
|
|
|
+ C5: '364/534/1254KG',
|
|
|
+ C5_time: '12:02',
|
|
|
+ C6: '0/7',
|
|
|
+ C6_time: '12:02',
|
|
|
+ C7: '364/534',
|
|
|
+ C7_time: '12:02',
|
|
|
+ C8: '8/365/536/1254KG',
|
|
|
+ C8_time: '12:02',
|
|
|
+ C9: '8/536',
|
|
|
+ C9_time: '12:02',
|
|
|
+ C10: '8/536',
|
|
|
+ C10_time: '12:02',
|
|
|
+ C11: '11:45',
|
|
|
+ C12: i === 1 ? '4/243' : '8/536',
|
|
|
+ C12_time: '12:02',
|
|
|
+ C13: i === 2 ? '5/357' : '8/536',
|
|
|
+ C13_time: '12:02',
|
|
|
+ C14: '8/536',
|
|
|
+ C14_time: '12:02',
|
|
|
+ C15: '8/536',
|
|
|
+ C15_time: '12:02',
|
|
|
+ C16: '0/358/5',
|
|
|
+ C16_time: '12:02',
|
|
|
+ C17: '0/5',
|
|
|
+ C17_time: '12:02',
|
|
|
+ })),
|
|
|
+ arrival: Array.from({ length: 3 }, (_, i) => ({
|
|
|
+ flightNO: 'ZH3423',
|
|
|
+ flightDate: '2022/09/10',
|
|
|
+ planLandingTime: '22/09/10 12:01',
|
|
|
+ landingAirport: 'NKG-PEK-',
|
|
|
+ landingStand: '84',
|
|
|
+ C1: '锂2/冷1',
|
|
|
+ C2: '363/543',
|
|
|
+ C3: '',
|
|
|
+ C4: i === 0 ? '0/6' : '',
|
|
|
+ C5: '8/8/8',
|
|
|
+ C5_time: '12:02',
|
|
|
+ C6: '8/8/8',
|
|
|
+ C6_time: '12:02',
|
|
|
+ C7: '8/8/8',
|
|
|
+ C7_time: '12:02',
|
|
|
+ C8: '8/363/537/1254KG',
|
|
|
+ C8_time: '12:02',
|
|
|
+ C9: '3/363/537',
|
|
|
+ C9_time: '12:02',
|
|
|
+ })),
|
|
|
}
|
|
|
const headerClassMap = ['bg-yellow', 'bg-green', 'bg-cyan']
|
|
|
|
|
@@ -462,12 +334,12 @@ const computedWidth = (text: string) => {
|
|
|
for (let i = 0; i < len; i++) {
|
|
|
realLength += line.charCodeAt(i) > 255 ? 2 : 1
|
|
|
}
|
|
|
- if (width < (realLength + 2) * 10) {
|
|
|
- width = (realLength + 2) * 10
|
|
|
+ if (width < realLength * 8) {
|
|
|
+ width = realLength * 8
|
|
|
}
|
|
|
})
|
|
|
if (['航班号', '目的站'].includes(text)) {
|
|
|
- width += 10
|
|
|
+ width += 8
|
|
|
}
|
|
|
return width
|
|
|
}
|
|
@@ -480,18 +352,16 @@ export default function useAirportTable(name: string, formData: CommonData) {
|
|
|
columnGroupsMap[name.includes('Departure') ? 'departure' : 'arrival']
|
|
|
tableColumns.value = groups.reduce(
|
|
|
(columns: CommonTableColumn[], group, groupIndex) => {
|
|
|
- group.children.forEach(({ columnName, columnLabel }) => {
|
|
|
+ group.children.forEach(column => {
|
|
|
columns.push({
|
|
|
- key: columnName,
|
|
|
- dataKey: columnName,
|
|
|
- title: columnLabel,
|
|
|
- columnName,
|
|
|
- columnLabel,
|
|
|
+ key: column.columnName,
|
|
|
+ dataKey: column.columnName,
|
|
|
+ title: column.columnLabel,
|
|
|
columnDescribe: '',
|
|
|
dataType: '',
|
|
|
listqueryTemplateID: null,
|
|
|
needCount: null,
|
|
|
- needFilters: ['航班号', '目的站'].includes(columnLabel) ? 1 : 0,
|
|
|
+ needFilters: null,
|
|
|
needGroup: null,
|
|
|
needSearch: null,
|
|
|
needShow: 1,
|
|
@@ -499,11 +369,12 @@ export default function useAirportTable(name: string, formData: CommonData) {
|
|
|
orderNumber: null,
|
|
|
queryTemplateColumnSetID: null,
|
|
|
queryTemplateID: null,
|
|
|
- width: computedWidth(columnLabel),
|
|
|
+ width: computedWidth(column.columnLabel),
|
|
|
flexGrow: 1,
|
|
|
align: 'center',
|
|
|
headerClass: headerClassMap[groupIndex],
|
|
|
groupName: group.groupName,
|
|
|
+ ...column,
|
|
|
})
|
|
|
})
|
|
|
return columns
|
|
@@ -550,7 +421,8 @@ export default function useAirportTable(name: string, formData: CommonData) {
|
|
|
}
|
|
|
}
|
|
|
const getSimulateTableData = () => {
|
|
|
- tableData.value = simulateTableDataMap[name]
|
|
|
+ tableData.value =
|
|
|
+ simulateTableDataMap[name.includes('Departure') ? 'departure' : 'arrival']
|
|
|
}
|
|
|
let queryLoop: number | null = null
|
|
|
const startQuery = async () => {
|