部分调优

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
+39 -24
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.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.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 => {
@@ -106,7 +106,7 @@
</thead>
<tbody>
<tr *ngFor="let seasonal of render_data;let i = index" (click)="selectRow(seasonal)" [ngClass]="{'selected':row_state.seasonflightId===seasonal.seasonflightId}">
<td>{{i+1}}{{seasonal.seasonflightId}}</td>
<td>{{i+1}}</td>
<td>{{seasonal.flightNumber}}</td>
<td>{{seasonal.seasonRecIdChn}}</td>
<td>{{seasonal.internationalCode}}</td>
+1 -1
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>广州智能科技发展有限公司</title>
<title>航班信息查询系统</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" type="image/x-icon" href="favicon.ico">