历史数据刷新

This commit is contained in:
zhouyuejun
2018-12-24 18:32:32 +08:00
parent 9815df7b0f
commit bcda5908e7
5 changed files with 96 additions and 24 deletions
+12 -4
View File
@@ -43,6 +43,7 @@ export class MainComponent implements OnInit {
).subscribe(
(event: NavigationEnd) => {
if (event.urlAfterRedirects === '/app/main') {
// this.operateSpinServiceService.showSpin();
this.httpCilent.get('/adminapi/settings/uisettings').subscribe(
data => {
data.body.forEach(element => {
@@ -56,6 +57,7 @@ export class MainComponent implements OnInit {
}
});
this.changeDetectorRef.detectChanges();
// this.operateSpinServiceService.hideSpin();
}
)
}
@@ -123,6 +125,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);
//是否可以开始处理动态消息
if (this.canHandleDynamicMessage) {
this.dynamicMessageHandle(message);
@@ -131,6 +134,7 @@ export class MainComponent implements OnInit {
}
} else if (data.topic === 'msg') {
let message = JSON.parse(data.message);
console.log(message);
if (this.canHandleDynamicAlert) {
this.dynamicAlertHandle(message);
} else {
@@ -828,13 +832,17 @@ export class MainComponent implements OnInit {
if (this.orderHandle.isArriFlight(flight)) {
return false;
} else {
if (flight['reaFlight']['DELY'] && Array.isArray(flight['reaFlight']['DELY']) && flight['reaFlight']['DELY'].length > 0) {
if (parseInt(flight['preFlight']['DELY'][0]['DURA']) - 30 > 0) {
return true;
try {
if (flight['reaFlight']['DELY'] && Array.isArray(flight['reaFlight']['DELY']) && flight['reaFlight']['DELY'].length > 0) {
if (parseInt(flight['preFlight']['DELY'][0]['DURA']) - 30 > 0) {
return true;
} else {
return false;
}
} else {
return false;
}
} else {
} catch (error) {
return false;
}
}