部分调优

This commit is contained in:
zhouyuejun
2018-12-26 10:11:24 +08:00
parent 93a00a2f2e
commit 73e3ad77ca
3 changed files with 42 additions and 27 deletions
+40 -25
View File
@@ -38,31 +38,31 @@ export class MainComponent implements OnInit {
) {
this.operateSpinServiceService.showSpin();
this.changeDetectorRef.detach();
this.router.events.pipe(
filter((event => event instanceof NavigationEnd))
).subscribe(
(event: NavigationEnd) => {
if (event.urlAfterRedirects === '/app/main') {
// this.operateSpinServiceService.showSpin();
this.httpCilent.get('/adminapi/settings/uisettings').subscribe(
data => {
data.body.forEach(element => {
if (element.groupCode === 'userSettingCol') {
this.col_lists = JSON.parse(element.settingContent).allCols;
this.render_col_lists = JSON.parse(element.settingContent).targetList;
} else if (element.groupCode === 'userSettingColor') {
this.airline_color = JSON.parse(element.settingContent);
} else if (element.groupCode === 'userSettingMsgAlert') {
this.airline_message_alert = JSON.parse(element.settingContent).targetList;
}
});
// this.changeDetectorRef.detectChanges();
// this.operateSpinServiceService.hideSpin();
}
)
}
}
)
// this.router.events.pipe(
// filter((event => event instanceof NavigationEnd))
// ).subscribe(
// (event: NavigationEnd) => {
// if (event.urlAfterRedirects === '/app/main') {
// // this.operateSpinServiceService.showSpin();
// this.httpCilent.get('/adminapi/settings/uisettings').subscribe(
// data => {
// data.body.forEach(element => {
// if (element.groupCode === 'userSettingCol') {
// this.col_lists = JSON.parse(element.settingContent).allCols;
// this.render_col_lists = JSON.parse(element.settingContent).targetList;
// } else if (element.groupCode === 'userSettingColor') {
// this.airline_color = JSON.parse(element.settingContent);
// } else if (element.groupCode === 'userSettingMsgAlert') {
// this.airline_message_alert = JSON.parse(element.settingContent).targetList;
// }
// });
// this.changeDetectorRef.detectChanges();
// // this.operateSpinServiceService.hideSpin();
// }
// )
// }
// }
// )
}
public orderHandle = new DynamicFlightOrder();
public dataHandle = new FlightsDataHandle();
@@ -144,6 +144,21 @@ export class MainComponent implements OnInit {
}
)
this.httpCilent.get('/adminapi/settings/uisettings').subscribe(
data => {
data.body.forEach(element => {
if (element.groupCode === 'userSettingCol') {
this.col_lists = JSON.parse(element.settingContent).allCols;
this.render_col_lists = JSON.parse(element.settingContent).targetList;
} else if (element.groupCode === 'userSettingColor') {
this.airline_color = JSON.parse(element.settingContent);
} else if (element.groupCode === 'userSettingMsgAlert') {
this.airline_message_alert = JSON.parse(element.settingContent).targetList;
}
});
}
)
//获取航班动态信息
this.httpCilent.get('/msgexchangeapi/all/flights').subscribe(
data => {