|
@@ -1,588 +0,0 @@
|
|
-import { Ref } from 'vue'
|
|
|
|
-import { Query } from '@/api/webApi'
|
|
|
|
-import { CommonData, CommonTableColumn } from '~/common'
|
|
|
|
-
|
|
|
|
-const departureColumnGroups = [
|
|
|
|
- {
|
|
|
|
- groupName: '航班相关',
|
|
|
|
- children: [
|
|
|
|
- {
|
|
|
|
- columnName: 'flightNO',
|
|
|
|
- columnLabel: '航班号',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'flightDate',
|
|
|
|
- columnLabel: '执飞日期',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'takeOffTime',
|
|
|
|
- columnLabel: '起飞时间',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'desitination',
|
|
|
|
- columnLabel: '目的站',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'gate',
|
|
|
|
- columnLabel: '停机位',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'preFlightNO',
|
|
|
|
- columnLabel: '前序航班',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'landingTime',
|
|
|
|
- columnLabel: '实际降落\n时间',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- groupName: '货站相关',
|
|
|
|
- children: [
|
|
|
|
- {
|
|
|
|
- columnName: 'special',
|
|
|
|
- columnLabel: '特货信息',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'projectLoad',
|
|
|
|
- columnLabel: '预计装载数\n(运单/件)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'transferIn',
|
|
|
|
- columnLabel: '中转进\n(运单/件)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'cancel',
|
|
|
|
- columnLabel: '退运\n(板卡/件)',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- groupName: '地服相关',
|
|
|
|
- children: [
|
|
|
|
- {
|
|
|
|
- columnName: 'receive',
|
|
|
|
- columnLabel: '收运核单\n(运单/件/重量)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'check',
|
|
|
|
- columnLabel: '查验\n(拒运/查验)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'security',
|
|
|
|
- columnLabel: '安检\n(运单/件)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'add',
|
|
|
|
- columnLabel: '加货\n(运单/板卡/件/重量)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'wait',
|
|
|
|
- columnLabel: '待运区\n(板卡/件)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'stowage',
|
|
|
|
- columnLabel: '配载\n(板卡/件)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'handOverTime',
|
|
|
|
- columnLabel: '计划交接\n时间',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'stationHandOver',
|
|
|
|
- columnLabel: '货站交接\n(板卡/件)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'recheck',
|
|
|
|
- columnLabel: '运输前复核\n(板卡/件)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'flightHandOver',
|
|
|
|
- columnLabel: '机下交接\n(板卡/件)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'load',
|
|
|
|
- columnLabel: '装机\n(板卡/件)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'goodsRegister',
|
|
|
|
- columnLabel: '拉货登记\n(板卡/件)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'pullBack',
|
|
|
|
- columnLabel: '拉回确认\n(板卡/件)',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
-]
|
|
|
|
-
|
|
|
|
-const arrivalColumnGroups = [
|
|
|
|
- {
|
|
|
|
- groupName: '航班相关',
|
|
|
|
- children: [
|
|
|
|
- {
|
|
|
|
- columnName: 'flightNO',
|
|
|
|
- columnLabel: '航班号',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'flightDate',
|
|
|
|
- columnLabel: '执飞日期',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'landingTime',
|
|
|
|
- columnLabel: '降落时间',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'desitination',
|
|
|
|
- columnLabel: '目的站',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'gate',
|
|
|
|
- columnLabel: '停机位',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- groupName: '货站相关',
|
|
|
|
- children: [
|
|
|
|
- {
|
|
|
|
- columnName: 'special',
|
|
|
|
- columnLabel: '特货信息',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'projectUnload',
|
|
|
|
- columnLabel: '预计卸载数\n(运单/件)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'transferOut',
|
|
|
|
- columnLabel: '中转出\n(运单/件)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'difference',
|
|
|
|
- columnLabel: '收货差异\n(板卡/件)',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- groupName: '地服相关',
|
|
|
|
- children: [
|
|
|
|
- {
|
|
|
|
- columnName: 'unload',
|
|
|
|
- columnLabel: '卸机\n(板/箱/卡)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'flightHandOver',
|
|
|
|
- columnLabel: '机下交接\n(板/箱/卡)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'stationHandOver',
|
|
|
|
- columnLabel: '货站交接\n(板/箱/卡)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'settle',
|
|
|
|
- columnLabel: '理货\n(板卡/运单/件/重量)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- columnName: 'outCargo',
|
|
|
|
- columnLabel: '出库\n(批/运单/件)',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
-]
|
|
|
|
-
|
|
|
|
-const testTableDatas = {
|
|
|
|
- departure: [
|
|
|
|
- {
|
|
|
|
- flightNO: 'ZH3423',
|
|
|
|
- flightDate: '2022/09/10',
|
|
|
|
- takeOffTime: '22/09/10 12:01',
|
|
|
|
- desitination: '-NGK-PEK',
|
|
|
|
- gate: '84',
|
|
|
|
- preFlightNO: 'HU2451',
|
|
|
|
- landingTime: '2022/09/10 11:01',
|
|
|
|
- special: '锂2/冷1',
|
|
|
|
- projectLoad: '365/536',
|
|
|
|
- transferIn: '1/2',
|
|
|
|
- cancel: '',
|
|
|
|
- receive: '364/534/1254KG',
|
|
|
|
- check: '0/7',
|
|
|
|
- security: '364/534',
|
|
|
|
- add: '8/365/536/1254KG',
|
|
|
|
- wait: '8/536',
|
|
|
|
- stowage: '8/536',
|
|
|
|
- handOverTime: '11:45',
|
|
|
|
- stationHandOver: '8/536',
|
|
|
|
- recheck: '8/536',
|
|
|
|
- flightHandOver: '8/536',
|
|
|
|
- load: '8/536',
|
|
|
|
- goodsRegister: '0/358/5',
|
|
|
|
- pullBack: '0/5',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- flightNO: 'CA1512',
|
|
|
|
- flightDate: '2022/09/10',
|
|
|
|
- takeOffTime: '22/09/10 12:01',
|
|
|
|
- desitination: '-NGK-PEK',
|
|
|
|
- gate: '84',
|
|
|
|
- preFlightNO: 'HU2451',
|
|
|
|
- landingTime: '2022/09/10 11:01',
|
|
|
|
- special: '锂2/冷1',
|
|
|
|
- projectLoad: '365/536',
|
|
|
|
- transferIn: '1/2',
|
|
|
|
- cancel: '',
|
|
|
|
- receive: '364/534/1254KG',
|
|
|
|
- check: '0/7',
|
|
|
|
- security: '364/534',
|
|
|
|
- add: '8/365/536/1254KG',
|
|
|
|
- wait: '4/243',
|
|
|
|
- stowage: '8/536',
|
|
|
|
- handOverTime: '11:45',
|
|
|
|
- stationHandOver: '8/536',
|
|
|
|
- recheck: '8/536',
|
|
|
|
- flightHandOver: '8/536',
|
|
|
|
- load: '8/536',
|
|
|
|
- goodsRegister: '0/358/5',
|
|
|
|
- pullBack: '0/5',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- flightNO: 'ZH3456',
|
|
|
|
- flightDate: '2022/09/10',
|
|
|
|
- takeOffTime: '22/09/10 12:01',
|
|
|
|
- desitination: '-NGK-PEK',
|
|
|
|
- gate: '84',
|
|
|
|
- preFlightNO: 'HU2451',
|
|
|
|
- landingTime: '2022/09/10 11:01',
|
|
|
|
- special: '锂2/冷1',
|
|
|
|
- projectLoad: '365/536',
|
|
|
|
- transferIn: '1/2',
|
|
|
|
- cancel: '',
|
|
|
|
- receive: '364/534/1254KG',
|
|
|
|
- check: '0/7',
|
|
|
|
- security: '364/534',
|
|
|
|
- add: '8/365/536/1254KG',
|
|
|
|
- wait: '8/536',
|
|
|
|
- stowage: '5/357',
|
|
|
|
- handOverTime: '11:45',
|
|
|
|
- stationHandOver: '8/536',
|
|
|
|
- recheck: '8/536',
|
|
|
|
- flightHandOver: '8/536',
|
|
|
|
- load: '8/536',
|
|
|
|
- goodsRegister: '0/358/5',
|
|
|
|
- pullBack: '0/5',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- arrival: [
|
|
|
|
- {
|
|
|
|
- flightNO: 'ZH3423',
|
|
|
|
- flightDate: '2022/09/10',
|
|
|
|
- landingTime: '22/09/10 12:01',
|
|
|
|
- desitination: 'NKG-PEK-',
|
|
|
|
- gate: '84',
|
|
|
|
- special: '锂2/冷1',
|
|
|
|
- projectUnload: '363/543',
|
|
|
|
- transferOut: '',
|
|
|
|
- difference: '0/6',
|
|
|
|
- unload: '8/8/8',
|
|
|
|
- flightHandOver: '8/8/8',
|
|
|
|
- stationHandOver: '8/8/8',
|
|
|
|
- settle: '8/363/537/1254KG',
|
|
|
|
- outCargo: '3/363/537',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- flightNO: 'CA1512',
|
|
|
|
- flightDate: '2022/09/10',
|
|
|
|
- landingTime: '22/09/10 12:01',
|
|
|
|
- desitination: 'NKG-PEK-',
|
|
|
|
- gate: '84',
|
|
|
|
- special: '锂2/冷1',
|
|
|
|
- projectUnload: '363/543',
|
|
|
|
- transferOut: '',
|
|
|
|
- difference: '',
|
|
|
|
- unload: '8/8/8',
|
|
|
|
- flightHandOver: '8/8/8',
|
|
|
|
- stationHandOver: '8/8/8',
|
|
|
|
- settle: '8/363/537/1254KG',
|
|
|
|
- outCargo: '3/363/537',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- flightNO: 'ZH3456',
|
|
|
|
- flightDate: '2022/09/10',
|
|
|
|
- landingTime: '22/09/10 12:01',
|
|
|
|
- desitination: 'NKG-PEK-',
|
|
|
|
- gate: '84',
|
|
|
|
- special: '锂2/冷1',
|
|
|
|
- projectUnload: '363/543',
|
|
|
|
- transferOut: '',
|
|
|
|
- difference: '',
|
|
|
|
- unload: '8/8/8',
|
|
|
|
- flightHandOver: '8/8/8',
|
|
|
|
- stationHandOver: '8/8/8',
|
|
|
|
- settle: '8/363/537/1254KG',
|
|
|
|
- outCargo: '3/363/537',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- internationalDeparture: [
|
|
|
|
- {
|
|
|
|
- flightNO: 'ZH3423',
|
|
|
|
- flightDate: '2022/09/10',
|
|
|
|
- takeOffTime: '22/09/10 12:01',
|
|
|
|
- desitination: '-NGK-PEK',
|
|
|
|
- gate: '84',
|
|
|
|
- preFlightNO: 'HU2451',
|
|
|
|
- landingTime: '2022/09/10 11:01',
|
|
|
|
- special: '锂2/冷1',
|
|
|
|
- projectLoad: '365/536',
|
|
|
|
- transferIn: '1/2',
|
|
|
|
- cancel: '',
|
|
|
|
- receive: '364/534/1254KG',
|
|
|
|
- check: '0/7',
|
|
|
|
- security: '364/534',
|
|
|
|
- add: '8/365/536/1254KG',
|
|
|
|
- wait: '8/536',
|
|
|
|
- stowage: '8/536',
|
|
|
|
- handOverTime: '11:45',
|
|
|
|
- stationHandOver: '8/536',
|
|
|
|
- recheck: '8/536',
|
|
|
|
- flightHandOver: '8/536',
|
|
|
|
- load: '8/536',
|
|
|
|
- goodsRegister: '0/358/5',
|
|
|
|
- pullBack: '0/5',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- flightNO: 'CA1512',
|
|
|
|
- flightDate: '2022/09/10',
|
|
|
|
- takeOffTime: '22/09/10 12:01',
|
|
|
|
- desitination: '-NGK-PEK',
|
|
|
|
- gate: '84',
|
|
|
|
- preFlightNO: 'HU2451',
|
|
|
|
- landingTime: '2022/09/10 11:01',
|
|
|
|
- special: '锂2/冷1',
|
|
|
|
- projectLoad: '365/536',
|
|
|
|
- transferIn: '1/2',
|
|
|
|
- cancel: '',
|
|
|
|
- receive: '364/534/1254KG',
|
|
|
|
- check: '0/7',
|
|
|
|
- security: '364/534',
|
|
|
|
- add: '8/365/536/1254KG',
|
|
|
|
- wait: '4/243',
|
|
|
|
- stowage: '8/536',
|
|
|
|
- handOverTime: '11:45',
|
|
|
|
- stationHandOver: '8/536',
|
|
|
|
- recheck: '8/536',
|
|
|
|
- flightHandOver: '8/536',
|
|
|
|
- load: '8/536',
|
|
|
|
- goodsRegister: '0/358/5',
|
|
|
|
- pullBack: '0/5',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- flightNO: 'ZH3456',
|
|
|
|
- flightDate: '2022/09/10',
|
|
|
|
- takeOffTime: '22/09/10 12:01',
|
|
|
|
- desitination: '-NGK-PEK',
|
|
|
|
- gate: '84',
|
|
|
|
- preFlightNO: 'HU2451',
|
|
|
|
- landingTime: '2022/09/10 11:01',
|
|
|
|
- special: '锂2/冷1',
|
|
|
|
- projectLoad: '365/536',
|
|
|
|
- transferIn: '1/2',
|
|
|
|
- cancel: '',
|
|
|
|
- receive: '364/534/1254KG',
|
|
|
|
- check: '0/7',
|
|
|
|
- security: '364/534',
|
|
|
|
- add: '8/365/536/1254KG',
|
|
|
|
- wait: '8/536',
|
|
|
|
- stowage: '5/357',
|
|
|
|
- handOverTime: '11:45',
|
|
|
|
- stationHandOver: '8/536',
|
|
|
|
- recheck: '8/536',
|
|
|
|
- flightHandOver: '8/536',
|
|
|
|
- load: '8/536',
|
|
|
|
- goodsRegister: '0/358/5',
|
|
|
|
- pullBack: '0/5',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- internationalArrival: [
|
|
|
|
- {
|
|
|
|
- flightNO: 'ZH3423',
|
|
|
|
- flightDate: '2022/09/10',
|
|
|
|
- landingTime: '22/09/10 12:01',
|
|
|
|
- desitination: 'NKG-PEK-',
|
|
|
|
- gate: '84',
|
|
|
|
- special: '锂2/冷1',
|
|
|
|
- projectUnload: '363/543',
|
|
|
|
- transferOut: '',
|
|
|
|
- difference: '0/6',
|
|
|
|
- unload: '8/8/8',
|
|
|
|
- flightHandOver: '8/8/8',
|
|
|
|
- stationHandOver: '8/8/8',
|
|
|
|
- settle: '8/363/537/1254KG',
|
|
|
|
- outCargo: '3/363/537',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- flightNO: 'CA1512',
|
|
|
|
- flightDate: '2022/09/10',
|
|
|
|
- landingTime: '22/09/10 12:01',
|
|
|
|
- desitination: 'NKG-PEK-',
|
|
|
|
- gate: '84',
|
|
|
|
- special: '锂2/冷1',
|
|
|
|
- projectUnload: '363/543',
|
|
|
|
- transferOut: '',
|
|
|
|
- difference: '',
|
|
|
|
- unload: '8/8/8',
|
|
|
|
- flightHandOver: '8/8/8',
|
|
|
|
- stationHandOver: '8/8/8',
|
|
|
|
- settle: '8/363/537/1254KG',
|
|
|
|
- outCargo: '3/363/537',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- flightNO: 'ZH3456',
|
|
|
|
- flightDate: '2022/09/10',
|
|
|
|
- landingTime: '22/09/10 12:01',
|
|
|
|
- desitination: 'NKG-PEK-',
|
|
|
|
- gate: '84',
|
|
|
|
- special: '锂2/冷1',
|
|
|
|
- projectUnload: '363/543',
|
|
|
|
- transferOut: '',
|
|
|
|
- difference: '',
|
|
|
|
- unload: '8/8/8',
|
|
|
|
- flightHandOver: '8/8/8',
|
|
|
|
- stationHandOver: '8/8/8',
|
|
|
|
- settle: '8/363/537/1254KG',
|
|
|
|
- outCargo: '3/363/537',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
-}
|
|
|
|
-const headerClassMap = ['bg-yellow', 'bg-green', 'bg-cyan']
|
|
|
|
-export default function useTableData(
|
|
|
|
- tableType:
|
|
|
|
- | 'departure'
|
|
|
|
- | 'arrival'
|
|
|
|
- | 'internationalDeparture'
|
|
|
|
- | 'internationalArrival',
|
|
|
|
- formData: CommonData,
|
|
|
|
- international: Ref<boolean>
|
|
|
|
-) {
|
|
|
|
- const tableColumns = ref<CommonTableColumn[]>([])
|
|
|
|
- const tableData = ref<CommonData[]>([])
|
|
|
|
- const getTableData = async () => {
|
|
|
|
- try {
|
|
|
|
- const {
|
|
|
|
- startDate,
|
|
|
|
- endDate,
|
|
|
|
- flightStatus,
|
|
|
|
- flightWarning,
|
|
|
|
- waybillType,
|
|
|
|
- } = formData
|
|
|
|
- const dataContent = [startDate, endDate, flightStatus, flightWarning]
|
|
|
|
- if (international.value) {
|
|
|
|
- dataContent.push(waybillType)
|
|
|
|
- }
|
|
|
|
- const {
|
|
|
|
- code,
|
|
|
|
- returnData: { columnSet, listValues },
|
|
|
|
- message,
|
|
|
|
- } = await Query({
|
|
|
|
- id: DATACONTENT_ID[`${tableType}Airport`],
|
|
|
|
- dataContent,
|
|
|
|
- })
|
|
|
|
- if (Number(code) !== 0) {
|
|
|
|
- throw new Error(message || '失败')
|
|
|
|
- }
|
|
|
|
- tableColumns.value = columnSet.map(column => ({
|
|
|
|
- key: column.columnName,
|
|
|
|
- dataKey: column.columnName,
|
|
|
|
- title: column.columnLabel,
|
|
|
|
- width: column.columnLabel.length * 50,
|
|
|
|
- flexGrow: 1,
|
|
|
|
- align: 'center',
|
|
|
|
- ...column,
|
|
|
|
- }))
|
|
|
|
- tableData.value = listValues
|
|
|
|
- } catch (error) {
|
|
|
|
- console.error(error)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- let queryLoop: number | null = null
|
|
|
|
- const startQuery = async () => {
|
|
|
|
- await getTableData()
|
|
|
|
- queryLoop = window.setTimeout(
|
|
|
|
- startQuery,
|
|
|
|
- LOOP_INTERVAL[`${tableType}Airport`]
|
|
|
|
- )
|
|
|
|
- }
|
|
|
|
- const stopQuery = () => {
|
|
|
|
- if (queryLoop) {
|
|
|
|
- clearTimeout(queryLoop)
|
|
|
|
- queryLoop = null
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- // watch(formData, data => {
|
|
|
|
- // stopQuery()
|
|
|
|
- // if (data.startDate && data.endDate) {
|
|
|
|
- // startQuery()
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
- // onUnmounted(stopQuery)
|
|
|
|
-
|
|
|
|
- const computedWidth = (text: string) => {
|
|
|
|
- let width = 0
|
|
|
|
- text.split('\n').forEach(line => {
|
|
|
|
- const len = line.length
|
|
|
|
- let realLength = 0
|
|
|
|
- for (let i = 0; i < len; i++) {
|
|
|
|
- realLength += line.charCodeAt(i) > 255 ? 2 : 1
|
|
|
|
- }
|
|
|
|
- if (width < (realLength + 2) * 10) {
|
|
|
|
- width = (realLength + 2) * 10
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- if (['航班号', '目的站'].includes(text)) {
|
|
|
|
- width += 10
|
|
|
|
- }
|
|
|
|
- return width
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- onMounted(() => {
|
|
|
|
- const groups = ['departure', 'internationalDeparture'].includes(tableType)
|
|
|
|
- ? departureColumnGroups
|
|
|
|
- : arrivalColumnGroups
|
|
|
|
- tableColumns.value = groups.reduce(
|
|
|
|
- (columns: CommonTableColumn[], group, groupIndex) => {
|
|
|
|
- group.children.forEach(({ columnName, columnLabel }) => {
|
|
|
|
- columns.push({
|
|
|
|
- key: columnName,
|
|
|
|
- dataKey: columnName,
|
|
|
|
- title: columnLabel,
|
|
|
|
- columnName,
|
|
|
|
- columnLabel,
|
|
|
|
- columnDescribe: '',
|
|
|
|
- dataType: '',
|
|
|
|
- listqueryTemplateID: null,
|
|
|
|
- needCount: null,
|
|
|
|
- needFilters: ['航班号', '目的站'].includes(columnLabel) ? 1 : 0,
|
|
|
|
- needGroup: null,
|
|
|
|
- needSearch: null,
|
|
|
|
- needShow: 1,
|
|
|
|
- needSort: null,
|
|
|
|
- orderNumber: null,
|
|
|
|
- queryTemplateColumnSetID: null,
|
|
|
|
- queryTemplateID: null,
|
|
|
|
- width: computedWidth(columnLabel),
|
|
|
|
- flexGrow: 1,
|
|
|
|
- align: 'center',
|
|
|
|
- headerClass: headerClassMap[groupIndex],
|
|
|
|
- groupName: group.groupName,
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- return columns
|
|
|
|
- },
|
|
|
|
- []
|
|
|
|
- )
|
|
|
|
- tableData.value = testTableDatas[tableType]
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- return {
|
|
|
|
- tableColumns,
|
|
|
|
- tableData,
|
|
|
|
- }
|
|
|
|
-}
|
|
|