消息警示添加内容及航班列表优化
This commit is contained in:
@@ -116,7 +116,7 @@ export class HistoricalDataComponent implements OnInit {
|
|||||||
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).defaultData;
|
||||||
this.render_col_lists = JSON.parse(element.settingContent).targetList;
|
this.render_col_lists = JSON.parse(element.settingContent).targetList;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -252,7 +252,7 @@ export class HistoricalDataComponent implements OnInit {
|
|||||||
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).defaultData;
|
||||||
this.render_col_lists = JSON.parse(element.settingContent).targetList;
|
this.render_col_lists = JSON.parse(element.settingContent).targetList;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
.tab-container{
|
.tab-container{
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
height: 635px;
|
// height: 635px;
|
||||||
overflow: auto;
|
// overflow: auto;
|
||||||
border: 1px solid #ccc;
|
// border: 1px solid #ccc;
|
||||||
.hr-line{
|
.hr-line{
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.message-container{
|
.message-container{
|
||||||
padding: 5px 10px 5px 10px;
|
padding: 5px 10px 5px 20px;
|
||||||
p{
|
p{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
label{
|
label{
|
||||||
width: 120px;
|
// width: 120px;
|
||||||
text-align: right;
|
font-weight: bolder;
|
||||||
|
// text-align: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,14 +166,14 @@
|
|||||||
<div #tableContainer id="table-container" class="table-container" [ngClass]="{'table-c': !tabClose,'table-o': tabClose}">
|
<div #tableContainer id="table-container" class="table-container" [ngClass]="{'table-c': !tabClose,'table-o': tabClose}">
|
||||||
<div class="table-head" #tableHead>
|
<div class="table-head" #tableHead>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<colgroup>
|
<!-- <colgroup>
|
||||||
<col *ngFor="let common_col of commonCol" [width]="common_col.COL_WIDTH">
|
<col *ngFor="let common_col of commonCol" [width]="common_col.COL_WIDTH">
|
||||||
<col *ngFor="let airline_col of render_col_lists" [width]="airline_col.COL_WIDTH">
|
<col *ngFor="let airline_col of render_col_lists" [width]="airline_col.COL_WIDTH">
|
||||||
</colgroup>
|
</colgroup> -->
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th *ngFor="let common_col of commonCol">{{common_col.COL_CN}}</th>
|
<th *ngFor="let common_col of commonCol" [ngStyle]="{'min-width':common_col.COL_WIDTH}">{{common_col.COL_CN}}</th>
|
||||||
<th *ngFor="let airline_col of render_col_lists">{{airline_col.COL_CN}}</th>
|
<th *ngFor="let airline_col of render_col_lists" [ngStyle]="{'min-width':airline_col.COL_WIDTH}">{{airline_col.COL_CN}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
@@ -181,15 +181,21 @@
|
|||||||
<div class="table-body" #tableBody (scroll)="handleScroll($event)">
|
<div class="table-body" #tableBody (scroll)="handleScroll($event)">
|
||||||
<div class="list-view-phantom" [ngStyle]="{ 'height': wait_render_data.length * 42 + 'px' }"></div>
|
<div class="list-view-phantom" [ngStyle]="{ 'height': wait_render_data.length * 42 + 'px' }"></div>
|
||||||
<table #tableContent id="table" class="table table-striped">
|
<table #tableContent id="table" class="table table-striped">
|
||||||
<colgroup>
|
<!-- <thead>
|
||||||
|
<tr>
|
||||||
|
<th *ngFor="let common_col of commonCol" [width]="common_col.COL_WIDTH"></th>
|
||||||
|
<th *ngFor="let airline_col of render_col_lists" [width]="airline_col.COL_WIDTH"></th>
|
||||||
|
</tr>
|
||||||
|
</thead> -->
|
||||||
|
<!-- <colgroup>
|
||||||
<col *ngFor="let common_col of commonCol" [width]="common_col.COL_WIDTH">
|
<col *ngFor="let common_col of commonCol" [width]="common_col.COL_WIDTH">
|
||||||
<col *ngFor="let airline_col of render_col_lists" [width]="airline_col.COL_WIDTH">
|
<col *ngFor="let airline_col of render_col_lists" [width]="airline_col.COL_WIDTH">
|
||||||
</colgroup>
|
</colgroup> -->
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let airline_row of render_data;let i = index" (click)="selectRow(airline_row)"
|
<tr *ngFor="let airline_row of render_data;let i = index" (click)="selectRow(airline_row)"
|
||||||
[ngClass]="{'selected':row_state['renderFlight']['FLNO']===airline_row['renderFlight']['FLNO']}">
|
[ngClass]="{'selected':row_state['renderFlight']['FLNO']===airline_row['renderFlight']['FLNO']}">
|
||||||
<td>{{start+i+1}}</td>
|
<td style="min-width:55px">{{start+i+1}}</td>
|
||||||
<td>
|
<td style="min-width:120px">
|
||||||
<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="/adminweb/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="/adminweb/assets/images/important-notes/out_plan.png"
|
||||||
@@ -207,15 +213,15 @@
|
|||||||
<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="/adminweb/assets/images/important-notes/stopover.png"
|
||||||
alt="">
|
alt="">
|
||||||
</td>
|
</td>
|
||||||
<td>{{airline_row['renderFlight']['FLID']}}</td>
|
<td style="min-width:165px">{{airline_row['renderFlight']['FLID']}}</td>
|
||||||
<td *ngFor="let airline_col of render_col_lists" [ngClass]="getPosition(airline_col.COL_CODE,airline_row)"
|
<td *ngFor="let airline_col of render_col_lists" [ngClass]="getPosition(airline_col.COL_CODE,airline_row)"
|
||||||
[ngStyle]="getColor(airline_col.COL_CODE,airline_row)" [title]="airline_row['renderFlight'][airline_col.COL_CODE]">{{airline_row['renderFlight'][airline_col.COL_CODE]}}</td>
|
[ngStyle]="getColor(airline_col.COL_CODE,airline_row,airline_col.COL_WIDTH)" [title]="airline_row['renderFlight'][airline_col.COL_CODE]">{{airline_row['renderFlight'][airline_col.COL_CODE]}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="airline-message" [ngClass]="{'tab-c': tabClose,'tab-o': !tabClose}">
|
<div #tabContainer class="airline-message" [ngClass]="{'tab-c': tabClose,'tab-o': !tabClose}">
|
||||||
<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'" [nzShowPagination]="false">
|
<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'" [nzShowPagination]="false">
|
||||||
<nz-tab nzTitle="关联信息" (nzClick)="nzClick()" *ngIf="checkboxGroup.related">
|
<nz-tab nzTitle="关联信息" (nzClick)="nzClick()" *ngIf="checkboxGroup.related">
|
||||||
<app-related-tab [flight]="row_state"></app-related-tab>
|
<app-related-tab [flight]="row_state"></app-related-tab>
|
||||||
|
|||||||
@@ -136,6 +136,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/deep/ .ant-tabs-content{
|
||||||
|
height: calc(100% - 65px);
|
||||||
|
overflow-y: auto;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
nz-tabset{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export class MainComponent implements OnInit {
|
|||||||
public wait_render_data: Array<object> = [];
|
public wait_render_data: Array<object> = [];
|
||||||
public render_data: Array<object> = []; //显示数据,即需要显示的数据
|
public render_data: Array<object> = []; //显示数据,即需要显示的数据
|
||||||
|
|
||||||
public commonCol:Array<object>;
|
public commonCol: Array<object>;
|
||||||
public col_lists: Array<object>; //列数据
|
public col_lists: Array<object>; //列数据
|
||||||
public render_col_lists: Array<object>;
|
public render_col_lists: Array<object>;
|
||||||
|
|
||||||
@@ -109,6 +109,7 @@ export class MainComponent implements OnInit {
|
|||||||
@ViewChild('pageContent') pageContent;
|
@ViewChild('pageContent') pageContent;
|
||||||
@ViewChild('searchFilter') searchFilter;
|
@ViewChild('searchFilter') searchFilter;
|
||||||
@ViewChild('tableContainer') tableContainer;
|
@ViewChild('tableContainer') tableContainer;
|
||||||
|
@ViewChild('tabContainer') tabContainer;
|
||||||
@ViewChild('tableHead') tableHead;
|
@ViewChild('tableHead') tableHead;
|
||||||
@ViewChild('tableBody') tableBody;
|
@ViewChild('tableBody') tableBody;
|
||||||
@ViewChild('tableContent') tableContent;
|
@ViewChild('tableContent') tableContent;
|
||||||
@@ -121,8 +122,12 @@ export class MainComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
console.log(Object.prototype.toString.call({}));
|
||||||
this.renderer2.setStyle(this.tableContainer.nativeElement, 'height', this.pageContent.nativeElement.offsetHeight - this.searchFilter.nativeElement.offsetHeight - 35 + 'px');
|
this.renderer2.setStyle(this.tableContainer.nativeElement, 'height', this.pageContent.nativeElement.offsetHeight - this.searchFilter.nativeElement.offsetHeight - 35 + 'px');
|
||||||
this.renderer2.setStyle(this.tableBody.nativeElement, 'height', this.tableContainer.nativeElement.offsetHeight - this.tableHead.nativeElement.offsetHeight + 'px');
|
this.renderer2.setStyle(this.tableBody.nativeElement, 'height', this.tableContainer.nativeElement.offsetHeight - this.tableHead.nativeElement.offsetHeight + 'px');
|
||||||
|
if (!this.tabClose) {
|
||||||
|
this.renderer2.setStyle(this.tabContainer.nativeElement, 'height', this.pageContent.nativeElement.offsetHeight - this.searchFilter.nativeElement.offsetHeight - 35 + 'px');
|
||||||
|
}
|
||||||
window.onresize = function () {
|
window.onresize = function () {
|
||||||
this.calcVisibleCount();
|
this.calcVisibleCount();
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
@@ -268,11 +273,11 @@ export class MainComponent implements OnInit {
|
|||||||
this.start = Math.floor(scrollTop / this.trItemHeight);
|
this.start = Math.floor(scrollTop / this.trItemHeight);
|
||||||
this.end = this.start + this.visibleCount;
|
this.end = this.start + this.visibleCount;
|
||||||
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
$(".table-body tbody>tr").eq(0).find('td').each((index,element)=>{
|
$(".table-body tbody>tr").eq(0).find('td').each((index, element) => {
|
||||||
$(".table-head table colgroup").eq(0).find('col').eq(index).attr('width',$(element).innerWidth()+'px')
|
$(".table-head table thead tr").eq(0).find('th').eq(index).attr('width', $(element).innerWidth() + 'px');
|
||||||
})
|
})
|
||||||
},500)
|
}, 500)
|
||||||
|
|
||||||
this.row_state = this.render_data.length > 0 ? this.render_data[0] : { renderFlight: {} };
|
this.row_state = this.render_data.length > 0 ? this.render_data[0] : { renderFlight: {} };
|
||||||
this.operateSpinServiceService.hideSpin();
|
this.operateSpinServiceService.hideSpin();
|
||||||
@@ -295,15 +300,15 @@ export class MainComponent implements OnInit {
|
|||||||
const scrollTop = this.tableBody.nativeElement.scrollTop;
|
const scrollTop = this.tableBody.nativeElement.scrollTop;
|
||||||
$(".table-head").scrollLeft($('.table-body').scrollLeft());
|
$(".table-head").scrollLeft($('.table-body').scrollLeft());
|
||||||
const fixedScrollTop = scrollTop - scrollTop % this.trItemHeight;
|
const fixedScrollTop = scrollTop - scrollTop % this.trItemHeight;
|
||||||
this.tableContent.nativeElement.style.webkitTransform = `translateY(${fixedScrollTop - 42}px)`;
|
this.tableContent.nativeElement.style.webkitTransform = `translateY(${fixedScrollTop}px)`;
|
||||||
this.start = Math.floor(scrollTop / this.trItemHeight);
|
this.start = Math.floor(scrollTop / this.trItemHeight);
|
||||||
this.end = this.start + this.visibleCount;
|
this.end = this.start + this.visibleCount;
|
||||||
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
$(".table-body tbody>tr").eq(0).find('td').each((index,element)=>{
|
$(".table-body tbody>tr").eq(0).find('td').each((index, element) => {
|
||||||
$(".table-head table colgroup").eq(0).find('col').eq(index).attr('width',$(element).innerWidth()+'px')
|
$(".table-head table thead tr").eq(0).find('th').eq(index).attr('width', $(element).innerWidth() + 'px');
|
||||||
})
|
})
|
||||||
},500)
|
}, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -312,6 +317,9 @@ export class MainComponent implements OnInit {
|
|||||||
calcVisibleCount() {
|
calcVisibleCount() {
|
||||||
this.renderer2.setStyle(this.tableContainer.nativeElement, 'height', this.pageContent.nativeElement.offsetHeight - this.searchFilter.nativeElement.offsetHeight - 35 + 'px');
|
this.renderer2.setStyle(this.tableContainer.nativeElement, 'height', this.pageContent.nativeElement.offsetHeight - this.searchFilter.nativeElement.offsetHeight - 35 + 'px');
|
||||||
this.renderer2.setStyle(this.tableBody.nativeElement, 'height', this.tableContainer.nativeElement.offsetHeight - this.tableHead.nativeElement.offsetHeight + 'px');
|
this.renderer2.setStyle(this.tableBody.nativeElement, 'height', this.tableContainer.nativeElement.offsetHeight - this.tableHead.nativeElement.offsetHeight + 'px');
|
||||||
|
if (!this.tabClose) {
|
||||||
|
this.renderer2.setStyle(this.tabContainer.nativeElement, 'height', this.pageContent.nativeElement.offsetHeight - this.searchFilter.nativeElement.offsetHeight - 35 + 'px');
|
||||||
|
}
|
||||||
this.visibleCount = Math.ceil(this.tableBody.nativeElement.clientHeight / this.trItemHeight);
|
this.visibleCount = Math.ceil(this.tableBody.nativeElement.clientHeight / this.trItemHeight);
|
||||||
const scrollTop = this.tableBody.nativeElement.scrollTop;
|
const scrollTop = this.tableBody.nativeElement.scrollTop;
|
||||||
const fixedScrollTop = scrollTop - scrollTop % this.trItemHeight;
|
const fixedScrollTop = scrollTop - scrollTop % this.trItemHeight;
|
||||||
@@ -319,11 +327,11 @@ export class MainComponent implements OnInit {
|
|||||||
this.start = Math.floor(scrollTop / this.trItemHeight);
|
this.start = Math.floor(scrollTop / this.trItemHeight);
|
||||||
this.end = this.start + this.visibleCount;
|
this.end = this.start + this.visibleCount;
|
||||||
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
$(".table-body tbody>tr").eq(0).find('td').each((index,element)=>{
|
$(".table-body tbody>tr").eq(0).find('td').each((index, element) => {
|
||||||
$(".table-head table colgroup").eq(0).find('col').eq(index).attr('width',$(element).innerWidth()+'px')
|
$(".table-head table thead tr").eq(0).find('th').eq(index).attr('width', $(element).innerWidth() + 'px');
|
||||||
})
|
})
|
||||||
},500)
|
}, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -410,26 +418,36 @@ export class MainComponent implements OnInit {
|
|||||||
* 动态消息处理方法
|
* 动态消息处理方法
|
||||||
* @param message
|
* @param message
|
||||||
*/
|
*/
|
||||||
|
startposi: number
|
||||||
dynamicMessageHandle(message) {
|
dynamicMessageHandle(message) {
|
||||||
|
this.startposi = new Date().getTime();
|
||||||
let index = this.raw_data.findIndex(element => element['FLID'] === message.FLID);
|
let index = this.raw_data.findIndex(element => element['FLID'] === message.FLID);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
this.raw_data[index] = message;
|
this.raw_data[index] = message;
|
||||||
} else {
|
} else {
|
||||||
this.raw_data.push(message);
|
this.raw_data.push(message);
|
||||||
}
|
}
|
||||||
|
console.log(new Date().getTime() - this.startposi + '消息更新替换到原始数据所花时间');
|
||||||
|
|
||||||
//查找链接航班并将其组合成一条数据
|
//查找链接航班并将其组合成一条数据
|
||||||
|
this.startposi = new Date().getTime();
|
||||||
let combined_linked_data = this.dataHandle.findLinkFlights(this.raw_data);
|
let combined_linked_data = this.dataHandle.findLinkFlights(this.raw_data);
|
||||||
|
console.log(new Date().getTime() - this.startposi + '找链接航班所花时间')
|
||||||
let combined_data = [];
|
let combined_data = [];
|
||||||
this.combined_data = [];
|
this.combined_data = [];
|
||||||
|
this.startposi = new Date().getTime()
|
||||||
combined_linked_data.forEach(element => {
|
combined_linked_data.forEach(element => {
|
||||||
let flights_item = this.dataHandle.flightsRenderTransfer(element, this.col_lists);
|
let flights_item = this.dataHandle.flightsRenderTransfer(element, this.col_lists);
|
||||||
this.combined_data.push(flights_item);
|
this.combined_data.push(flights_item);
|
||||||
});
|
});
|
||||||
|
console.log(new Date().getTime() - this.startposi + '转换结束所花时间')
|
||||||
|
this.startposi = new Date().getTime();
|
||||||
this.combined_data.forEach(item => {
|
this.combined_data.forEach(item => {
|
||||||
combined_data.push(this.dataHandle.basicDataTransHandle(item, this.airports, this.citys, this.airlines, this.flightStatus, this.flightTypes));
|
combined_data.push(this.dataHandle.basicDataTransHandle(item, this.airports, this.citys, this.airlines, this.flightStatus, this.flightTypes));
|
||||||
})
|
})
|
||||||
|
console.log(new Date().getTime() - this.startposi + '基础数据转换结束所花时间');
|
||||||
this.combined_data = combined_data;
|
this.combined_data = combined_data;
|
||||||
|
this.startposi = new Date().getTime();
|
||||||
this.combined_data.forEach(element => {
|
this.combined_data.forEach(element => {
|
||||||
element['ORDER'] = this.orderHandle.sequence(element);
|
element['ORDER'] = this.orderHandle.sequence(element);
|
||||||
})
|
})
|
||||||
@@ -437,6 +455,10 @@ export class MainComponent implements OnInit {
|
|||||||
return (a['ORDER'] - b['ORDER']);
|
return (a['ORDER'] - b['ORDER']);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log(new Date().getTime() - this.startposi + '排序所花时间');
|
||||||
|
|
||||||
|
this.selectChange('dynamic');
|
||||||
|
|
||||||
if (this.airlinesSelections.findIndex(airline => airline.airlineCodeIata === message['ALCD']) === -1) {
|
if (this.airlinesSelections.findIndex(airline => airline.airlineCodeIata === message['ALCD']) === -1) {
|
||||||
let index = this.airlines.findIndex(val => val.airlineCodeIata === message['ALCD']);
|
let index = this.airlines.findIndex(val => val.airlineCodeIata === message['ALCD']);
|
||||||
this.airlinesSelections.push(this.airlines[index]);
|
this.airlinesSelections.push(this.airlines[index]);
|
||||||
@@ -447,7 +469,7 @@ export class MainComponent implements OnInit {
|
|||||||
this.flightTypeSelections.push(this.flightTypes[index]);
|
this.flightTypeSelections.push(this.flightTypes[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.selectChange('dynamic');
|
|
||||||
|
|
||||||
// let dynamicHandleData = this.dataHandle.dynamicMessageHandle(
|
// let dynamicHandleData = this.dataHandle.dynamicMessageHandle(
|
||||||
// message,
|
// message,
|
||||||
@@ -503,7 +525,7 @@ export class MainComponent implements OnInit {
|
|||||||
let alertType = message.META.TYPE + '-' + message.META.STYP;
|
let alertType = message.META.TYPE + '-' + message.META.STYP;
|
||||||
let index = this.airline_message_alert.findIndex(val => val['COL_CODE'] === alertType);
|
let index = this.airline_message_alert.findIndex(val => val['COL_CODE'] === alertType);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
let alertText = this.alertMessage[alertType]();
|
let alertText = this.alertMessage[alertType](message, this.airports);
|
||||||
const toastCfg = new ToastConfig(ToastType.SUCCESS, '', alertText, 600000);
|
const toastCfg = new ToastConfig(ToastType.SUCCESS, '', alertText, 600000);
|
||||||
this.toastService.toast(toastCfg);
|
this.toastService.toast(toastCfg);
|
||||||
}
|
}
|
||||||
@@ -553,6 +575,7 @@ export class MainComponent implements OnInit {
|
|||||||
* 下拉框选择筛选
|
* 下拉框选择筛选
|
||||||
*/
|
*/
|
||||||
selectChange(type) {
|
selectChange(type) {
|
||||||
|
this.startposi = new Date().getTime()
|
||||||
if (type === 'filter') {
|
if (type === 'filter') {
|
||||||
this.operateSpinServiceService.showSpin();
|
this.operateSpinServiceService.showSpin();
|
||||||
}
|
}
|
||||||
@@ -760,11 +783,11 @@ export class MainComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
this.wait_render_data = filter_data;
|
this.wait_render_data = filter_data;
|
||||||
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
$(".table-body tbody>tr").eq(0).find('td').each((index,element)=>{
|
$(".table-body tbody>tr").eq(0).find('td').each((index, element) => {
|
||||||
$(".table-head table colgroup").eq(0).find('col').eq(index).attr('width',$(element).innerWidth()+'px')
|
$(".table-head table thead tr").eq(0).find('th').eq(index).attr('width', $(element).innerWidth() + 'px');
|
||||||
})
|
})
|
||||||
},500)
|
}, 500)
|
||||||
// this.render_data = filter_data;
|
// this.render_data = filter_data;
|
||||||
this.row_state = this.render_data.length > 0 ? this.render_data[0] : { renderFlight: {} };
|
this.row_state = this.render_data.length > 0 ? this.render_data[0] : { renderFlight: {} };
|
||||||
this.operateSpinServiceService.hideSpin();
|
this.operateSpinServiceService.hideSpin();
|
||||||
@@ -812,13 +835,16 @@ export class MainComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(new Date().getTime() - this.startposi + '判断是否满足过滤条件所花时间');
|
||||||
this.wait_render_data = filterData;
|
this.wait_render_data = filterData;
|
||||||
|
this.startposi = new Date().getTime();
|
||||||
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
||||||
setTimeout(()=>{
|
console.log(new Date().getTime() - this.startposi + '渲染结束所花时间');
|
||||||
$(".table-body tbody>tr").eq(0).find('td').each((index,element)=>{
|
setTimeout(() => {
|
||||||
$(".table-head table colgroup").eq(0).find('col').eq(index).attr('width',$(element).innerWidth()+'px')
|
$(".table-body tbody>tr").eq(0).find('td').each((index, element) => {
|
||||||
|
$(".table-head table thead tr").eq(0).find('th').eq(index).attr('width', $(element).innerWidth() + 'px');
|
||||||
})
|
})
|
||||||
},500)
|
}, 500)
|
||||||
// this.render_data = filterData;
|
// this.render_data = filterData;
|
||||||
this.row_state = this.render_data.length > 0 ? this.render_data[0] : { renderFlight: {} };
|
this.row_state = this.render_data.length > 0 ? this.render_data[0] : { renderFlight: {} };
|
||||||
this.operateSpinServiceService.hideSpin();
|
this.operateSpinServiceService.hideSpin();
|
||||||
@@ -916,13 +942,14 @@ export class MainComponent implements OnInit {
|
|||||||
'BOTM': this.cellColorHandle.botm.bind(this.cellColorHandle),
|
'BOTM': this.cellColorHandle.botm.bind(this.cellColorHandle),
|
||||||
'GCTM': this.cellColorHandle.gctm.bind(this.cellColorHandle)
|
'GCTM': this.cellColorHandle.gctm.bind(this.cellColorHandle)
|
||||||
}
|
}
|
||||||
getColor(col_CODE, flight) {
|
getColor(col_CODE, flight, col_WIDTH) {
|
||||||
let index = this.airline_color.findIndex(color => color['COL_CODE'] === col_CODE)
|
let index = this.airline_color.findIndex(color => color['COL_CODE'] === col_CODE)
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
let styles = this.colorFormatter[col_CODE](flight, this.airline_color[index]);
|
let styles = this.colorFormatter[col_CODE](flight, this.airline_color[index]);
|
||||||
|
styles['min-width'] = col_WIDTH;
|
||||||
return styles;
|
return styles;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return { 'min-width': col_WIDTH };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1150,17 +1177,24 @@ export class MainComponent implements OnInit {
|
|||||||
* 复选框勾选事件
|
* 复选框勾选事件
|
||||||
*/
|
*/
|
||||||
checkboxChange() {
|
checkboxChange() {
|
||||||
|
let tabClose = true
|
||||||
for (const key in this.checkboxGroup) {
|
for (const key in this.checkboxGroup) {
|
||||||
if (this.checkboxGroup.hasOwnProperty(key)) {
|
if (this.checkboxGroup.hasOwnProperty(key)) {
|
||||||
if (this.checkboxGroup[key]) {
|
if (this.checkboxGroup[key]) {
|
||||||
this.tabClose = false;
|
tabClose = false;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
this.tabClose = true;
|
tabClose = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.tabClose = tabClose;
|
||||||
|
if (!this.tabClose) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.renderer2.setStyle(this.tabContainer.nativeElement, 'height', this.pageContent.nativeElement.offsetHeight - this.searchFilter.nativeElement.offsetHeight - 35 + 'px');
|
||||||
|
}, 10)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
.tab-container {
|
.tab-container {
|
||||||
padding: 10px 10px;
|
padding: 10px 10px;
|
||||||
height: 635px;
|
// height: 635px;
|
||||||
overflow: auto;
|
// overflow: auto;
|
||||||
border: 1px solid #ccc;
|
// border: 1px solid #ccc;
|
||||||
.fieldset-card {
|
.fieldset-card {
|
||||||
fieldset {
|
fieldset {
|
||||||
padding: 5px 10px 20px 10px;
|
padding: 5px 10px 20px 10px;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export class HttpClientService {
|
|||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
|
header: HttpHeaders = new HttpHeaders().set('x-requested-with', 'XMLHttpRequest')
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* request
|
* request
|
||||||
@@ -29,7 +29,7 @@ export class HttpClientService {
|
|||||||
* @return any
|
* @return any
|
||||||
*/
|
*/
|
||||||
request(method: string, url: string, options?): Observable<any> {
|
request(method: string, url: string, options?): Observable<any> {
|
||||||
return this.commonProcess(this.httpClient.request(method, url, options));
|
return this.commonProcess(this.httpClient.request(method, url, { headers: this.header }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ export class HttpClientService {
|
|||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
delete(url: string, options?): Observable<any> {
|
delete(url: string, options?): Observable<any> {
|
||||||
return this.commonProcess(this.httpClient.delete(url, options));
|
return this.commonProcess(this.httpClient.delete(url, { headers: this.header }));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -58,9 +58,9 @@ export class HttpClientService {
|
|||||||
paramsString.push([key, params[key]].join('='))
|
paramsString.push([key, params[key]].join('='))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.commonProcess(this.httpClient.get(encodeURI(url + paramsString.join('&') + '&t=' + t), options));
|
return this.commonProcess(this.httpClient.get(encodeURI(url + paramsString.join('&') + '&t=' + t), { headers: this.header }));
|
||||||
} else {
|
} else {
|
||||||
return this.commonProcess(this.httpClient.get(url + 't=' + t, options));
|
return this.commonProcess(this.httpClient.get(url + 't=' + t, { headers: this.header }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ export class HttpClientService {
|
|||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
head(url: string, options?): Observable<any> {
|
head(url: string, options?): Observable<any> {
|
||||||
return this.commonProcess(this.httpClient.head(url, options));
|
return this.commonProcess(this.httpClient.head(url, { headers: this.header }));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,7 +79,7 @@ export class HttpClientService {
|
|||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
options(url: string, options?): Observable<any> {
|
options(url: string, options?): Observable<any> {
|
||||||
return this.commonProcess(this.httpClient.options(url, options));
|
return this.commonProcess(this.httpClient.options(url, { headers: this.header }));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,7 +88,7 @@ export class HttpClientService {
|
|||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
patch(url: string, body?, options?): Observable<any> {
|
patch(url: string, body?, options?): Observable<any> {
|
||||||
return this.commonProcess(this.httpClient.patch(url, body, options));
|
return this.commonProcess(this.httpClient.patch(url, body, { headers: this.header }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ export class HttpClientService {
|
|||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
post(url: string, body?, options?): Observable<any> {
|
post(url: string, body?, options?): Observable<any> {
|
||||||
return this.commonProcess(this.httpClient.post(url, body, options));
|
return this.commonProcess(this.httpClient.post(url, body, { headers: this.header }));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -108,7 +108,7 @@ export class HttpClientService {
|
|||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
put(url: string, body?, options?): Observable<any> {
|
put(url: string, body?, options?): Observable<any> {
|
||||||
return this.commonProcess(this.httpClient.put(url, body, options));
|
return this.commonProcess(this.httpClient.put(url, body, { headers: this.header }));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,89 +1,159 @@
|
|||||||
export class AlertMessageHandle{
|
import dateFormatter from './date-formatter';
|
||||||
public alertMessage = {
|
export class AlertMessageHandle {
|
||||||
'FLOP-CNCL':'',
|
// public alertMessage = {
|
||||||
'FLOP-FRET':'',
|
// 'FLOP-CNCL':'',
|
||||||
'FLOP-FDIV':'',
|
// 'FLOP-FRET':'',
|
||||||
'FLOP-FDEL':'',
|
// 'FLOP-FDIV':'',
|
||||||
'FLOP-DELY':'',
|
// 'FLOP-FDEL':'',
|
||||||
'FLOP-ACTT':'',
|
// 'FLOP-DELY':'',
|
||||||
'FLOP-GTDT':'',
|
// 'FLOP-ACTT':'',
|
||||||
'FLOP-PSDT':'',
|
// 'FLOP-GTDT':'',
|
||||||
'FLOP-ESTT':'',
|
// 'FLOP-PSDT':'',
|
||||||
'FLOP-PADT':'',
|
// 'FLOP-ESTT':'',
|
||||||
'FLOP-CKDT':'',
|
// 'FLOP-PADT':'',
|
||||||
'FLOP-BOTM':'',
|
// 'FLOP-CKDT':'',
|
||||||
'FLOP-CLDT':'',
|
// 'FLOP-BOTM':'',
|
||||||
'FLOP-ROUT':'',
|
// 'FLOP-CLDT':'',
|
||||||
'FLOP-VIPP':'',
|
// 'FLOP-ROUT':'',
|
||||||
'FLOP-HNAG':'',
|
// 'FLOP-VIPP':'',
|
||||||
'FLOP-FLBG':'',
|
// 'FLOP-HNAG':'',
|
||||||
'FLOP-RENO':'',
|
// 'FLOP-FLBG':'',
|
||||||
'FLOP-ABTM':'',
|
// 'FLOP-RENO':'',
|
||||||
'FLOP-CHOT':'',
|
// 'FLOP-ABTM':'',
|
||||||
'FLOP-TRML':'',
|
// 'FLOP-CHOT':'',
|
||||||
}
|
// 'FLOP-TRML':'',
|
||||||
|
// }
|
||||||
|
|
||||||
public flopCncl(){
|
public flopCncl(message, airports) {
|
||||||
return '航班取消事件'
|
return message.FLOP.FFID + '航班取消';
|
||||||
}
|
}
|
||||||
public flopFret(){
|
public flopFret(message, airports) {
|
||||||
return '航班返航事件'
|
if (message.FLOP.FRET.REID === 'G') {
|
||||||
|
return message.FLOP.FFID + '航班从地面返回,返回原因:' + message.FLOP.FRET.content || message.FLOP.FRET.VALUE;
|
||||||
|
} else if (message.FLOP.FRET.REID === 'A') {
|
||||||
|
return message.FLOP.FFID + '航班从空中返回,返回原因:' + message.FLOP.FRET.content || message.FLOP.FRET.VALUE;
|
||||||
|
} else {
|
||||||
|
return message.FLOP.FFID + '航班从空中或地面返回,返回原因:' + message.FLOP.FRET.content || message.FLOP.FRET.VALUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public flopFdiv(){
|
public flopFdiv(message, airports) {
|
||||||
return '航班备降事件'
|
let airportName = '';
|
||||||
|
let index = airports.findIndex(airport => airport.airportCodeIata === message.FLOP.FDIV.DDES);
|
||||||
|
if (index > -1) {
|
||||||
|
airportName = airports[index].airportNameChn;
|
||||||
|
}
|
||||||
|
if (message.FLOP.FDIV.DDIR === 'FROM') {
|
||||||
|
return message.FLOP.FFID + '航班备降自' + airportName + ',备降原因:' + message.FLOP.FDIV.content || message.FLOP.FDIV.VALUE;
|
||||||
|
} else if (message.FLOP.FDIV.DDIR === 'TO') {
|
||||||
|
return message.FLOP.FFID + '航班备降到' + airportName + ',备降原因:' + message.FLOP.FDIV.content || message.FLOP.FDIV.VALUE;
|
||||||
|
} else {
|
||||||
|
return message.FLOP.FFID + '航班备降,备降原因:' + message.FLOP.FDIV.content || message.FLOP.FDIV.VALUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public flopFdel(){
|
public flopFdel(message, airports) {
|
||||||
return '航班删除事件'
|
return message.FLOP.FFID + '航班被删除了'
|
||||||
}
|
}
|
||||||
public flopDely(){
|
public flopDely(message, airports) {
|
||||||
return '航班延误事件'
|
return message.FLOP.FFID + '航班延误' + message.FLOP.DELY.DURA + '分钟;延误码:' + message.FLOP.DELY.CODE + ';延误信息:' + message.FLOP.DELY.content || message.FLOP.DELY.VALUE
|
||||||
}
|
}
|
||||||
public flopActt(){
|
public flopActt(message, airports) {
|
||||||
return '航班实际时间事件'
|
return message.FLOP.FFID + '航班实际时间:' + dateFormatter(message.FLOP.ACTT);
|
||||||
}
|
}
|
||||||
public flopGtdt(){
|
public flopGtdt(message, airports) {
|
||||||
return '航班登机门事件'
|
return message.FLOP.FFID + '登机门分配为:' + message.FLOP.GTDT.GATE
|
||||||
}
|
}
|
||||||
public flopPsdt(){
|
public flopPsdt(message, airports) {
|
||||||
return '航班机位变更事件'
|
if (Array.isArray(message.FLOP['PSDT']) && message.FLOP['PSDT'].length > 0) {
|
||||||
|
let psst = [];
|
||||||
|
for (let i = 0; i < message.FLOP['PSDT'].length; i++) {
|
||||||
|
psst.push(message.FLOP['PSDT'][i]['PSST']);
|
||||||
|
}
|
||||||
|
let set = new Set(psst);
|
||||||
|
return message.FLOP.FFID + '计划机位变更为:' + Array.from(set).join(',');
|
||||||
|
} else if (Object.prototype.toString.call(message.FLOP['PSDT']) === '[object Object]') {
|
||||||
|
return message.FLOP.FFID + '计划机位变更为:' + message.FLOP['PSDT']['PSST'];
|
||||||
|
} else {
|
||||||
|
return message.FLOP.FFID + '计划机位变更为:';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public flopEstt(){
|
public flopEstt(message, airports) {
|
||||||
return '航班预计时间事件'
|
return message.FLOP.FFID + '预计时间变更为' + dateFormatter(message.FLOP.ESTT);
|
||||||
}
|
}
|
||||||
public flopPadt(){
|
public flopPadt(message, airports) {
|
||||||
return '航班站起飞时间事件'
|
return message.FLOP.FFID + '航班前站实际起飞时间:' + dateFormatter(message.FLOP.PADT);
|
||||||
}
|
}
|
||||||
public flopCkdt(){
|
public flopCkdt(message, airports) {
|
||||||
return '航班值机柜台事件'
|
if (Array.isArray(message.FLOP['CKDT']) && message.FLOP['CKDT'].length > 0) {
|
||||||
|
let chkc = [];
|
||||||
|
for (let i = 0; i < message.FLOP['CKDT'].length; i++) {
|
||||||
|
chkc.push(message.FLOP['CKDT'][i]['CHKC']);
|
||||||
|
}
|
||||||
|
let set = new Set(chkc);
|
||||||
|
return message.FLOP.FFID + '航班值机柜台分配为:' + Array.from(set).join(',');
|
||||||
|
} else if (Object.prototype.toString.call(message.FLOP['CKDT']) === '[object Object]') {
|
||||||
|
return message.FLOP.FFID + '航班值机柜台分配为:' + message.FLOP['CKDT']['CHKC'];
|
||||||
|
} else {
|
||||||
|
return message.FLOP.FFID + '航班值机柜台分配为:';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public flopBotm(){
|
public flopBotm(message, airports) {
|
||||||
return '航班登机开始事件'
|
return message.FLOP.FFID + '登机开始时间:' + dateFormatter(message.FLOP.BOTM);
|
||||||
}
|
}
|
||||||
public flopCldt(){
|
public flopCldt(message, airports) {
|
||||||
return '航班行李转盘事件'
|
if (Array.isArray(message.FLOP['CLDT']) && message.FLOP['CLDT'].length > 0) {
|
||||||
|
let belt = [];
|
||||||
|
for (let i = 0; i < message.FLOP['CLDT'].length; i++) {
|
||||||
|
belt.push(message.FLOP['CLDT'][i]['BELT']);
|
||||||
|
}
|
||||||
|
let set = new Set(belt);
|
||||||
|
return message.FLOP.FFID + '行李转盘分配为:' + Array.from(set).join(',');
|
||||||
|
} else if (Object.prototype.toString.call(message.FLOP['CLDT']) === '[object Object]') {
|
||||||
|
return message.FLOP.FFID + '行李转盘分配为:' + message.FLOP['CLDT']['BELT'];
|
||||||
|
} else {
|
||||||
|
return message.FLOP.FFID + '行李转盘分配为:';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public flopRout(){
|
public flopRout(message, airports, citys) {
|
||||||
return '航班航线事件'
|
let mvin = message.FLOP.FFID.split('-')[2];
|
||||||
|
let rout = [];
|
||||||
|
|
||||||
|
if (Array.isArray(message.FLOP['ROUT']) && message.FLOP['ROUT'] > 0) {
|
||||||
|
for (let i = 0; i < message.FLOP['ROUT'].length; i++) {
|
||||||
|
let airportIndex = airports.findIndex(val => val.airportCodeIata === message.FLOP['ROUT'][i]['APCD']);
|
||||||
|
let cityIndex = citys.findIndex(val => airports[airportIndex].cityId === val.cityId);
|
||||||
|
rout.push(citys[cityIndex].cityNameChn);
|
||||||
|
}
|
||||||
|
} else if (Object.prototype.toString.call(message.FLOP['ROUT']) === '[object Object]') {
|
||||||
|
let airportIndex = airports.findIndex(val => val.airportCodeIata === message.FLOP['ROUT']['APCD']);
|
||||||
|
let cityIndex = citys.findIndex(val => airports[airportIndex].cityId === val.cityId);
|
||||||
|
rout.push(citys[cityIndex].cityNameChn);
|
||||||
|
}
|
||||||
|
if (mvin === 'A') {
|
||||||
|
rout.push('成都');
|
||||||
|
} else if (mvin === 'D') {
|
||||||
|
rout.unshift('成都');
|
||||||
|
}
|
||||||
|
return message.FLOP.FFID + '航线更改为:' + rout.join(' - ');
|
||||||
}
|
}
|
||||||
public flopVipp(){
|
public flopVipp(message, airports, citys) {
|
||||||
return '航班VIP事件'
|
return message.FLOP.FFID + 'VIP旅客:' + message.FLOP.VIPP + '人';
|
||||||
}
|
}
|
||||||
public flopHnag(){
|
public flopHnag() {
|
||||||
return '航班代理事件'
|
return '航班代理事件'
|
||||||
}
|
}
|
||||||
public flopFlbg(){
|
public flopFlbg(message,airports,citys) {
|
||||||
return '航班首末件行李到达事件'
|
return message.FLOP.FFID + '首末件行李到达时间消息';
|
||||||
}
|
}
|
||||||
public flopReno(){
|
public flopReno(message,airports,citys) {
|
||||||
return '航班飞机号变更事件'
|
return message.FLOP.FFID + '更换飞机号:' + message.FLOP.RENO;
|
||||||
}
|
}
|
||||||
public flopAbtm(){
|
public flopAbtm(message,airports,citys) {
|
||||||
return '航班靠桥撤桥事件'
|
return message.FLOP.FFID + '靠桥撤桥消息';
|
||||||
}
|
}
|
||||||
public flopChdt(){
|
public flopChdt(message,airports,citys) {
|
||||||
return '航班上下轮档事件'
|
return message.FLOP.FFID + '上下轮档消息';
|
||||||
}
|
}
|
||||||
public flopTrml(){
|
public flopTrml(message,airports,citys) {
|
||||||
return '航班航站楼事件'
|
return message.FLOP.FFID + '航站楼:' + message.FLOP.TRML;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return {};
|
||||||
}
|
}
|
||||||
} else if (this.orderHandle.isDeptFlight(flight)) {
|
} else if (this.orderHandle.isDeptFlight(flight)) {
|
||||||
if (flight['reaFlight']['RENO'] && flight['reaFlight']['RENO'].indexOf('(') > 0) {
|
if (flight['reaFlight']['RENO'] && flight['reaFlight']['RENO'].indexOf('(') > 0) {
|
||||||
@@ -23,7 +23,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return {};
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((flight['preFlight']['RENO'] && flight['preFlight']['RENO'].indexOf('(') > 0) || (flight['reaFlight']['RENO'] && flight['reaFlight']['RENO'].indexOf('(') > 0)) {
|
if ((flight['preFlight']['RENO'] && flight['preFlight']['RENO'].indexOf('(') > 0) || (flight['reaFlight']['RENO'] && flight['reaFlight']['RENO'].indexOf('(') > 0)) {
|
||||||
@@ -32,7 +32,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return {};
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (flight['reaFlight']['ACTT']) {
|
if (flight['reaFlight']['ACTT']) {
|
||||||
@@ -54,7 +54,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,7 +67,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return {};
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (flight['reaFlight']['ESTT'] && !flight['reaFlight']['ACTT']) {
|
if (flight['reaFlight']['ESTT'] && !flight['reaFlight']['ACTT']) {
|
||||||
@@ -76,7 +76,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return {};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return {};
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (flight['reaFlight']['SODT'] && !flight['reaFlight']['ESTT'] && !flight['reaFlight']['ACTT']) {
|
if (flight['reaFlight']['SODT'] && !flight['reaFlight']['ESTT'] && !flight['reaFlight']['ACTT']) {
|
||||||
@@ -99,7 +99,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -112,7 +112,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return {};
|
||||||
}
|
}
|
||||||
} else if (this.orderHandle.isDeptFlight(flight)) {
|
} else if (this.orderHandle.isDeptFlight(flight)) {
|
||||||
if (flight['reaFlight']['PADT'] && flight['reaFlight']['PADT'].indexOf('(') > 0) {
|
if (flight['reaFlight']['PADT'] && flight['reaFlight']['PADT'].indexOf('(') > 0) {
|
||||||
@@ -121,7 +121,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return {};
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((flight['preFlight']['PADT'] && flight['preFlight']['PADT'].indexOf('(') > 0) || (flight['reaFlight']['PADT'] && flight['reaFlight']['PADT'].indexOf('(') > 0)) {
|
if ((flight['preFlight']['PADT'] && flight['preFlight']['PADT'].indexOf('(') > 0) || (flight['reaFlight']['PADT'] && flight['reaFlight']['PADT'].indexOf('(') > 0)) {
|
||||||
@@ -130,13 +130,13 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public psst(flight, colorSetting) {
|
public psst(flight, colorSetting) {
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
public cotm(flight, colorSetting) {
|
public cotm(flight, colorSetting) {
|
||||||
@@ -146,7 +146,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,7 +168,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ export class CellColorHandle {
|
|||||||
'color': colorSetting.COL_COLOR
|
'color': colorSetting.COL_COLOR
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@ export class FlightsDataHandle {
|
|||||||
'ERUT': this.transferHandle.erutFormatter.bind(this.transferHandle),
|
'ERUT': this.transferHandle.erutFormatter.bind(this.transferHandle),
|
||||||
'FLIN': this.transferHandle.flinFormatter.bind(this.transferHandle),
|
'FLIN': this.transferHandle.flinFormatter.bind(this.transferHandle),
|
||||||
'SODT': this.transferHandle.sodtFormatter.bind(this.transferHandle),
|
'SODT': this.transferHandle.sodtFormatter.bind(this.transferHandle),
|
||||||
'GATE': this.transferHandle.gateFormatter.bind(this.transferHandle),
|
'GTDT': this.transferHandle.gateFormatter.bind(this.transferHandle),
|
||||||
'PADT': this.transferHandle.padtFormatter.bind(this.transferHandle),
|
'PADT': this.transferHandle.padtFormatter.bind(this.transferHandle),
|
||||||
'FLDT':this.transferHandle.fldtFormatter.bind(this.transferHandle)
|
'FLDT':this.transferHandle.fldtFormatter.bind(this.transferHandle)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ export class TransferRenderHandle {
|
|||||||
if (flight['GTDT']) {
|
if (flight['GTDT']) {
|
||||||
if (Array.isArray(flight['GTDT']) && flight['GTDT'].length > 0) {
|
if (Array.isArray(flight['GTDT']) && flight['GTDT'].length > 0) {
|
||||||
return timeFormatter(flight['GTDT'][0]['GCTM']);
|
return timeFormatter(flight['GTDT'][0]['GCTM']);
|
||||||
|
} else if (Object.prototype.toString.call(flight['GTDT']) === '[object Object]') {
|
||||||
|
return timeFormatter(flight['GTDT']['GCTM']);
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -28,8 +30,10 @@ export class TransferRenderHandle {
|
|||||||
}
|
}
|
||||||
let set = new Set(abdg);
|
let set = new Set(abdg);
|
||||||
return Array.from(set).join(',');
|
return Array.from(set).join(',');
|
||||||
|
} else if (Object.prototype.toString.call(flight['ABTM']) === '[object Object]') {
|
||||||
|
return flight['ABTM']['ABDG'];
|
||||||
} else {
|
} else {
|
||||||
return ''
|
return '';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
@@ -43,6 +47,13 @@ export class TransferRenderHandle {
|
|||||||
return timeFormatter(flight['ABTM'][i]['AOTM']);
|
return timeFormatter(flight['ABTM'][i]['AOTM']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (Object.prototype.toString.call(flight['ABTM']) === '[object Object]') {
|
||||||
|
if (flight['ABTM']['ABOP'] === 'A') {
|
||||||
|
return timeFormatter(flight['ABTM']['AOTM']);
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -58,6 +69,13 @@ export class TransferRenderHandle {
|
|||||||
return timeFormatter(flight['ABTM'][i]['AOTM']);
|
return timeFormatter(flight['ABTM'][i]['AOTM']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (Object.prototype.toString.call(flight['ABTM']) === '[object Object]') {
|
||||||
|
if (flight['ABTM']['ABOP'] === 'D') {
|
||||||
|
return timeFormatter(flight['ABTM']['AOTM']);
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -74,6 +92,8 @@ export class TransferRenderHandle {
|
|||||||
}
|
}
|
||||||
let set = new Set(belt);
|
let set = new Set(belt);
|
||||||
return Array.from(set).join(',');
|
return Array.from(set).join(',');
|
||||||
|
} else if (Object.prototype.toString.call(flight['CLDT']) === '[object Object]') {
|
||||||
|
return flight['CLDT']['BELT'];
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -90,6 +110,8 @@ export class TransferRenderHandle {
|
|||||||
}
|
}
|
||||||
let set = new Set(chkc);
|
let set = new Set(chkc);
|
||||||
return Array.from(set).join(',');
|
return Array.from(set).join(',');
|
||||||
|
} else if (Object.prototype.toString.call(flight['CKDT']) === '[object Object]') {
|
||||||
|
return flight['CKDT']['CHKC'];
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -101,6 +123,8 @@ export class TransferRenderHandle {
|
|||||||
if (flight['CKDT']) {
|
if (flight['CKDT']) {
|
||||||
if (Array.isArray(flight['CKDT']) && flight['CKDT'].length > 0) {
|
if (Array.isArray(flight['CKDT']) && flight['CKDT'].length > 0) {
|
||||||
return timeFormatter(flight['CKDT'][0]['CCTM']);
|
return timeFormatter(flight['CKDT'][0]['CCTM']);
|
||||||
|
} else if (Object.prototype.toString.call(flight['CKDT']) === '[object Object]') {
|
||||||
|
return timeFormatter(flight['CKDT']['CCTM']);
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -112,6 +136,8 @@ export class TransferRenderHandle {
|
|||||||
if (flight['CKDT']) {
|
if (flight['CKDT']) {
|
||||||
if (Array.isArray(flight['CKDT']) && flight['CKDT'].length > 0) {
|
if (Array.isArray(flight['CKDT']) && flight['CKDT'].length > 0) {
|
||||||
return timeFormatter(flight['CKDT'][0]['COTM']);
|
return timeFormatter(flight['CKDT'][0]['COTM']);
|
||||||
|
} else if (Object.prototype.toString.call(flight['CKDT']) === '[object Object]') {
|
||||||
|
return timeFormatter(flight['CKDT']['COTM']);
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -127,6 +153,12 @@ export class TransferRenderHandle {
|
|||||||
return timeFormatter(flight['CHOT'][i]['CHTM']);
|
return timeFormatter(flight['CHOT'][i]['CHTM']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (Object.prototype.toString.call(flight['CHOT']) === '[object Object]') {
|
||||||
|
if (flight['CHOT']['CHID'] === 'ON') {
|
||||||
|
return timeFormatter(flight['CHOT']['CHTM']);
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -142,6 +174,12 @@ export class TransferRenderHandle {
|
|||||||
return timeFormatter(flight['CHOT'][i]['CHTM']);
|
return timeFormatter(flight['CHOT'][i]['CHTM']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (Object.prototype.toString.call(flight['CHOT']) === '[object Object]') {
|
||||||
|
if (flight['CHOT']['CHID'] === 'OFF') {
|
||||||
|
return timeFormatter(flight['CHOT']['CHTM']);
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -159,12 +197,14 @@ export class TransferRenderHandle {
|
|||||||
public chutFormatter(flight) {
|
public chutFormatter(flight) {
|
||||||
if (flight['CHDT']) {
|
if (flight['CHDT']) {
|
||||||
if (Array.isArray(flight['CHDT']) && flight['CHDT'].length > 0) {
|
if (Array.isArray(flight['CHDT']) && flight['CHDT'].length > 0) {
|
||||||
let chdt = [];
|
let chut = [];
|
||||||
for (let i = 0; i < flight['CHDT'].length; i++) {
|
for (let i = 0; i < flight['CHDT'].length; i++) {
|
||||||
chdt.push(flight['CHDT'][i]['CHUT']);
|
chut.push(flight['CHDT'][i]['CHUT']);
|
||||||
}
|
}
|
||||||
let set = new Set(chdt);
|
let set = new Set(chut);
|
||||||
return Array.from(set).join(',');
|
return Array.from(set).join(',');
|
||||||
|
} else if (Object.prototype.toString.call(flight['CHDT']) === '[object Object]') {
|
||||||
|
return flight['CHDT']['CHUT'];
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -182,12 +222,14 @@ export class TransferRenderHandle {
|
|||||||
public psstFormatter(flight) {
|
public psstFormatter(flight) {
|
||||||
if (flight['PSDT']) {
|
if (flight['PSDT']) {
|
||||||
if (Array.isArray(flight['PSDT']) && flight['PSDT'].length > 0) {
|
if (Array.isArray(flight['PSDT']) && flight['PSDT'].length > 0) {
|
||||||
let chkc = [];
|
let psst = [];
|
||||||
for (let i = 0; i < flight['PSDT'].length; i++) {
|
for (let i = 0; i < flight['PSDT'].length; i++) {
|
||||||
chkc.push(flight['PSDT'][i]['PSST']);
|
psst.push(flight['PSDT'][i]['PSST']);
|
||||||
}
|
}
|
||||||
let set = new Set(chkc);
|
let set = new Set(psst);
|
||||||
return Array.from(set).join(',');
|
return Array.from(set).join(',');
|
||||||
|
} else if (Object.prototype.toString.call(flight['PSDT']) === '[object Object]') {
|
||||||
|
return flight['PSDT']['PSST'];
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -221,6 +263,8 @@ export class TransferRenderHandle {
|
|||||||
erut.push(flight['ERUT'][i]['APCD']);
|
erut.push(flight['ERUT'][i]['APCD']);
|
||||||
}
|
}
|
||||||
return erut.join(' - ');
|
return erut.join(' - ');
|
||||||
|
} else if (Object.prototype.toString.call(flight['ERUT']) === '[object Object]') {
|
||||||
|
return flight['ERUT']['APCD'];
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -257,6 +301,8 @@ export class TransferRenderHandle {
|
|||||||
}
|
}
|
||||||
let set = new Set(gate);
|
let set = new Set(gate);
|
||||||
return Array.from(set).join(',');
|
return Array.from(set).join(',');
|
||||||
|
} else if (Object.prototype.toString.call(flight['GTDT']) === '[object Object]') {
|
||||||
|
return flight['GTDT']['GATE'];
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -271,7 +317,7 @@ export class TransferRenderHandle {
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public fldtFormatter(flight){
|
public fldtFormatter(flight) {
|
||||||
if (flight['SODT']) {
|
if (flight['SODT']) {
|
||||||
return dateWithNotimeFormatter(flight['SODT']);
|
return dateWithNotimeFormatter(flight['SODT']);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user