历史数据添加日期查询插件
This commit is contained in:
@@ -12,6 +12,7 @@ import { DynamicFlightOrder } from '../../utils/dynamic-flight-order';
|
||||
import { FlightsDataHandle } from '../../utils/flights-data-handle';
|
||||
|
||||
import * as $ from 'jquery';
|
||||
declare var laydate: any;
|
||||
|
||||
@Component({
|
||||
selector: 'app-historical-data',
|
||||
@@ -65,6 +66,33 @@ export class HistoricalDataComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
laydate.render({
|
||||
elem: '#selectDate',
|
||||
showBottom: false,
|
||||
value: new Date(new Date().getTime()),
|
||||
format: 'yyyy-MM-dd',
|
||||
done: (value) => {
|
||||
this.operateSpinServiceService.showSpin();
|
||||
this.httpCilent.post('/adminapi/hitFlightData/list', { hstFLightTime: value }).subscribe(
|
||||
data => {
|
||||
this.raw_data = data.body;
|
||||
//查找链接航班并将其组合成一条数据
|
||||
let combined_linked_data = this.dataHandle.findLinkFlights(this.raw_data);
|
||||
combined_linked_data.forEach(element => {
|
||||
let flights_item = this.dataHandle.flightsRenderTransfer(element, this.col_lists);
|
||||
this.combined_data.push(flights_item);
|
||||
});
|
||||
|
||||
let combined_data = []
|
||||
this.combined_data.forEach(item => {
|
||||
combined_data.push(this.dataHandle.basicDataTransHandle(item, this.airports, this.citys, this.airlines, this.flightStatus, this.flightTypes));
|
||||
})
|
||||
this.combined_data = combined_data;
|
||||
this.doSequence(this.combined_data);
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/* 获取用户设置 */
|
||||
this.httpCilent.get('/adminapi/settings/uisettings').subscribe(
|
||||
@@ -78,7 +106,7 @@ export class HistoricalDataComponent implements OnInit {
|
||||
}
|
||||
)
|
||||
//获取航班动态信息
|
||||
this.httpCilent.post('/adminapi/hitFlightData/list', { hstFLightTime: "2018-11-22" }).subscribe(
|
||||
this.httpCilent.post('/adminapi/hitFlightData/list').subscribe(
|
||||
data => {
|
||||
this.raw_data = data.body;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user