历史数据刷新
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { Component, OnInit,ViewChild,Renderer2 } from '@angular/core';
|
import { Component, OnInit, ViewChild, Renderer2 } from '@angular/core';
|
||||||
import { ChangeDetectorRef } from '@angular/core';
|
import { ChangeDetectorRef } from '@angular/core';
|
||||||
|
|
||||||
import { ToastService } from '../../components/toast/toast.service';
|
import { ToastService } from '../../components/toast/toast.service';
|
||||||
@@ -116,7 +116,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 => {
|
data => {
|
||||||
this.raw_data = data.body;
|
this.raw_data = data.body;
|
||||||
|
|
||||||
@@ -225,8 +225,53 @@ export class HistoricalDataComponent implements OnInit {
|
|||||||
* 刷新
|
* 刷新
|
||||||
*/
|
*/
|
||||||
refresh() {
|
refresh() {
|
||||||
const toastCfg = new ToastConfig(ToastType.SUCCESS, '', '刷新成功!', 3000);
|
this.operateSpinServiceService.showSpin();
|
||||||
this.toastService.toast(toastCfg);
|
this.SEARCH = ''; //手动输入条件
|
||||||
|
this.FLT_POS = 1; //过滤还是定位
|
||||||
|
this.SEL_COL = ''; //选择列名
|
||||||
|
this.filterItems = {
|
||||||
|
ALCD: '', //航空公司
|
||||||
|
FLIN: '', //航线类别
|
||||||
|
FLTY: '', //航班类别
|
||||||
|
MVIN: '', //到达/出发
|
||||||
|
FHAG: '', //机坪代理
|
||||||
|
MHAG: '', //维护代理
|
||||||
|
PHAG: '', //旅客代理
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 获取用户设置 */
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
)
|
||||||
|
//获取航班动态信息
|
||||||
|
this.httpCilent.post('/adminapi/hitFlightData/list').subscribe(
|
||||||
|
data => {
|
||||||
|
this.raw_data = data.body;
|
||||||
|
|
||||||
|
//查找链接航班并将其组合成一条数据
|
||||||
|
this.combined_data = [];
|
||||||
|
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);
|
||||||
|
const toastCfg = new ToastConfig(ToastType.SUCCESS, '', '刷新成功!', 3000);
|
||||||
|
this.toastService.toast(toastCfg);
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -142,21 +142,21 @@
|
|||||||
[ngClass]="{'selected':row_state['renderFlight']['FLNO']===airline_row['renderFlight']['FLNO']}">
|
[ngClass]="{'selected':row_state['renderFlight']['FLNO']===airline_row['renderFlight']['FLNO']}">
|
||||||
<td>{{i+1}}</td>
|
<td>{{i+1}}</td>
|
||||||
<td>
|
<td>
|
||||||
<img class="mr-2" *ngIf="getVipNotes(airline_row)" src="/adminweb/assets/images/important-notes/vip.png"
|
<img class="mr-2" *ngIf="getVipNotes(airline_row)" src="/assets/images/important-notes/vip.png"
|
||||||
alt="">
|
alt="">
|
||||||
<img class="mr-2" *ngIf="getOutplanNotes(airline_row)" src="/adminweb/assets/images/important-notes/out_plan.png"
|
<img class="mr-2" *ngIf="getOutplanNotes(airline_row)" src="/assets/images/important-notes/out_plan.png"
|
||||||
alt="">
|
alt="">
|
||||||
<img class="mr-2" *ngIf="getAlternateNotes(airline_row)" src="/adminweb/assets/images/important-notes/alternate.png"
|
<img class="mr-2" *ngIf="getAlternateNotes(airline_row)" src="/assets/images/important-notes/alternate.png"
|
||||||
alt="">
|
alt="">
|
||||||
<img class="mr-2" *ngIf="getDelay30Notes(airline_row)" src="/adminweb/assets/images/important-notes/delay_30.png"
|
<img class="mr-2" *ngIf="getDelay30Notes(airline_row)" src="/assets/images/important-notes/delay_30.png"
|
||||||
alt="">
|
alt="">
|
||||||
<img class="mr-2" *ngIf="getDelayNotes(airline_row)" src="/adminweb/assets/images/important-notes/delay.png"
|
<img class="mr-2" *ngIf="getDelayNotes(airline_row)" src="/assets/images/important-notes/delay.png"
|
||||||
alt="">
|
alt="">
|
||||||
<img class="mr-2" *ngIf="getReturnNotes(airline_row)" src="/adminweb/assets/images/important-notes/return.png"
|
<img class="mr-2" *ngIf="getReturnNotes(airline_row)" src="/assets/images/important-notes/return.png"
|
||||||
alt="">
|
alt="">
|
||||||
<img class="mr-2" *ngIf="getCancleNotes(airline_row)" src="/adminweb/assets/images/important-notes/cancle.png"
|
<img class="mr-2" *ngIf="getCancleNotes(airline_row)" src="/assets/images/important-notes/cancle.png"
|
||||||
alt="">
|
alt="">
|
||||||
<img class="mr-2" *ngIf="getStopoverNotes(airline_row)" src="/adminweb/assets/images/important-notes/stopover.png"
|
<img class="mr-2" *ngIf="getStopoverNotes(airline_row)" src="/assets/images/important-notes/stopover.png"
|
||||||
alt="">
|
alt="">
|
||||||
</td>
|
</td>
|
||||||
<td>{{airline_row['renderFlight']['FLID']}}</td>
|
<td>{{airline_row['renderFlight']['FLID']}}</td>
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ export class MainComponent implements OnInit {
|
|||||||
).subscribe(
|
).subscribe(
|
||||||
(event: NavigationEnd) => {
|
(event: NavigationEnd) => {
|
||||||
if (event.urlAfterRedirects === '/app/main') {
|
if (event.urlAfterRedirects === '/app/main') {
|
||||||
|
// 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 => {
|
||||||
@@ -56,6 +57,7 @@ export class MainComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.changeDetectorRef.detectChanges();
|
this.changeDetectorRef.detectChanges();
|
||||||
|
// this.operateSpinServiceService.hideSpin();
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -123,6 +125,7 @@ export class MainComponent implements OnInit {
|
|||||||
let data = JSON.parse(event as string);
|
let data = JSON.parse(event as string);
|
||||||
if (data.topic === 'schd') {
|
if (data.topic === 'schd') {
|
||||||
let message = JSON.parse(data.message);
|
let message = JSON.parse(data.message);
|
||||||
|
console.log(message);
|
||||||
//是否可以开始处理动态消息
|
//是否可以开始处理动态消息
|
||||||
if (this.canHandleDynamicMessage) {
|
if (this.canHandleDynamicMessage) {
|
||||||
this.dynamicMessageHandle(message);
|
this.dynamicMessageHandle(message);
|
||||||
@@ -131,6 +134,7 @@ export class MainComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
} else if (data.topic === 'msg') {
|
} else if (data.topic === 'msg') {
|
||||||
let message = JSON.parse(data.message);
|
let message = JSON.parse(data.message);
|
||||||
|
console.log(message);
|
||||||
if (this.canHandleDynamicAlert) {
|
if (this.canHandleDynamicAlert) {
|
||||||
this.dynamicAlertHandle(message);
|
this.dynamicAlertHandle(message);
|
||||||
} else {
|
} else {
|
||||||
@@ -828,13 +832,17 @@ export class MainComponent implements OnInit {
|
|||||||
if (this.orderHandle.isArriFlight(flight)) {
|
if (this.orderHandle.isArriFlight(flight)) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (flight['reaFlight']['DELY'] && Array.isArray(flight['reaFlight']['DELY']) && flight['reaFlight']['DELY'].length > 0) {
|
try {
|
||||||
if (parseInt(flight['preFlight']['DELY'][0]['DURA']) - 30 > 0) {
|
if (flight['reaFlight']['DELY'] && Array.isArray(flight['reaFlight']['DELY']) && flight['reaFlight']['DELY'].length > 0) {
|
||||||
return true;
|
if (parseInt(flight['preFlight']['DELY'][0]['DURA']) - 30 > 0) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} catch (error) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -205,8 +205,17 @@ export class PagesComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.user_name = JSON.parse(sessionStorage.getItem('userInfo')).login_name;
|
if (sessionStorage.getItem('userInfo')) {
|
||||||
this.role_type = JSON.parse(sessionStorage.getItem('userInfo')).real_name;
|
this.user_name = JSON.parse(sessionStorage.getItem('userInfo')).login_name;
|
||||||
|
this.role_type = JSON.parse(sessionStorage.getItem('userInfo')).real_name;
|
||||||
|
} else {
|
||||||
|
let cookieMsg = ['SESSION', 'token']
|
||||||
|
cookieMsg.forEach(element => {
|
||||||
|
this.delCookie(element)
|
||||||
|
})
|
||||||
|
this.router.navigate(['/login']);
|
||||||
|
}
|
||||||
|
|
||||||
let activeRoute = this.router.url;
|
let activeRoute = this.router.url;
|
||||||
this.selectActiveMenu(this.menuData, activeRoute);
|
this.selectActiveMenu(this.menuData, activeRoute);
|
||||||
|
|
||||||
@@ -246,6 +255,10 @@ export class PagesComponent implements OnInit {
|
|||||||
confirmLogout() {
|
confirmLogout() {
|
||||||
this.httpClient.post('/logout').subscribe(
|
this.httpClient.post('/logout').subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
let sessionStorageMsg = ['userInfo']
|
||||||
|
sessionStorageMsg.forEach(element => {
|
||||||
|
sessionStorage.removeItem(element)
|
||||||
|
})
|
||||||
const toastCfg = new ToastConfig(ToastType.SUCCESS, '', '退出系统成功!', 3000);
|
const toastCfg = new ToastConfig(ToastType.SUCCESS, '', '退出系统成功!', 3000);
|
||||||
this.toastService.toast(toastCfg);
|
this.toastService.toast(toastCfg);
|
||||||
this.router.navigate(['/login']);
|
this.router.navigate(['/login']);
|
||||||
@@ -253,4 +266,10 @@ export class PagesComponent implements OnInit {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public delCookie($name) {
|
||||||
|
let myDate = new Date();
|
||||||
|
myDate.setTime(-1000);
|
||||||
|
document.cookie = $name + "=''; expires=" + myDate.toUTCString();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -36,7 +36,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.spin-container {
|
/* .spin-container {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -86,18 +86,18 @@
|
|||||||
border: 4px solid transparent;
|
border: 4px solid transparent;
|
||||||
border-top-color: #e7ba08;
|
border-top-color: #e7ba08;
|
||||||
animation: spin 1.5s linear infinite
|
animation: spin 1.5s linear infinite
|
||||||
}
|
} */
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="spin-container" id="pageSpin">
|
<!-- <div class="spin-container" id="pageSpin">
|
||||||
<div class="spin1">
|
<div class="spin1">
|
||||||
<div class="spin2"></div>
|
<div class="spin2"></div>
|
||||||
<div class="spin3"></div>
|
<div class="spin3"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<script type="text/javascript">
|
<!-- <script type="text/javascript">
|
||||||
const initialize = function () {
|
const initialize = function () {
|
||||||
let pageSpin = document.getElementById("pageSpin");
|
let pageSpin = document.getElementById("pageSpin");
|
||||||
pageSpin.style.display = 'block';
|
pageSpin.style.display = 'block';
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
initialize();
|
initialize();
|
||||||
</script>
|
</script> -->
|
||||||
<app-root></app-root>
|
<app-root></app-root>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user