历史数据添加日期查询插件
This commit is contained in:
@@ -43,7 +43,7 @@ export class LoginComponent implements OnInit {
|
||||
sessionStorage.setItem('userInfo', JSON.stringify(xhr.body));
|
||||
const toastCfg = new ToastConfig(ToastType.SUCCESS, '', '登录成功!', 3000);
|
||||
this.toastService.toast(toastCfg);
|
||||
this.router.navigate(['../app/main'], { relativeTo: this.route })
|
||||
this.router.navigate(['../app/main'], { relativeTo: this.route });
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -76,6 +76,10 @@
|
||||
<option *ngFor="let anget of flightAgents" [value]="anget.oGId">{{anget.flightAgentName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-container mr-4">
|
||||
<label for="">查询日期: </label>
|
||||
<input readonly style="background:transparent;cursor: pointer" type="text" id="selectDate" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="third-condition row">
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ export class MainComponent implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private websocketService: WebsocketService
|
||||
) {
|
||||
console.log(new Date().getTime());
|
||||
this.operateSpinServiceService.showSpin();
|
||||
this.changeDetectorRef.detach();
|
||||
this.router.events.pipe(
|
||||
@@ -112,10 +113,12 @@ export class MainComponent implements OnInit {
|
||||
event => {
|
||||
let data = JSON.parse(event as string);
|
||||
if (data.topic === 'schd') {
|
||||
console.log(new Date().getTime());
|
||||
let message = JSON.parse(data.message);
|
||||
console.log(message);
|
||||
//是否可以开始处理动态消息
|
||||
if (this.canHandleDynamicMessage) {
|
||||
this.dynamicMessageHandle(message)
|
||||
this.dynamicMessageHandle(message);
|
||||
} else {
|
||||
this.dynamicMessageArray.push(message);
|
||||
}
|
||||
@@ -204,6 +207,7 @@ export class MainComponent implements OnInit {
|
||||
tableCont.addEventListener('scroll', scrollHandle)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 动态消息处理方法
|
||||
* @param message
|
||||
@@ -258,6 +262,8 @@ export class MainComponent implements OnInit {
|
||||
return (a['ORDER'] - b['ORDER']);
|
||||
})
|
||||
this.changeDetectorRef.detectChanges();
|
||||
console.log(new Date().getTime());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -289,6 +295,7 @@ export class MainComponent implements OnInit {
|
||||
}
|
||||
dynamicAlertHandle(message) {
|
||||
let alertType = message.META.TYPE + '-' + message.META.STYP;
|
||||
console.log(alertType)
|
||||
let index = this.airline_message_alert.findIndex(val => val['COL_CODE'] === alertType);
|
||||
if (index > -1) {
|
||||
let alertText = this.alertMessage[alertType]();
|
||||
@@ -322,7 +329,8 @@ export class MainComponent implements OnInit {
|
||||
this.render_data = combined_data;
|
||||
this.row_state = this.render_data.length > 0 ? this.render_data[0] : { renderFlight: {} };
|
||||
this.changeDetectorRef.detectChanges();
|
||||
this.operateSpinServiceService.hideSpin()
|
||||
this.operateSpinServiceService.hideSpin();
|
||||
console.log(new Date().getTime());
|
||||
|
||||
//开始处理动态消息
|
||||
this.canHandleDynamicMessage = true;
|
||||
@@ -371,6 +379,7 @@ export class MainComponent implements OnInit {
|
||||
* 输入框回车事件
|
||||
*/
|
||||
inputEnter() {
|
||||
console.log(new Date().getTime());
|
||||
if (this.FLT_POS === 1) {
|
||||
this.selectChange()
|
||||
} else {
|
||||
@@ -557,7 +566,8 @@ export class MainComponent implements OnInit {
|
||||
this.render_data = filterData;
|
||||
this.row_state = this.render_data.length > 0 ? this.render_data[0] : { renderFlight: {} };
|
||||
this.changeDetectorRef.detectChanges();
|
||||
this.operateSpinServiceService.hideSpin()
|
||||
this.operateSpinServiceService.hideSpin();
|
||||
console.log(new Date().getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,45 +4,45 @@ import { Subject, forkJoin, zip } from 'rxjs'
|
||||
|
||||
@Injectable()
|
||||
export class BasicDataService {
|
||||
public flightAgents:Array<any>;
|
||||
public flightAgents:Array<any> = [];
|
||||
public flightAgents_subject = new Subject<any>();
|
||||
public flightTypes:Array<any>;
|
||||
public flightTypes:Array<any> = [];
|
||||
public flightTypes_subject = new Subject<any>();
|
||||
public flightStatus:Array<any>;
|
||||
public flightStatus:Array<any> = [];
|
||||
public flightStatus_subject = new Subject<any>();
|
||||
public checkin_group: Array<any>;
|
||||
public checkin_group: Array<any> = [];
|
||||
public checkin_group_subject = new Subject<any>();
|
||||
public gate: Array<any>;
|
||||
public gate: Array<any> = [];
|
||||
public gate_subject = new Subject<any>();
|
||||
public terminal: Array<any>;
|
||||
public terminal: Array<any> = [];
|
||||
public terminal_subject = new Subject<any>();
|
||||
public chut: Array<any>;
|
||||
public chut: Array<any> = [];
|
||||
public chut_subject = new Subject<any>();
|
||||
public stand: Array<any>;
|
||||
public stand: Array<any> = [];
|
||||
public stand_subject = new Subject<any>();
|
||||
public carousel: Array<any>;
|
||||
public carousel: Array<any> = [];
|
||||
public carousel_subject = new Subject<any>();
|
||||
public checkin_desk: Array<any>;
|
||||
public checkin_desk: Array<any> = [];
|
||||
public checkin_desk_subject = new Subject<any>();
|
||||
public airport: Array<any>;
|
||||
public airport: Array<any> = [];
|
||||
public airport_subject = new Subject<any>();
|
||||
public city: Array<any>;
|
||||
public city: Array<any> = [];
|
||||
public city_subject = new Subject<any>();
|
||||
public aircraft_type: Array<any>;
|
||||
public aircraft_type: Array<any> = [];
|
||||
public aircraft_type_subject = new Subject<any>();
|
||||
public aircraft: Array<any>;
|
||||
public aircraft: Array<any> = [];
|
||||
public aircraft_subject = new Subject<any>();
|
||||
public terminal_area: Array<any>;
|
||||
public terminal_area: Array<any> = [];
|
||||
public terminal_area_subject = new Subject<any>();
|
||||
public airline: Array<any>;
|
||||
public airline: Array<any> = [];
|
||||
public airline_subject = new Subject<any>();
|
||||
public country: Array<any>;
|
||||
public country: Array<any> = [];
|
||||
public country_subject = new Subject<any>();
|
||||
public aircraft_type_group: Array<any>;
|
||||
public aircraft_type_group: Array<any> = [];
|
||||
public aircraft_type_group_subject = new Subject<any>();
|
||||
public airportgroup: Array<any>;
|
||||
public airportgroup: Array<any> = [];
|
||||
public airportgroup_subject = new Subject<any>();
|
||||
public airlinegroup: Array<any>;
|
||||
public airlinegroup: Array<any> = [];
|
||||
public airlinegroup_subject = new Subject<any>();
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -17,6 +17,10 @@ export class WebsocketService {
|
||||
}
|
||||
|
||||
this.websocket = new WebSocket(url);
|
||||
setInterval(() => {
|
||||
let msg = { "topic": "heart-beat", "message": "" };
|
||||
this.websocket.send(JSON.stringify(msg));
|
||||
}, 30000);
|
||||
return new Observable(ob => {
|
||||
this.websocket.onopen = () => {
|
||||
console.log('websocket was connected...')
|
||||
|
||||
Reference in New Issue
Block a user