消息提示处理依照OMMS修改
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
</div>
|
||||
<div class="hr-line">标志类 -----------------------------------------</div>
|
||||
<div class="message-container">
|
||||
<p><label>VIP航班标志:</label>{{vipNumber>0?'是':'否'}}</p>
|
||||
<p><label>VIP航班标志:</label>{{isVip>0?'是':'否'}}</p>
|
||||
</div>
|
||||
<div class="hr-line">数量类 -----------------------------------------</div>
|
||||
<div class="message-container">
|
||||
|
||||
@@ -12,7 +12,8 @@ export class DetailTabComponent implements OnInit {
|
||||
|
||||
public showPsst: string;
|
||||
public showRemc:string;
|
||||
public vipNumber:boolean;
|
||||
public vipNumber:any;
|
||||
public isVip:any
|
||||
|
||||
@Input() set flight(flight) {
|
||||
this.lines = Object.assign({}, flight);
|
||||
@@ -20,6 +21,7 @@ export class DetailTabComponent implements OnInit {
|
||||
this.singleFlight = this.lines.renderFlight;
|
||||
this.showRemc = this.lines.preFlight.REMC;
|
||||
this.vipNumber = this.lines.preFlight.VIPP;
|
||||
this.isVip = this.lines.preFlight.VIPR;
|
||||
let psst = this.psstFormatter(this.lines.preFlight);
|
||||
if (psst) {
|
||||
this.showPsst = (this.singleFlight.STND || '') + '(' + psst + ')';
|
||||
@@ -31,6 +33,7 @@ export class DetailTabComponent implements OnInit {
|
||||
this.singleFlight = this.lines.renderFlight;
|
||||
this.showRemc = this.lines.reaFlight.REMC;
|
||||
this.vipNumber = this.lines.reaFlight.VIPP;
|
||||
this.isVip = this.lines.reaFlight.VIPR;
|
||||
let psst = this.psstFormatter(this.lines.reaFlight);
|
||||
if (psst) {
|
||||
this.showPsst = (this.singleFlight.STND || '') + '(' + psst + ')';
|
||||
@@ -42,6 +45,7 @@ export class DetailTabComponent implements OnInit {
|
||||
this.singleFlight = this.lines.renderPreFlight;
|
||||
this.showRemc = this.lines.preFlight.REMC;
|
||||
this.vipNumber = this.lines.preFlight.VIPP;
|
||||
this.isVip = this.lines.preFlight.VIPR;
|
||||
let psst = this.psstFormatter(this.lines.preFlight);
|
||||
if (psst) {
|
||||
this.showPsst = (this.singleFlight.STND || '') + '(' + psst + ')';
|
||||
@@ -61,6 +65,7 @@ export class DetailTabComponent implements OnInit {
|
||||
this.singleFlight = this.lines.renderFlight;
|
||||
this.showRemc = this.lines.preFlight.REMC;
|
||||
this.vipNumber = this.lines.preFlight.VIPP;
|
||||
this.isVip = this.lines.preFlight.VIPR;
|
||||
let psst = this.psstFormatter(this.lines.preFlight);
|
||||
if (psst) {
|
||||
this.showPsst = (this.singleFlight.STND || '') + '(' + psst + ')';
|
||||
@@ -72,6 +77,7 @@ export class DetailTabComponent implements OnInit {
|
||||
this.singleFlight = this.lines.renderPreFlight;
|
||||
this.showRemc = this.lines.preFlight.REMC;
|
||||
this.vipNumber = this.lines.preFlight.VIPP;
|
||||
this.isVip = this.lines.preFlight.VIPR;
|
||||
let psst = this.psstFormatter(this.lines.preFlight);
|
||||
if (psst) {
|
||||
this.showPsst = (this.singleFlight.STND || '') + '(' + psst + ')';
|
||||
@@ -86,6 +92,7 @@ export class DetailTabComponent implements OnInit {
|
||||
this.singleFlight = this.lines.renderFlight;
|
||||
this.showRemc = this.lines.reaFlight.REMC;
|
||||
this.vipNumber = this.lines.reaFlight.VIPP;
|
||||
this.isVip = this.lines.reaFlight.VIPR;
|
||||
let psst = this.psstFormatter(this.lines.reaFlight);
|
||||
if (psst) {
|
||||
this.showPsst = (this.singleFlight.STND || '') + '(' + psst + ')';
|
||||
@@ -97,6 +104,7 @@ export class DetailTabComponent implements OnInit {
|
||||
this.singleFlight = this.lines.renderReaFlight;
|
||||
this.showRemc = this.lines.reaFlight.REMC;
|
||||
this.vipNumber = this.lines.reaFlight.VIPP;
|
||||
this.isVip = this.lines.reaFlight.VIPR;
|
||||
let psst = this.psstFormatter(this.lines.reaFlight);
|
||||
if (psst) {
|
||||
this.showPsst = (this.singleFlight.STND || '') + '(' + psst + ')';
|
||||
|
||||
@@ -78,6 +78,7 @@ export class MainComponent implements OnInit {
|
||||
public dynamicAlertArray: Array<any> = [];
|
||||
|
||||
//各项基础数据
|
||||
public flightStatusDefinitions: Array<any>;
|
||||
public flightAgents: Array<any>;
|
||||
public flightTypes: Array<any>;
|
||||
public terminals: Array<any>;
|
||||
@@ -141,7 +142,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 +151,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 {
|
||||
@@ -191,6 +192,7 @@ export class MainComponent implements OnInit {
|
||||
});
|
||||
|
||||
//从基础数据服务中拿出部分基础数据
|
||||
this.flightStatusDefinitions = this.basicDataService.flightStatusDefinitions;
|
||||
this.flightAgents = this.basicDataService.flightAgents;
|
||||
this.flightTypes = this.basicDataService.flightTypes;
|
||||
this.terminals = this.basicDataService.terminal;
|
||||
@@ -207,6 +209,9 @@ export class MainComponent implements OnInit {
|
||||
this.combined_data = combined_data;
|
||||
this.doSequence(this.combined_data);
|
||||
} else {
|
||||
this.basicDataService.flightStatusDefinitions_subject.subscribe(
|
||||
val => this.flightStatusDefinitions = val
|
||||
)
|
||||
this.basicDataService.flightAgents_subject.subscribe(
|
||||
val => this.flightAgents = val
|
||||
)
|
||||
@@ -518,7 +523,7 @@ export class MainComponent implements OnInit {
|
||||
})
|
||||
})
|
||||
}
|
||||
let alertText = this.alertMessage[alertType](message, this.airports);
|
||||
let alertText = this.alertMessage[alertType](message, this.airports, this.flightStatusDefinitions, this.flightAgents);
|
||||
const toastCfg = new ToastConfig(ToastType.SUCCESS, '', alertText, 600000);
|
||||
this.toastService.toast(toastCfg);
|
||||
}
|
||||
@@ -926,19 +931,19 @@ export class MainComponent implements OnInit {
|
||||
|
||||
getVipNotes(flight) {
|
||||
if (this.orderHandle.isArriFlight(flight)) {
|
||||
if (flight['preFlight']['VIPP'] && flight['preFlight']['VIPP'] > 0) {
|
||||
if (flight['preFlight']['VIPP'] && flight['preFlight']['VIPP'] > 0 && flight['preFlight']['VIPR'] && flight['preFlight']['VIPR'] > 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else if (this.orderHandle.isDeptFlight(flight)) {
|
||||
if (flight['reaFlight']['VIPP'] && flight['reaFlight']['VIPP'] > 0) {
|
||||
if (flight['reaFlight']['VIPP'] && flight['reaFlight']['VIPP'] > 0 && flight['reaFlight']['VIPR'] && flight['reaFlight']['VIPR'] > 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if ((flight['preFlight']['VIPP'] && flight['preFlight']['VIPP'] > 0) || (flight['reaFlight']['VIPP'] && flight['reaFlight']['VIPP'] > 0)) {
|
||||
if ((flight['preFlight']['VIPP'] && flight['preFlight']['VIPP'] > 0 && flight['reaFlight']['VIPR'] && flight['reaFlight']['VIPR'] > 0) || (flight['reaFlight']['VIPP'] && flight['reaFlight']['VIPP'] > 0 && flight['reaFlight']['VIPR'] && flight['reaFlight']['VIPR'] > 0)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user