收到日航班计划获取数据刷新界面
This commit is contained in:
@@ -522,6 +522,7 @@ export class MainComponent implements OnInit {
|
||||
'FLOP-ABTM': this.alertMessageHandle.flopAbtm.bind(this.alertMessageHandle),
|
||||
'FLOP-CHOT': this.alertMessageHandle.flopChot.bind(this.alertMessageHandle),
|
||||
'FLOP-TRML': this.alertMessageHandle.flopTrml.bind(this.alertMessageHandle),
|
||||
'SCHD-DNLD': this.alertMessageHandle.schdDnld.bind(this.alertMessageHandle)
|
||||
}
|
||||
dynamicAlertHandle(message) {
|
||||
let alertType = message.META.TYPE + '-' + message.META.STYP;
|
||||
@@ -531,8 +532,25 @@ export class MainComponent implements OnInit {
|
||||
let index = this.raw_data.findIndex(element => element['FLID'] === message.FLOP.FLID);
|
||||
if (index > -1) {
|
||||
this.raw_data.splice(index, 1);
|
||||
this.creatWorkers()
|
||||
this.creatWorkers();
|
||||
}
|
||||
} else if (alertType === 'SCHD-DNLD') {
|
||||
this.canHandleDynamicMessage = false;
|
||||
this.canHandleDynamicAlert = false;
|
||||
this.httpCilent.get('/msgexchangeapi/all/flights').subscribe(
|
||||
data => {
|
||||
this.raw_data = data.body;
|
||||
this.creatWorkers();
|
||||
|
||||
this.canHandleDynamicMessage = true;
|
||||
this.dynamicMessageArray.forEach(message => {
|
||||
this.dynamicMessageHandle(message);
|
||||
})
|
||||
this.canHandleDynamicAlert = true;
|
||||
this.dynamicAlertArray.forEach(message => {
|
||||
this.dynamicAlertHandle(message);
|
||||
})
|
||||
})
|
||||
}
|
||||
let alertText = this.alertMessage[alertType](message, this.airports);
|
||||
const toastCfg = new ToastConfig(ToastType.SUCCESS, '', alertText, 600000);
|
||||
|
||||
+2
-1
@@ -48,7 +48,8 @@ export class MsgAlertWarningComponent implements OnInit {
|
||||
{"COL_CODE":"FLOP-RENO", "COL_CN":"飞机号变更"},
|
||||
{"COL_CODE":"FLOP-ABTM", "COL_CN":"登桥撤桥"},
|
||||
{"COL_CODE":"FLOP-CHOT", "COL_CN":"上下轮档"},
|
||||
{"COL_CODE":"FLOP-TRML", "COL_CN":"航站楼"},
|
||||
{"COL_CODE":"FLOP-TRML", "COL_CN":"航站楼"},
|
||||
{"COL_CODE":"SCHD-DNLD", "COL_CN":"日航班计划"}
|
||||
]
|
||||
this.queryTable();
|
||||
}
|
||||
|
||||
@@ -156,4 +156,7 @@ export class AlertMessageHandle {
|
||||
public flopTrml(message,airports,citys) {
|
||||
return message.FLOP.FFID + '航站楼:' + message.FLOP.TRML;
|
||||
}
|
||||
public schdDnld(message,airports,citys){
|
||||
return '收到日航班计划';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user