航班详细信息卡片修改
This commit is contained in:
@@ -1,34 +1,38 @@
|
||||
<div class="button-group text-center p-2">
|
||||
<button *ngIf="lines.preFlight" [disabled]="btnClickDisabled" class="mr-4" nz-button nzType="primary" (click)="showPreFlight()">到达:{{lines.preFlight.FLNO}}</button>
|
||||
<button *ngIf="lines.reaFlight" [disabled]="btnClickDisabled" nz-button nzType="primary" (click)="showReaFlight()">出发:{{lines.reaFlight.FLNO}}</button>
|
||||
</div>
|
||||
<div class="tab-container">
|
||||
<div class="hr-line">描述类 -----------------------------------------</div>
|
||||
<div class="message-container">
|
||||
<p class="mt-2"><label>航班号:</label>{{flight.renderFlight.FLNO}}</p>
|
||||
<p><label>航空公司:</label>{{flight.renderFlight.ALCD}}</p>
|
||||
<p><label>航线类别:</label>{{flight.renderFlight.FLIN}}</p>
|
||||
<p><label>航班类别:</label>{{flight.renderFlight.FLTY}}</p>
|
||||
<!-- <p><label>航班任务:</label>{{flight.}}</p> -->
|
||||
<p><label>航线:</label>{{flight.renderFlight.ERUT}}</p>
|
||||
<p><label>航班机型:</label>{{flight.renderFlight.ACFT}}</p>
|
||||
<p><label>到达/出发:</label>{{flight.renderFlight.MVIN}}</p>
|
||||
<p><label>飞机号:</label>{{flight.renderFlight.RENO}}</p>
|
||||
<p><label>当前状态:</label>{{flight.renderFlight.FTSS}}</p>
|
||||
<p class="mt-2"><label>航班号:</label>{{singleFlight.FLNO}}</p>
|
||||
<p><label>航空公司:</label>{{singleFlight.ALCD}}</p>
|
||||
<p><label>航线类别:</label>{{singleFlight.FLIN}}</p>
|
||||
<p><label>航班类别:</label>{{singleFlight.FLTY}}</p>
|
||||
<!-- <p><label>航班任务:</label>{{lines.}}</p> -->
|
||||
<p><label>航线:</label>{{singleFlight.ERUT}}</p>
|
||||
<p><label>航班机型:</label>{{singleFlight.ACFT}}</p>
|
||||
<p><label>到达/出发:</label>{{singleFlight.MVIN}}</p>
|
||||
<p><label>飞机号:</label>{{singleFlight.RENO}}</p>
|
||||
<p><label>当前状态:</label>{{singleFlight.FTSS}}</p>
|
||||
</div>
|
||||
<div class="hr-line">资源类 -----------------------------------------</div>
|
||||
<div class="message-container">
|
||||
<p class="mt-2"><label>停机位:</label>{{flight.renderFlight.STND}}</p>
|
||||
<p><label>登机门:</label>{{flight.renderFlight.GATE}}</p>
|
||||
<p><label>值机柜台:</label>{{flight.renderFlight.CHKC}}</p>
|
||||
<p><label>行李传送带:</label>{{flight.renderFlight.CHUT}}</p>
|
||||
<p class="mt-2"><label>停机位:</label>{{showPsst}}</p>
|
||||
<p><label>登机门:</label>{{singleFlight.GATE}}</p>
|
||||
<p><label>值机柜台:</label>{{singleFlight.CHKC}}</p>
|
||||
<p><label>行李传送带:</label>{{singleFlight.CHUT}}</p>
|
||||
</div>
|
||||
<div class="hr-line">时间类 -----------------------------------------</div>
|
||||
<div class="message-container">
|
||||
<p class="mt-2"><label>计划到达/出发:</label>{{flight.renderFlight.SODT}}</p>
|
||||
<p><label>预计到达/出发:</label>{{flight.renderFlight.ESTT}}</p>
|
||||
<p><label>实际到达/出发:</label>{{flight.renderFlight.ACTT}}</p>
|
||||
<p><label>上轮档:</label>{{flight.renderFlight.CHTM_ON}}</p>
|
||||
<p><label>下轮档:</label>{{flight.renderFlight.CHTM_OFF}}</p>
|
||||
<p><label>值机开始:</label>{{flight.renderFlight.COTM}}</p>
|
||||
<p><label>值机结束:</label>{{flight.renderFlight.CCTM}}</p>
|
||||
<p><label>开始登机:</label>{{flight.renderFlight.BOTM}}</p>
|
||||
<p><label>登机结束:</label>{{flight.renderFlight.GCTM}}</p>
|
||||
<p class="mt-2"><label>计划到达/出发:</label>{{singleFlight.SODT}}</p>
|
||||
<p><label>预计到达/出发:</label>{{singleFlight.ESTT}}</p>
|
||||
<p><label>实际到达/出发:</label>{{singleFlight.ACTT}}</p>
|
||||
<p><label>上轮档:</label>{{singleFlight.CHTM_ON}}</p>
|
||||
<p><label>下轮档:</label>{{singleFlight.CHTM_OFF}}</p>
|
||||
<p><label>值机开始:</label>{{singleFlight.COTM}}</p>
|
||||
<p><label>值机结束:</label>{{singleFlight.CCTM}}</p>
|
||||
<p><label>开始登机:</label>{{singleFlight.BOTM}}</p>
|
||||
<p><label>登机结束:</label>{{singleFlight.GCTM}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,10 +6,128 @@ import { Component, OnInit, Input } from '@angular/core';
|
||||
styleUrls: ['./detail-tab.component.scss']
|
||||
})
|
||||
export class DetailTabComponent implements OnInit {
|
||||
@Input() flight;
|
||||
public lines: any;
|
||||
public singleFlight: any;
|
||||
public btnClickDisabled: boolean = true;
|
||||
|
||||
public showPsst: string;
|
||||
|
||||
@Input() set flight(flight) {
|
||||
this.lines = Object.assign({}, flight);
|
||||
|
||||
if (this.lines.preFlight && !this.lines.reaFlight) {
|
||||
this.singleFlight = this.lines.renderFlight;
|
||||
let psst = this.psstFormatter(this.lines.preFlight);
|
||||
if (psst) {
|
||||
this.showPsst = this.singleFlight.STND + '(' + psst + ')';
|
||||
} else {
|
||||
this.showPsst = this.singleFlight.STND
|
||||
}
|
||||
this.btnClickDisabled = true;
|
||||
} else if (!this.lines.preFlight && this.lines.reaFlight) {
|
||||
this.singleFlight = this.lines.renderFlight;
|
||||
let psst = this.psstFormatter(this.lines.reaFlight);
|
||||
if (psst) {
|
||||
this.showPsst = this.singleFlight.STND + '(' + psst + ')';
|
||||
} else {
|
||||
this.showPsst = this.singleFlight.STND
|
||||
}
|
||||
this.btnClickDisabled = true;
|
||||
} else {
|
||||
this.singleFlight = this.lines.renderPreFlight;
|
||||
let psst = this.psstFormatter(this.lines.preFlight);
|
||||
if (psst) {
|
||||
this.showPsst = this.singleFlight.STND + '(' + psst + ')';
|
||||
} else {
|
||||
this.showPsst = this.singleFlight.STND
|
||||
}
|
||||
this.btnClickDisabled = false;
|
||||
};
|
||||
};
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
showPreFlight() {
|
||||
if (this.lines.preFlight && !this.lines.reaFlight) {
|
||||
this.singleFlight = this.lines.renderFlight;
|
||||
let psst = this.psstFormatter(this.lines.preFlight);
|
||||
if (psst) {
|
||||
this.showPsst = this.singleFlight.STND + '(' + psst + ')';
|
||||
} else {
|
||||
this.showPsst = this.singleFlight.STND
|
||||
}
|
||||
this.btnClickDisabled = true;
|
||||
} else if (!this.lines.preFlight && this.lines.reaFlight) {
|
||||
this.singleFlight = this.lines.renderFlight;
|
||||
let psst = this.psstFormatter(this.lines.reaFlight);
|
||||
if (psst) {
|
||||
this.showPsst = this.singleFlight.STND + '(' + psst + ')';
|
||||
} else {
|
||||
this.showPsst = this.singleFlight.STND
|
||||
}
|
||||
this.btnClickDisabled = true;
|
||||
} else {
|
||||
this.singleFlight = this.lines.renderPreFlight;
|
||||
let psst = this.psstFormatter(this.lines.preFlight);
|
||||
if (psst) {
|
||||
this.showPsst = this.singleFlight.STND + '(' + psst + ')';
|
||||
} else {
|
||||
this.showPsst = this.singleFlight.STND
|
||||
}
|
||||
this.btnClickDisabled = false;
|
||||
};
|
||||
}
|
||||
showReaFlight() {
|
||||
if (this.lines.preFlight && !this.lines.reaFlight) {
|
||||
this.singleFlight = this.lines.renderFlight;
|
||||
let psst = this.psstFormatter(this.lines.preFlight);
|
||||
if (psst) {
|
||||
this.showPsst = this.singleFlight.STND + '(' + psst + ')';
|
||||
} else {
|
||||
this.showPsst = this.singleFlight.STND
|
||||
}
|
||||
this.btnClickDisabled = true;
|
||||
} else if (!this.lines.preFlight && this.lines.reaFlight) {
|
||||
this.singleFlight = this.lines.renderFlight;
|
||||
let psst = this.psstFormatter(this.lines.reaFlight);
|
||||
if (psst) {
|
||||
this.showPsst = this.singleFlight.STND + '(' + psst + ')';
|
||||
} else {
|
||||
this.showPsst = this.singleFlight.STND
|
||||
}
|
||||
this.btnClickDisabled = true;
|
||||
} else {
|
||||
this.singleFlight = this.lines.renderPreFlight;
|
||||
let psst = this.psstFormatter(this.lines.preFlight);
|
||||
if (psst) {
|
||||
this.showPsst = this.singleFlight.STND + '(' + psst + ')';
|
||||
} else {
|
||||
this.showPsst = this.singleFlight.STND
|
||||
}
|
||||
this.btnClickDisabled = false;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
psstFormatter(flight) {
|
||||
if (flight['PSDT']) {
|
||||
if (Array.isArray(flight['PSDT']) && flight['PSDT'].length > 0) {
|
||||
let psst = [];
|
||||
for (let i = 0; i < flight['PSDT'].length; i++) {
|
||||
psst.push(flight['PSDT'][i]['PSST']);
|
||||
}
|
||||
let set = new Set(psst);
|
||||
return Array.from(set).join(',')
|
||||
} else if (Object.prototype.toString.call(flight['PSDT']) === '[object Object]') {
|
||||
return flight['PSDT']['PSST'];
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ export class MainComponent implements OnInit {
|
||||
let data = JSON.parse(event as string);
|
||||
if (data.topic === 'schd') {
|
||||
let message = JSON.parse(data.message);
|
||||
console.log(message);
|
||||
// console.log(message);
|
||||
//是否可以开始处理动态消息
|
||||
if (this.canHandleDynamicMessage) {
|
||||
this.dynamicMessageHandle(message);
|
||||
@@ -150,7 +150,7 @@ export class MainComponent implements OnInit {
|
||||
}
|
||||
} else if (data.topic === 'msg') {
|
||||
let message = JSON.parse(data.message);
|
||||
console.log(message);
|
||||
// console.log(message);
|
||||
if (this.canHandleDynamicAlert) {
|
||||
this.dynamicAlertHandle(message);
|
||||
} else {
|
||||
@@ -449,7 +449,7 @@ export class MainComponent implements OnInit {
|
||||
/**
|
||||
* 创建线程并执行
|
||||
*/
|
||||
public promise: Worker = new Worker('/assets/web-worker-handle.js');
|
||||
public promise: Worker = new Worker('/adminweb/assets/web-worker-handle.js');
|
||||
creatWorkers() {
|
||||
let dynamicData = {
|
||||
raw_data: this.raw_data,
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
<fieldset>
|
||||
<legend>资源使用安排</legend>
|
||||
<div>
|
||||
<p><label>登机门:</label>{{lines['renderFlight'].GATE}}</p>
|
||||
<p><label>停机位:</label>{{lines['renderFlight'].STND}}</p>
|
||||
<p><label>登机门:</label>{{lines['renderFlight'].GTDT}}</p>
|
||||
<p><label>停机位:</label>{{lines['renderFlight'].PSST}}</p>
|
||||
<p><label>值机柜台:</label>{{lines['renderFlight'].CHKC}}</p>
|
||||
<p><label>行李转盘:</label>{{lines['renderFlight'].BELT}}</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user