路由复用优化
This commit is contained in:
@@ -36,6 +36,7 @@ export class HistoricalDataComponent implements OnInit {
|
||||
public tabClose: boolean = true;
|
||||
|
||||
//各项基础数据
|
||||
public flightAgents: Array<any>;
|
||||
public flightTypes: Array<any>;
|
||||
public terminals: Array<any>;
|
||||
public flightStatus: Array<any>;
|
||||
@@ -77,7 +78,7 @@ export class HistoricalDataComponent implements OnInit {
|
||||
}
|
||||
)
|
||||
//获取航班动态信息
|
||||
this.httpCilent.post('/adminapi/hitFlightData/list', { searchDate: new Date().getTime() }).subscribe(
|
||||
this.httpCilent.post('/adminapi/hitFlightData/list', { hstFLightTime: "2018-11-22" }).subscribe(
|
||||
data => {
|
||||
this.raw_data = data.body;
|
||||
|
||||
@@ -89,6 +90,7 @@ export class HistoricalDataComponent implements OnInit {
|
||||
});
|
||||
|
||||
//从基础数据服务中拿出部分基础数据
|
||||
this.flightAgents = this.basicDataService.flightAgents;
|
||||
this.flightTypes = this.basicDataService.flightTypes;
|
||||
this.terminals = this.basicDataService.terminal;
|
||||
this.flightStatus = this.basicDataService.flightStatus;
|
||||
@@ -104,6 +106,9 @@ export class HistoricalDataComponent implements OnInit {
|
||||
this.combined_data = combined_data;
|
||||
this.doSequence(this.combined_data);
|
||||
} else {
|
||||
this.basicDataService.flightAgents_subject.subscribe(
|
||||
val => this.flightAgents = val
|
||||
)
|
||||
this.basicDataService.flightTypes_subject.subscribe(
|
||||
val => this.flightTypes = val
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user