消息提示处理依照OMMS修改
This commit is contained in:
@@ -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