航班关联信息状态记录展示
This commit is contained in:
@@ -210,7 +210,7 @@
|
||||
<div #tabContainer class="airline-message" [ngClass]="{'tab-c': tabClose,'tab-o': !tabClose}">
|
||||
<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'" [nzShowPagination]="false">
|
||||
<nz-tab nzTitle="关联信息" *ngIf="checkboxGroup.related">
|
||||
<app-related-tab [flight]="row_state"></app-related-tab>
|
||||
<app-related-tab [flight]="row_state" [allAirports]="airports"></app-related-tab>
|
||||
</nz-tab>
|
||||
<nz-tab nzTitle="详细信息" *ngIf="checkboxGroup.detail">
|
||||
<app-detail-tab [flight]="row_state"></app-detail-tab>
|
||||
|
||||
@@ -38,34 +38,50 @@
|
||||
<fieldset>
|
||||
<legend>航班状态记录</legend>
|
||||
<!-- <p>{{lines['renderFlight'].FTSS}}</p> -->
|
||||
<div class="pre" *ngIf="lines['preFlight']&&lines['preFlight']['ABN'].length>0">
|
||||
<div class="pre mb-2" *ngIf="lines['preFlight']&&lines['preFlight']['ABN'].length>0">
|
||||
<p>到达航班:{{lines['preFlight']['FLNO']}}</p>
|
||||
<div class="fl-dely">
|
||||
|
||||
<div class="fl-dely" *ngIf="predelay">
|
||||
<p>延误类别:{{predelay.CODE}}</p>
|
||||
<p>延误信息:{{predelay.VALUE}}</p>
|
||||
<p>原定时间:{{predelay.STRT|date:'yyyy-MM-dd HH:mm'}}</p>
|
||||
<p>延误时间:{{predelay.DURA==predelay.STRT?'待定':predelay.DURA|date:'yyyy-MM-dd HH:mm'}}</p>
|
||||
</div>
|
||||
<div class="fl-cncl">
|
||||
|
||||
<div class="fl-cncl" *ngIf="precancle">
|
||||
<p>取消:(取消时间:{{precancle|date:'yyyy-MM-dd HH:mm'}})</p>
|
||||
</div>
|
||||
<div class="fl-fdiv">
|
||||
|
||||
<div class="fl-fdiv" *ngIf="prefdiv">
|
||||
<p>备降:(备降机场:{{prefdiv.DDES}} 备降原因:{{prefdiv.VALUE}})</p>
|
||||
</div>
|
||||
<div class="fl-fret">
|
||||
|
||||
<div class="fl-fret" *ngIf="prefret">
|
||||
<p *ngIf="prefret.REID==='A'">
|
||||
空返:(空返时间:{{xxx}} 空返原因:{{prefret.VALUE}})
|
||||
</p>
|
||||
<p *ngIf="prefret.REID==='G'">
|
||||
地返:(地返时间:{{xxx}} 地返原因:{{prefret.VALUE}})
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rea" *ngIf="lines['reaFlight']&&lines['reaFlight']['ABN'].length>0">
|
||||
<p>出发航班:{{lines['reaFlight']['FLNO']}}</p>
|
||||
<div class="fl-dely">
|
||||
|
||||
<div class="fl-dely" *ngIf="readelay">
|
||||
<p>延误类别:{{readelay.CODE||''}}</p>
|
||||
<p>延误信息:{{readelay.VALUE}}</p>
|
||||
<p>原定时间:{{readelay.STRT|date:'yyyy-MM-dd HH:mm'}}</p>
|
||||
<p>延误时间:{{readelay.DURA==readelay.STRT?'待定':readelay.DURA|date:'yyyy-MM-dd HH:mm'}}</p>
|
||||
</div>
|
||||
<div class="fl-cncl">
|
||||
|
||||
<div class="fl-cncl" *ngIf="reacancle">
|
||||
<p>取消:(取消时间:{{reacancle|date:'yyyy-MM-dd HH:mm'}})</p>
|
||||
</div>
|
||||
<div class="fl-fdiv">
|
||||
|
||||
<div class="fl-fdiv" *ngIf="reafdiv">
|
||||
<p>备降:(备降机场:{{reafdiv.DDES}} 备降原因:{{reafdiv.VALUE}})</p>
|
||||
</div>
|
||||
<div class="fl-fret">
|
||||
|
||||
<div class="fl-fret" *ngIf="reafret">
|
||||
<p *ngIf="reafret.REID==='A'">
|
||||
空返:(空返时间:{{xxx}} 空返原因:{{reafret.VALUE}})
|
||||
</p>
|
||||
<p *ngIf="reafret.REID==='G'">
|
||||
地返:(地返时间:{{xxx}} 地返原因:{{reafret.VALUE}})
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import timeFormatter from '../../../utils/time-formatter';
|
||||
import dateFormatter from '../../../utils/date-formatter';
|
||||
|
||||
@Component({
|
||||
selector: 'app-related-tab',
|
||||
@@ -9,7 +10,28 @@ import timeFormatter from '../../../utils/time-formatter';
|
||||
export class RelatedTabComponent implements OnInit {
|
||||
public lines;
|
||||
public airports;
|
||||
public predelay;
|
||||
public precancle;
|
||||
public prefdiv;
|
||||
public prefret;
|
||||
|
||||
public readelay;
|
||||
public reacancle;
|
||||
public reafdiv;
|
||||
public reafret;
|
||||
|
||||
@Input() allAirports;
|
||||
@Input() set flight(flight) {
|
||||
this.predelay = '';
|
||||
this.precancle = '';
|
||||
this.prefdiv = '';
|
||||
this.prefret = '';
|
||||
|
||||
this.readelay = '';
|
||||
this.reacancle = '';
|
||||
this.reafdiv = '';
|
||||
this.reafret = '';
|
||||
|
||||
this.lines = Object.assign({}, flight);
|
||||
if (this.lines.preFlight && !this.lines.reaFlight) {
|
||||
this.airports = this.lines.renderFlight.ERUT.split(' - ');
|
||||
@@ -31,6 +53,58 @@ export class RelatedTabComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.lines.preFlight && this.lines.preFlight['ABN'] && this.lines.preFlight['ABN'].length > 0) {
|
||||
let delyIndex = this.lines.preFlight['ABN'].findIndex(ele => ele.TYPE === 'DLY');
|
||||
let cancleIndex = this.lines.preFlight['ABN'].findIndex(ele => ele.TYPE === 'CAN');
|
||||
let fdivIndex = this.lines.preFlight['ABN'].findIndex(ele => ele.TYPE === 'ALT');
|
||||
let fretIndex = this.lines.preFlight['ABN'].findIndex(ele => ele.TYPE === 'RTN');
|
||||
|
||||
if (delyIndex > -1) {
|
||||
this.predelay = this.lines.preFlight['ABN'][delyIndex].BODY;
|
||||
this.predelay['STRT'] = new Date(dateFormatter(this.predelay['STRT'])).getTime();
|
||||
this.predelay['DURA'] = parseInt(this.predelay['DURA'].substr(0, 2)) * 3600000 + parseInt(this.predelay['DURA'].substr(2, 3)) * 60000 + this.predelay['STRT']
|
||||
}
|
||||
if (cancleIndex > -1) {
|
||||
this.precancle = this.lines.preFlight['ABN'][cancleIndex].BODY;
|
||||
this.precancle = new Date(dateFormatter(this.precancle)).getTime();
|
||||
}
|
||||
if (fdivIndex > -1) {
|
||||
this.prefdiv = this.lines.preFlight['ABN'][fdivIndex].BODY;
|
||||
let airportIndex = this.allAirports.findIndex(val => val.airportCodeIata === this.prefdiv.DDES);
|
||||
if (airportIndex > -1) {
|
||||
this.prefdiv.DDES = this.allAirports[airportIndex].briefNameChn
|
||||
}
|
||||
}
|
||||
if (fretIndex > -1) {
|
||||
this.prefret = this.lines.preFlight['ABN'][fretIndex].BODY;
|
||||
}
|
||||
}
|
||||
if (this.lines.reaFlight && this.lines.reaFlight['ABN'] && this.lines.reaFlight['ABN'].length > 0) {
|
||||
let delyIndex = this.lines.reaFlight['ABN'].findIndex(ele => ele.TYPE === 'DLY');
|
||||
let cancleIndex = this.lines.reaFlight['ABN'].findIndex(ele => ele.TYPE === 'CAN');
|
||||
let fdivIndex = this.lines.reaFlight['ABN'].findIndex(ele => ele.TYPE === 'ALT');
|
||||
let fretIndex = this.lines.reaFlight['ABN'].findIndex(ele => ele.TYPE === 'RTN');
|
||||
|
||||
if (delyIndex > -1) {
|
||||
this.readelay = this.lines.reaFlight['ABN'][delyIndex].BODY;
|
||||
this.readelay['STRT'] = new Date(dateFormatter(this.readelay['STRT'])).getTime();
|
||||
this.readelay['DURA'] = parseInt(this.readelay['DURA'].substr(0, 2)) * 3600000 + parseInt(this.readelay['DURA'].substr(2, 3)) * 60000 + this.readelay['STRT'];
|
||||
}
|
||||
if (cancleIndex > -1) {
|
||||
this.reacancle = this.lines.reaFlight['ABN'][cancleIndex].BODY;
|
||||
this.reacancle = new Date(dateFormatter(this.reacancle)).getTime();
|
||||
}
|
||||
if (fdivIndex > -1) {
|
||||
this.reafdiv = this.lines.reaFlight['ABN'][fdivIndex].BODY;
|
||||
let airportIndex = this.allAirports.findIndex(val => val.airportCodeIata === this.reafdiv.DDES);
|
||||
if (airportIndex > -1) {
|
||||
this.reafdiv.DDES = this.allAirports[airportIndex].briefNameChn
|
||||
}
|
||||
}
|
||||
if (fretIndex > -1) {
|
||||
this.reafret = this.lines.reaFlight['ABN'][fretIndex].BODY;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
constructor() { }
|
||||
|
||||
Reference in New Issue
Block a user