部分调优

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.operateSpinServiceService.showSpin();
this.changeDetectorRef.detach(); this.changeDetectorRef.detach();
this.router.events.pipe( // this.router.events.pipe(
filter((event => event instanceof NavigationEnd)) // filter((event => event instanceof NavigationEnd))
).subscribe( // ).subscribe(
(event: NavigationEnd) => { // (event: NavigationEnd) => {
if (event.urlAfterRedirects === '/app/main') { // if (event.urlAfterRedirects === '/app/main') {
// this.operateSpinServiceService.showSpin(); // // this.operateSpinServiceService.showSpin();
this.httpCilent.get('/adminapi/settings/uisettings').subscribe( // this.httpCilent.get('/adminapi/settings/uisettings').subscribe(
data => { // data => {
data.body.forEach(element => { // data.body.forEach(element => {
if (element.groupCode === 'userSettingCol') { // if (element.groupCode === 'userSettingCol') {
this.col_lists = JSON.parse(element.settingContent).allCols; // this.col_lists = JSON.parse(element.settingContent).allCols;
this.render_col_lists = JSON.parse(element.settingContent).targetList; // this.render_col_lists = JSON.parse(element.settingContent).targetList;
} else if (element.groupCode === 'userSettingColor') { // } else if (element.groupCode === 'userSettingColor') {
this.airline_color = JSON.parse(element.settingContent); // this.airline_color = JSON.parse(element.settingContent);
} else if (element.groupCode === 'userSettingMsgAlert') { // } else if (element.groupCode === 'userSettingMsgAlert') {
this.airline_message_alert = JSON.parse(element.settingContent).targetList; // this.airline_message_alert = JSON.parse(element.settingContent).targetList;
} // }
}); // });
// this.changeDetectorRef.detectChanges(); // this.changeDetectorRef.detectChanges();
// this.operateSpinServiceService.hideSpin(); // // this.operateSpinServiceService.hideSpin();
} // }
) // )
} // }
} // }
) // )
} }
public orderHandle = new DynamicFlightOrder(); public orderHandle = new DynamicFlightOrder();
public dataHandle = new FlightsDataHandle(); 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( this.httpCilent.get('/msgexchangeapi/all/flights').subscribe(
data => { data => {
@@ -106,7 +106,7 @@
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let seasonal of render_data;let i = index" (click)="selectRow(seasonal)" [ngClass]="{'selected':row_state.seasonflightId===seasonal.seasonflightId}"> <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.flightNumber}}</td>
<td>{{seasonal.seasonRecIdChn}}</td> <td>{{seasonal.seasonRecIdChn}}</td>
<td>{{seasonal.internationalCode}}</td> <td>{{seasonal.internationalCode}}</td>
+1 -1
View File
@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>广州智能科技发展有限公司</title> <title>航班信息查询系统</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="icon" type="image/x-icon" href="favicon.ico">