航班列表可视区域渲染
This commit is contained in:
@@ -3,6 +3,8 @@
|
|||||||
z-index: 22222;
|
z-index: 22222;
|
||||||
margin-top:10px;
|
margin-top:10px;
|
||||||
width:450px;
|
width:450px;
|
||||||
|
height: 174px;
|
||||||
|
overflow: hidden
|
||||||
}
|
}
|
||||||
|
|
||||||
.toast-top-left{
|
.toast-top-left{
|
||||||
@@ -18,7 +20,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.toast-top-right{
|
.toast-top-right{
|
||||||
top:75px;
|
top:45%;
|
||||||
right: 10px
|
right: 10px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<div class="main-page" #mainPage>
|
<div class="main-page" >
|
||||||
<div class="page-content">
|
<div class="page-content" #pageContent>
|
||||||
<div class="search-filter mb-3" #searchFilter>
|
<div class="search-filter mb-3" #searchFilter>
|
||||||
<div class="first-condition row">
|
<div class="first-condition row">
|
||||||
<div class="line-operator-left input-container mb-3 col-xlg-8 col-mlg-8 col-xl-8 col-lg-10">
|
<div class="line-operator-left input-container mb-3 col-xlg-8 col-mlg-8 col-xl-8 col-lg-10">
|
||||||
@@ -26,14 +26,14 @@
|
|||||||
<div [ngClass]="{'filterClose-c':filterClose,'filterClose-o':!filterClose}" class="second-condition mb-3 row">
|
<div [ngClass]="{'filterClose-c':filterClose,'filterClose-o':!filterClose}" class="second-condition mb-3 row">
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">航空公司: </label>
|
<label for="">航空公司: </label>
|
||||||
<select [(ngModel)]="filterItems.ALCD" (ngModelChange)="selectChange()" class="form-control">
|
<select [(ngModel)]="filterItems.ALCD" (ngModelChange)="selectChange('filter')" class="form-control">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option *ngFor="let airline of airlinesSelections" [value]="airline.airlineCodeIata">{{airline.airlineName}}</option>
|
<option *ngFor="let airline of airlinesSelections" [value]="airline.airlineCodeIata">{{airline.airlineName}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">航线类别: </label>
|
<label for="">航线类别: </label>
|
||||||
<select [(ngModel)]="filterItems.FLIN" (ngModelChange)="selectChange()" class="form-control">
|
<select [(ngModel)]="filterItems.FLIN" (ngModelChange)="selectChange('filter')" class="form-control">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option value="D">国内</option>
|
<option value="D">国内</option>
|
||||||
<option value="I">国际</option>
|
<option value="I">国际</option>
|
||||||
@@ -43,14 +43,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">航班类别: </label>
|
<label for="">航班类别: </label>
|
||||||
<select [(ngModel)]="filterItems.FLTY" (ngModelChange)="selectChange()" class="form-control">
|
<select [(ngModel)]="filterItems.FLTY" (ngModelChange)="selectChange('filter')" class="form-control">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option *ngFor="let type of flightTypeSelections" [value]="type.flightTypeCode">{{type.flightTypeNameCn}}</option>
|
<option *ngFor="let type of flightTypeSelections" [value]="type.flightTypeCode">{{type.flightTypeNameCn}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">到达/出发:</label>
|
<label for="">到达/出发:</label>
|
||||||
<select [(ngModel)]="filterItems.MVIN" (ngModelChange)="selectChange()" class="form-control">
|
<select [(ngModel)]="filterItems.MVIN" (ngModelChange)="selectChange('filter')" class="form-control">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option value="A">到达</option>
|
<option value="A">到达</option>
|
||||||
<option value="D">离港</option>
|
<option value="D">离港</option>
|
||||||
@@ -58,21 +58,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">运营状态: </label>
|
<label for="">运营状态: </label>
|
||||||
<select [(ngModel)]="filterItems.FTSS" (ngModelChange)="selectChange()" class="form-control">
|
<select [(ngModel)]="filterItems.FTSS" (ngModelChange)="selectChange('filter')" class="form-control">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option *ngFor="let status of flightStatus" [value]="status.sttc">{{status.stdc}}</option>
|
<option *ngFor="let status of flightStatus" [value]="status.sttc">{{status.stdc}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">航站楼: </label>
|
<label for="">航站楼: </label>
|
||||||
<select [(ngModel)]="filterItems.TRML" (ngModelChange)="selectChange()" class="form-control">
|
<select [(ngModel)]="filterItems.TRML" (ngModelChange)="selectChange('filter')" class="form-control">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option *ngFor="let terminal of terminals" [value]="terminal.terminalCode">{{terminal.terminalName}}</option>
|
<option *ngFor="let terminal of terminals" [value]="terminal.terminalCode">{{terminal.terminalName}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">异常状态: </label>
|
<label for="">异常状态: </label>
|
||||||
<select [(ngModel)]="filterItems.Abnormal_state" (ngModelChange)="selectChange()" class="form-control">
|
<select [(ngModel)]="filterItems.Abnormal_state" (ngModelChange)="selectChange('filter')" class="form-control">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option value="CNCL">取消</option>
|
<option value="CNCL">取消</option>
|
||||||
<option value="DELY">延误</option>
|
<option value="DELY">延误</option>
|
||||||
@@ -82,28 +82,28 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">机坪代理: </label>
|
<label for="">机坪代理: </label>
|
||||||
<select [(ngModel)]="filterItems.FHAG" (ngModelChange)="selectChange()" class="form-control">
|
<select [(ngModel)]="filterItems.FHAG" (ngModelChange)="selectChange('filter')" class="form-control">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option *ngFor="let anget of flightAgents" [value]="anget.oGId">{{anget.flightAgentName}}</option>
|
<option *ngFor="let anget of flightAgents" [value]="anget.oGId">{{anget.flightAgentName}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">旅客代理: </label>
|
<label for="">旅客代理: </label>
|
||||||
<select [(ngModel)]="filterItems.PHAG" (ngModelChange)="selectChange()" class="form-control">
|
<select [(ngModel)]="filterItems.PHAG" (ngModelChange)="selectChange('filter')" class="form-control">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option *ngFor="let anget of flightAgents" [value]="anget.oGId">{{anget.flightAgentName}}</option>
|
<option *ngFor="let anget of flightAgents" [value]="anget.oGId">{{anget.flightAgentName}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">维护代理: </label>
|
<label for="">维护代理: </label>
|
||||||
<select [(ngModel)]="filterItems.MHAG" (ngModelChange)="selectChange()" class="form-control">
|
<select [(ngModel)]="filterItems.MHAG" (ngModelChange)="selectChange('filter')" class="form-control">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option *ngFor="let anget of flightAgents" [value]="anget.oGId">{{anget.flightAgentName}}</option>
|
<option *ngFor="let anget of flightAgents" [value]="anget.oGId">{{anget.flightAgentName}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">前时间段: </label>
|
<label for="">前时间段: </label>
|
||||||
<select [(ngModel)]="filterItems.Start_time" (ngModelChange)="selectChange()" class="form-control">
|
<select [(ngModel)]="filterItems.Start_time" (ngModelChange)="selectChange('filter')" class="form-control">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option value="1">前1小时</option>
|
<option value="1">前1小时</option>
|
||||||
<option value="2">前2小时</option>
|
<option value="2">前2小时</option>
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">后时间段: </label>
|
<label for="">后时间段: </label>
|
||||||
<select [(ngModel)]="filterItems.End_time" (ngModelChange)="selectChange()" class="form-control">
|
<select [(ngModel)]="filterItems.End_time" (ngModelChange)="selectChange('filter')" class="form-control">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option value="1">后1小时</option>
|
<option value="1">后1小时</option>
|
||||||
<option value="2">后2小时</option>
|
<option value="2">后2小时</option>
|
||||||
@@ -164,19 +164,31 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="airline-table">
|
<div class="airline-table">
|
||||||
<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}">
|
||||||
<table id="table" class="table table-bordered table-striped">
|
<div class="table-head" #tableHead>
|
||||||
|
<table class="table">
|
||||||
|
<colgroup>
|
||||||
|
<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">
|
||||||
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>序号</th>
|
<th *ngFor="let common_col of commonCol">{{common_col.COL_CN}}</th>
|
||||||
<th>重要提示</th>
|
|
||||||
<th>航班ID</th>
|
|
||||||
<th *ngFor="let airline_col of render_col_lists">{{airline_col.COL_CN}}</th>
|
<th *ngFor="let airline_col of render_col_lists">{{airline_col.COL_CN}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="table-body" #tableBody (scroll)="handleScroll($event)">
|
||||||
|
<div class="list-view-phantom" [ngStyle]="{ 'height': wait_render_data.length * 42 + 'px' }"></div>
|
||||||
|
<table #tableContent id="table" class="table table-striped">
|
||||||
|
<colgroup>
|
||||||
|
<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">
|
||||||
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let airline_row of render_data;let i = index;last as isLast" (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>{{i+1}}</td>
|
<td>{{start+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="/adminweb/assets/images/important-notes/vip.png"
|
||||||
alt="">
|
alt="">
|
||||||
@@ -197,11 +209,12 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>{{airline_row['renderFlight']['FLID']}}</td>
|
<td>{{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)">{{airline_row['renderFlight'][airline_col.COL_CODE]}}</td>
|
[ngStyle]="getColor(airline_col.COL_CODE,airline_row)" [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 class="airline-message" [ngClass]="{'tab-c': tabClose,'tab-o': !tabClose}">
|
<div 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">
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
.page-content {
|
.page-content {
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
|
height: 100%;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
.search-filter {
|
.search-filter {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -24,7 +25,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.second-condition,.third-condition{
|
.second-condition,
|
||||||
|
.third-condition {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.input-container {
|
.input-container {
|
||||||
@@ -34,37 +36,71 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.filterClose-c{
|
.filterClose-c {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.filterClose-o{
|
.filterClose-o {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.airline-table {
|
.airline-table {
|
||||||
.table-container {
|
.table-container {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
// border: 1px solid #ccc;
|
// position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 700px;
|
// overflow-x: auto;
|
||||||
overflow: auto;
|
overflow-y: hidden;
|
||||||
box-shadow: 0 0 1px 0.5px #ddd;
|
box-shadow: 0 0 1px 0.5px #ddd;
|
||||||
|
.table-head {
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-y: scroll;
|
||||||
|
height: 42px;
|
||||||
table {
|
table {
|
||||||
|
margin: 0;
|
||||||
width: max-content;
|
width: max-content;
|
||||||
tr {
|
|
||||||
cursor: pointer;
|
|
||||||
&.selected {
|
|
||||||
background: rgb(181, 215, 255);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
th {
|
th {
|
||||||
background-color: #ddd;
|
background-color: #ddd;
|
||||||
color: rgb(0, 0, 255);
|
color: rgb(0, 0, 255);
|
||||||
}
|
}
|
||||||
// th,td{
|
}
|
||||||
// // border: none;
|
&::-webkit-scrollbar {
|
||||||
// // text-align: center;
|
width: 15px;
|
||||||
// }
|
height: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-body {
|
||||||
|
position: relative;
|
||||||
|
// height: 600px;
|
||||||
|
overflow: auto;
|
||||||
|
width: 100%;
|
||||||
|
.list-view-phantom {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
position: absolute;
|
||||||
|
width: max-content;
|
||||||
|
tr {
|
||||||
|
cursor: pointer;
|
||||||
|
height: 42px;
|
||||||
|
&.selected {
|
||||||
|
background: rgb(181, 215, 255);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
border: none;
|
||||||
|
// text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
width: 15px;
|
width: 15px;
|
||||||
@@ -80,6 +116,7 @@
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.airline-message {
|
.airline-message {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
// box-shadow: 0 0 1px .5px #ddd;
|
// box-shadow: 0 0 1px .5px #ddd;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { Component, OnInit, ViewChild, Renderer2 } from '@angular/core';
|
import { Component, OnInit, ViewChild, Renderer2 } from '@angular/core';
|
||||||
import { ChangeDetectorRef } from '@angular/core';
|
|
||||||
import { NavigationEnd, Router } from '@angular/router';
|
import { NavigationEnd, Router } from '@angular/router';
|
||||||
|
|
||||||
import { ToastService } from '../../components/toast/toast.service';
|
import { ToastService } from '../../components/toast/toast.service';
|
||||||
@@ -32,12 +31,10 @@ export class MainComponent implements OnInit {
|
|||||||
private basicDataService: BasicDataService,
|
private basicDataService: BasicDataService,
|
||||||
private operateSpinServiceService: OperateSpinServiceService,
|
private operateSpinServiceService: OperateSpinServiceService,
|
||||||
private httpCilent: HttpClientService,
|
private httpCilent: HttpClientService,
|
||||||
private changeDetectorRef: ChangeDetectorRef,
|
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private websocketService: WebsocketService
|
private websocketService: WebsocketService
|
||||||
) {
|
) {
|
||||||
this.operateSpinServiceService.showSpin();
|
this.operateSpinServiceService.showSpin();
|
||||||
this.changeDetectorRef.detach();
|
|
||||||
// this.router.events.pipe(
|
// this.router.events.pipe(
|
||||||
// filter((event => event instanceof NavigationEnd))
|
// filter((event => event instanceof NavigationEnd))
|
||||||
// ).subscribe(
|
// ).subscribe(
|
||||||
@@ -56,7 +53,6 @@ export class MainComponent implements OnInit {
|
|||||||
// this.airline_message_alert = JSON.parse(element.settingContent).targetList;
|
// this.airline_message_alert = JSON.parse(element.settingContent).targetList;
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
// this.changeDetectorRef.detectChanges();
|
|
||||||
// // this.operateSpinServiceService.hideSpin();
|
// // this.operateSpinServiceService.hideSpin();
|
||||||
// }
|
// }
|
||||||
// )
|
// )
|
||||||
@@ -91,8 +87,10 @@ export class MainComponent implements OnInit {
|
|||||||
|
|
||||||
public raw_data: Array<object> = []; //原始数据,未经过任何转换和组合
|
public raw_data: Array<object> = []; //原始数据,未经过任何转换和组合
|
||||||
public combined_data: Array<object> = []; //组合数据,即链接航班,显示信息等组合好之后的数据
|
public combined_data: Array<object> = []; //组合数据,即链接航班,显示信息等组合好之后的数据
|
||||||
|
public wait_render_data: Array<object> = [];
|
||||||
public render_data: Array<object> = []; //显示数据,即需要显示的数据
|
public render_data: 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>;
|
||||||
|
|
||||||
@@ -108,9 +106,12 @@ export class MainComponent implements OnInit {
|
|||||||
'guarantee': false
|
'guarantee': false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ViewChild('mainPage') mainPage;
|
@ViewChild('pageContent') pageContent;
|
||||||
@ViewChild('searchFilter') searchFilter;
|
@ViewChild('searchFilter') searchFilter;
|
||||||
@ViewChild('tableContainer') tableContainer;
|
@ViewChild('tableContainer') tableContainer;
|
||||||
|
@ViewChild('tableHead') tableHead;
|
||||||
|
@ViewChild('tableBody') tableBody;
|
||||||
|
@ViewChild('tableContent') tableContent;
|
||||||
|
|
||||||
trItemHeight: number = 42;
|
trItemHeight: number = 42;
|
||||||
start: number = 0;
|
start: number = 0;
|
||||||
@@ -120,9 +121,10 @@ export class MainComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.renderer2.setStyle(this.tableContainer.nativeElement, 'height', this.mainPage.nativeElement.offsetHeight - this.searchFilter.nativeElement.offsetHeight - 55 + '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');
|
||||||
window.onresize = function () {
|
window.onresize = function () {
|
||||||
this.renderer2.setStyle(this.tableContainer.nativeElement, 'height', this.mainPage.nativeElement.offsetHeight - this.searchFilter.nativeElement.offsetHeight - 55 + 'px');
|
this.calcVisibleCount();
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
|
|
||||||
//订阅航班更新
|
//订阅航班更新
|
||||||
@@ -152,6 +154,11 @@ export class MainComponent implements OnInit {
|
|||||||
|
|
||||||
this.httpCilent.get('/adminapi/settings/uisettings').subscribe(
|
this.httpCilent.get('/adminapi/settings/uisettings').subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
this.commonCol = [
|
||||||
|
{ "COL_CODE": "NO", "COL_CN": "序号", "COL_WIDTH": "55px" },
|
||||||
|
{ "COL_CODE": "IMPT", "COL_CN": "重要提示", "COL_WIDTH": "120px" },
|
||||||
|
{ "COL_CODE": "FLID", "COL_CN": "航班ID", "COL_WIDTH": "165px" }
|
||||||
|
]
|
||||||
data.body.forEach(element => {
|
data.body.forEach(element => {
|
||||||
if (element.groupCode === 'userSettingCol') {
|
if (element.groupCode === 'userSettingCol') {
|
||||||
this.col_lists = JSON.parse(element.settingContent).defaultData;
|
this.col_lists = JSON.parse(element.settingContent).defaultData;
|
||||||
@@ -162,8 +169,6 @@ export class MainComponent implements OnInit {
|
|||||||
this.airline_message_alert = JSON.parse(element.settingContent).targetList;
|
this.airline_message_alert = JSON.parse(element.settingContent).targetList;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
//获取航班动态信息
|
//获取航班动态信息
|
||||||
this.httpCilent.get('/msgexchangeapi/all/flights').subscribe(
|
this.httpCilent.get('/msgexchangeapi/all/flights').subscribe(
|
||||||
@@ -226,21 +231,178 @@ export class MainComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
//固定表头
|
|
||||||
var tableCont = document.querySelector('#table-container')
|
|
||||||
function scrollHandle() {
|
|
||||||
var scrollTop = this.scrollTop;
|
|
||||||
this.querySelector('thead').style.transform = 'translateY(' + scrollTop + 'px)';
|
|
||||||
}
|
}
|
||||||
tableCont.addEventListener('scroll', scrollHandle)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据组合完毕,执行排序、渲染以及动态信息处理
|
||||||
|
* @param combined_data
|
||||||
|
*/
|
||||||
|
doSequence(combined_data) {
|
||||||
|
this.raw_data.forEach(element => {
|
||||||
|
if (this.airlinesSelections.findIndex(airline => airline.airlineCodeIata === element['ALCD']) === -1) {
|
||||||
|
let index = this.airlines.findIndex(val => val.airlineCodeIata === element['ALCD']);
|
||||||
|
this.airlinesSelections.push(this.airlines[index]);
|
||||||
|
}
|
||||||
|
if (this.flightTypeSelections.findIndex(flightType => flightType.flightTypeCode === element['FLTY']) === -1) {
|
||||||
|
let index = this.flightTypes.findIndex(val => val.flightTypeCode === element['FLTY']);
|
||||||
|
this.flightTypeSelections.push(this.flightTypes[index]);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
combined_data.forEach(element => {
|
||||||
|
element['ORDER'] = this.orderHandle.sequence(element);
|
||||||
|
})
|
||||||
|
combined_data.sort(function (a, b) {
|
||||||
|
return (a['ORDER'] - b['ORDER']);
|
||||||
|
})
|
||||||
|
|
||||||
|
this.wait_render_data = combined_data;
|
||||||
|
|
||||||
|
this.visibleCount = Math.ceil(this.tableBody.nativeElement.clientHeight / this.trItemHeight);
|
||||||
|
const scrollTop = this.tableBody.nativeElement.scrollTop;
|
||||||
|
const fixedScrollTop = scrollTop - scrollTop % this.trItemHeight;
|
||||||
|
this.tableContent.nativeElement.style.webkitTransform = `translateY(${fixedScrollTop}px)`;
|
||||||
|
this.start = Math.floor(scrollTop / this.trItemHeight);
|
||||||
|
this.end = this.start + this.visibleCount;
|
||||||
|
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
||||||
|
setTimeout(()=>{
|
||||||
|
$(".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')
|
||||||
|
})
|
||||||
|
},500)
|
||||||
|
|
||||||
|
this.row_state = this.render_data.length > 0 ? this.render_data[0] : { renderFlight: {} };
|
||||||
|
this.operateSpinServiceService.hideSpin();
|
||||||
|
|
||||||
|
//开始处理动态消息
|
||||||
|
this.canHandleDynamicMessage = true;
|
||||||
|
this.dynamicMessageArray.forEach(message => {
|
||||||
|
this.dynamicMessageHandle(message);
|
||||||
|
})
|
||||||
|
this.canHandleDynamicAlert = true;
|
||||||
|
this.dynamicAlertArray.forEach(message => {
|
||||||
|
this.dynamicAlertHandle(message);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纵向滚动条滚动渲染数据
|
||||||
|
*/
|
||||||
|
handleScroll() {
|
||||||
|
const scrollTop = this.tableBody.nativeElement.scrollTop;
|
||||||
|
$(".table-head").scrollLeft($('.table-body').scrollLeft());
|
||||||
|
const fixedScrollTop = scrollTop - scrollTop % this.trItemHeight;
|
||||||
|
this.tableContent.nativeElement.style.webkitTransform = `translateY(${fixedScrollTop - 42}px)`;
|
||||||
|
this.start = Math.floor(scrollTop / this.trItemHeight);
|
||||||
|
this.end = this.start + this.visibleCount;
|
||||||
|
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
||||||
|
setTimeout(()=>{
|
||||||
|
$(".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')
|
||||||
|
})
|
||||||
|
},500)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算可视区域数据的渲染
|
||||||
|
*/
|
||||||
|
calcVisibleCount() {
|
||||||
|
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.visibleCount = Math.ceil(this.tableBody.nativeElement.clientHeight / this.trItemHeight);
|
||||||
|
const scrollTop = this.tableBody.nativeElement.scrollTop;
|
||||||
|
const fixedScrollTop = scrollTop - scrollTop % this.trItemHeight;
|
||||||
|
this.tableContent.nativeElement.style.webkitTransform = `translateY(${fixedScrollTop}px)`;
|
||||||
|
this.start = Math.floor(scrollTop / this.trItemHeight);
|
||||||
|
this.end = this.start + this.visibleCount;
|
||||||
|
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
||||||
|
setTimeout(()=>{
|
||||||
|
$(".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')
|
||||||
|
})
|
||||||
|
},500)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展开/关闭过滤条件
|
||||||
|
*/
|
||||||
public filterClose: boolean = true;
|
public filterClose: boolean = true;
|
||||||
toggleFilter() {
|
toggleFilter() {
|
||||||
this.filterClose = !this.filterClose;
|
this.filterClose = !this.filterClose;
|
||||||
this.changeDetectorRef.detectChanges();
|
setTimeout(() => {
|
||||||
this.renderer2.setStyle(this.tableContainer.nativeElement, 'height', this.mainPage.nativeElement.offsetHeight - this.searchFilter.nativeElement.offsetHeight - 55 + 'px');
|
this.calcVisibleCount();
|
||||||
|
}, 10)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 刷新
|
||||||
|
*/
|
||||||
|
refresh() {
|
||||||
|
this.operateSpinServiceService.showSpin();
|
||||||
|
this.canHandleDynamicMessage = false;
|
||||||
|
this.canHandleDynamicAlert = false;
|
||||||
|
this.SEARCH = ''; //手动输入条件
|
||||||
|
this.LASTSEARCH = '';
|
||||||
|
this.FLT_POS = 1; //过滤还是定位
|
||||||
|
this.SEL_COL = ''; //选择列名
|
||||||
|
this.LAST_SEL_COL = '';
|
||||||
|
this.filterItems = {
|
||||||
|
ALCD: '', //航空公司
|
||||||
|
FLIN: '', //航线类别
|
||||||
|
FLTY: '', //航班类别
|
||||||
|
MVIN: '', //到达/出发
|
||||||
|
FTSS: '', //运营状态
|
||||||
|
TRML: '', //航站楼
|
||||||
|
Abnormal_state: '', //异常状态
|
||||||
|
// Start_time: '9',
|
||||||
|
// End_time: '9',
|
||||||
|
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).defaultData;
|
||||||
|
this.render_col_lists = JSON.parse(element.settingContent).targetList;
|
||||||
|
} else if (element.groupCode === 'userSettingColor') {
|
||||||
|
this.airline_color = JSON.parse(element.settingContent);
|
||||||
|
} else if (element.groupCode === 'userSettingMsgAlert') {
|
||||||
|
this.airline_message_alert = JSON.parse(element.settingContent).targetList;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
)
|
||||||
|
//获取航班动态信息
|
||||||
|
this.httpCilent.get('/msgexchangeapi/all/flights').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);
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -285,28 +447,29 @@ export class MainComponent implements OnInit {
|
|||||||
this.flightTypeSelections.push(this.flightTypes[index]);
|
this.flightTypeSelections.push(this.flightTypes[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
let dynamicHandleData = this.dataHandle.dynamicMessageHandle(
|
this.selectChange('dynamic');
|
||||||
message,
|
|
||||||
this.render_data,
|
|
||||||
this.col_lists,
|
|
||||||
this.filterItems,
|
|
||||||
this.LASTSEARCH,
|
|
||||||
this.LAST_SEL_COL,
|
|
||||||
this.airports,
|
|
||||||
this.citys,
|
|
||||||
this.airlines,
|
|
||||||
this.flightStatus,
|
|
||||||
this.flightTypes
|
|
||||||
)
|
|
||||||
this.render_data = dynamicHandleData.render_data;
|
|
||||||
|
|
||||||
this.render_data.forEach(element => {
|
// let dynamicHandleData = this.dataHandle.dynamicMessageHandle(
|
||||||
element['ORDER'] = this.orderHandle.sequence(element);
|
// message,
|
||||||
})
|
// this.render_data,
|
||||||
this.render_data = this.render_data.sort(function (a, b) {
|
// this.col_lists,
|
||||||
return (a['ORDER'] - b['ORDER']);
|
// this.filterItems,
|
||||||
})
|
// this.LASTSEARCH,
|
||||||
this.changeDetectorRef.detectChanges();
|
// this.LAST_SEL_COL,
|
||||||
|
// this.airports,
|
||||||
|
// this.citys,
|
||||||
|
// this.airlines,
|
||||||
|
// this.flightStatus,
|
||||||
|
// this.flightTypes
|
||||||
|
// )
|
||||||
|
// this.render_data = dynamicHandleData.render_data;
|
||||||
|
|
||||||
|
// this.render_data.forEach(element => {
|
||||||
|
// element['ORDER'] = this.orderHandle.sequence(element);
|
||||||
|
// })
|
||||||
|
// this.render_data = this.render_data.sort(function (a, b) {
|
||||||
|
// return (a['ORDER'] - b['ORDER']);
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -346,118 +509,6 @@ export class MainComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据组合完毕,执行排序、渲染以及动态信息处理
|
|
||||||
* @param combined_data
|
|
||||||
*/
|
|
||||||
doSequence(combined_data) {
|
|
||||||
this.raw_data.forEach(element => {
|
|
||||||
if (this.airlinesSelections.findIndex(airline => airline.airlineCodeIata === element['ALCD']) === -1) {
|
|
||||||
let index = this.airlines.findIndex(val => val.airlineCodeIata === element['ALCD']);
|
|
||||||
this.airlinesSelections.push(this.airlines[index]);
|
|
||||||
}
|
|
||||||
if (this.flightTypeSelections.findIndex(flightType => flightType.flightTypeCode === element['FLTY']) === -1) {
|
|
||||||
let index = this.flightTypes.findIndex(val => val.flightTypeCode === element['FLTY']);
|
|
||||||
this.flightTypeSelections.push(this.flightTypes[index]);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
combined_data.forEach(element => {
|
|
||||||
element['ORDER'] = this.orderHandle.sequence(element);
|
|
||||||
})
|
|
||||||
combined_data.sort(function (a, b) {
|
|
||||||
return (a['ORDER'] - b['ORDER']);
|
|
||||||
})
|
|
||||||
|
|
||||||
// this.visibleCount = Math.ceil(this.tableContainer.nativeElement.clientHeight / this.trItemHeight);
|
|
||||||
// this.start = 0;
|
|
||||||
// this.end = this.start + this.visibleCount;
|
|
||||||
// this.render_data = this.combined_data.slice(this.start,this.end);
|
|
||||||
|
|
||||||
|
|
||||||
this.render_data = combined_data;
|
|
||||||
this.row_state = this.render_data.length > 0 ? this.render_data[0] : { renderFlight: {} };
|
|
||||||
this.selectChange();
|
|
||||||
// this.changeDetectorRef.detectChanges();
|
|
||||||
// this.operateSpinServiceService.hideSpin();
|
|
||||||
|
|
||||||
//开始处理动态消息
|
|
||||||
this.canHandleDynamicMessage = true;
|
|
||||||
this.dynamicMessageArray.forEach(message => {
|
|
||||||
this.dynamicMessageHandle(message);
|
|
||||||
})
|
|
||||||
this.canHandleDynamicAlert = true;
|
|
||||||
this.dynamicAlertArray.forEach(message => {
|
|
||||||
this.dynamicAlertHandle(message);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 刷新
|
|
||||||
*/
|
|
||||||
refresh() {
|
|
||||||
this.operateSpinServiceService.showSpin();
|
|
||||||
this.canHandleDynamicMessage = false;
|
|
||||||
this.canHandleDynamicAlert = false;
|
|
||||||
this.SEARCH = ''; //手动输入条件
|
|
||||||
this.LASTSEARCH = '';
|
|
||||||
this.FLT_POS = 1; //过滤还是定位
|
|
||||||
this.SEL_COL = ''; //选择列名
|
|
||||||
this.LAST_SEL_COL = '';
|
|
||||||
this.filterItems = {
|
|
||||||
ALCD: '', //航空公司
|
|
||||||
FLIN: '', //航线类别
|
|
||||||
FLTY: '', //航班类别
|
|
||||||
MVIN: '', //到达/出发
|
|
||||||
FTSS: '', //运营状态
|
|
||||||
TRML: '', //航站楼
|
|
||||||
Abnormal_state: '', //异常状态
|
|
||||||
Start_time: '9',
|
|
||||||
End_time: '9',
|
|
||||||
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).defaultData;
|
|
||||||
this.render_col_lists = JSON.parse(element.settingContent).targetList;
|
|
||||||
} else if (element.groupCode === 'userSettingColor') {
|
|
||||||
this.airline_color = JSON.parse(element.settingContent);
|
|
||||||
} else if (element.groupCode === 'userSettingMsgAlert') {
|
|
||||||
this.airline_message_alert = JSON.parse(element.settingContent).targetList;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
)
|
|
||||||
//获取航班动态信息
|
|
||||||
this.httpCilent.get('/msgexchangeapi/all/flights').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);
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -478,8 +529,8 @@ export class MainComponent implements OnInit {
|
|||||||
FTSS: '', //运营状态
|
FTSS: '', //运营状态
|
||||||
TRML: '', //航站楼
|
TRML: '', //航站楼
|
||||||
Abnormal_state: '', //异常状态
|
Abnormal_state: '', //异常状态
|
||||||
Start_time: '9',
|
// Start_time: '',
|
||||||
End_time: '9',
|
// End_time: '',
|
||||||
FHAG: '', //机坪代理
|
FHAG: '', //机坪代理
|
||||||
MHAG: '', //维护代理
|
MHAG: '', //维护代理
|
||||||
PHAG: '', //旅客代理
|
PHAG: '', //旅客代理
|
||||||
@@ -490,7 +541,9 @@ export class MainComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
inputEnter() {
|
inputEnter() {
|
||||||
if (this.FLT_POS === 1) {
|
if (this.FLT_POS === 1) {
|
||||||
this.selectChange()
|
this.LAST_SEL_COL = this.SEL_COL;
|
||||||
|
this.LASTSEARCH = this.SEARCH;
|
||||||
|
this.selectChange('filter')
|
||||||
} else {
|
} else {
|
||||||
this.inputPosition(this.render_data)
|
this.inputPosition(this.render_data)
|
||||||
}
|
}
|
||||||
@@ -499,9 +552,11 @@ export class MainComponent implements OnInit {
|
|||||||
/**
|
/**
|
||||||
* 下拉框选择筛选
|
* 下拉框选择筛选
|
||||||
*/
|
*/
|
||||||
selectChange() {
|
selectChange(type) {
|
||||||
|
if (type === 'filter') {
|
||||||
this.operateSpinServiceService.showSpin();
|
this.operateSpinServiceService.showSpin();
|
||||||
setTimeout(() => {
|
}
|
||||||
|
// setTimeout(() => {
|
||||||
let filter_data = [];
|
let filter_data = [];
|
||||||
let filterItems = this.filterItems;
|
let filterItems = this.filterItems;
|
||||||
this.combined_data.forEach(item => {
|
this.combined_data.forEach(item => {
|
||||||
@@ -703,12 +758,18 @@ export class MainComponent implements OnInit {
|
|||||||
if (this.FLT_POS === 1) {
|
if (this.FLT_POS === 1) {
|
||||||
this.inputFilter(filter_data);
|
this.inputFilter(filter_data);
|
||||||
} else {
|
} else {
|
||||||
this.render_data = filter_data;
|
this.wait_render_data = filter_data;
|
||||||
|
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
||||||
|
setTimeout(()=>{
|
||||||
|
$(".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')
|
||||||
|
})
|
||||||
|
},500)
|
||||||
|
// 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.changeDetectorRef.detectChanges();
|
|
||||||
this.operateSpinServiceService.hideSpin();
|
this.operateSpinServiceService.hideSpin();
|
||||||
}
|
}
|
||||||
}, 10)
|
// }, 10)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -716,11 +777,9 @@ export class MainComponent implements OnInit {
|
|||||||
* @param filterData
|
* @param filterData
|
||||||
*/
|
*/
|
||||||
inputFilter(filterData) {
|
inputFilter(filterData) {
|
||||||
this.LAST_SEL_COL = this.SEL_COL;
|
if (this.LASTSEARCH) {
|
||||||
this.LASTSEARCH = this.SEARCH;
|
if (this.LAST_SEL_COL) {
|
||||||
if (this.SEARCH) {
|
let sel_col = this.LAST_SEL_COL;
|
||||||
if (this.SEL_COL) {
|
|
||||||
let sel_col = this.SEL_COL;
|
|
||||||
filterData = filterData.filter(item => {
|
filterData = filterData.filter(item => {
|
||||||
if (item['renderFlight'][sel_col]) {
|
if (item['renderFlight'][sel_col]) {
|
||||||
if (item['renderFlight'][sel_col].toString().match(new RegExp(this.SEARCH, 'i'))) {
|
if (item['renderFlight'][sel_col].toString().match(new RegExp(this.SEARCH, 'i'))) {
|
||||||
@@ -753,9 +812,15 @@ export class MainComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.render_data = filterData;
|
this.wait_render_data = filterData;
|
||||||
|
this.render_data = this.wait_render_data.slice(this.start, this.end);
|
||||||
|
setTimeout(()=>{
|
||||||
|
$(".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')
|
||||||
|
})
|
||||||
|
},500)
|
||||||
|
// 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.changeDetectorRef.detectChanges();
|
|
||||||
this.operateSpinServiceService.hideSpin();
|
this.operateSpinServiceService.hideSpin();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -819,8 +884,6 @@ export class MainComponent implements OnInit {
|
|||||||
alert('没有搜索到相关数据');
|
alert('没有搜索到相关数据');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.changeDetectorRef.detectChanges();
|
|
||||||
|
|
||||||
let tr = $(".selected");
|
let tr = $(".selected");
|
||||||
let objTr = tr[0];
|
let objTr = tr[0];
|
||||||
if (objTr) {
|
if (objTr) {
|
||||||
@@ -835,7 +898,6 @@ export class MainComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
selectRow(i) {
|
selectRow(i) {
|
||||||
this.row_state = i;
|
this.row_state = i;
|
||||||
this.changeDetectorRef.detectChanges();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1099,14 +1161,12 @@ export class MainComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.changeDetectorRef.detectChanges()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tab项切换事件
|
* tab项切换事件
|
||||||
*/
|
*/
|
||||||
nzClick() {
|
nzClick() {
|
||||||
this.changeDetectorRef.detectChanges();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+173
-174
@@ -8,76 +8,76 @@ declare var jQuery: any;
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'app-personal-settings',
|
selector: 'app-personal-settings',
|
||||||
templateUrl: './personal-settings.component.html',
|
templateUrl: './personal-settings.component.html',
|
||||||
styleUrls: ['./personal-settings.component.scss','../../main.scss'],
|
styleUrls: ['./personal-settings.component.scss', '../../main.scss'],
|
||||||
providers:[HttpClientService]
|
providers: [HttpClientService]
|
||||||
})
|
})
|
||||||
export class PersonalSettingsComponent implements OnInit {
|
export class PersonalSettingsComponent implements OnInit {
|
||||||
public list: any[] = []; //原始数据项
|
public list: any[] = []; //原始数据项
|
||||||
public sourceList: any[] = []; //临时数据项-可选项
|
public sourceList: any[] = []; //临时数据项-可选项
|
||||||
public targetList:any=[]; //临时数据项-已选项
|
public targetList: any = []; //临时数据项-已选项
|
||||||
public disableRight:any=true; //单个右移控制按钮可选状态 true 禁止选择 false可选择
|
public disableRight: any = true; //单个右移控制按钮可选状态 true 禁止选择 false可选择
|
||||||
public disabledLeft:any=true; //单个左移控制按钮可选状态 true 禁止选择 false可选择
|
public disabledLeft: any = true; //单个左移控制按钮可选状态 true 禁止选择 false可选择
|
||||||
public disableUp:any=true; //上移控制按钮可选状态 true 禁止选择 false可选择
|
public disableUp: any = true; //上移控制按钮可选状态 true 禁止选择 false可选择
|
||||||
public disableDown:any=true; //下移控制按钮可选状态 true 禁止选择 false可选择
|
public disableDown: any = true; //下移控制按钮可选状态 true 禁止选择 false可选择
|
||||||
public disabledUpTop:any=true; //置顶控制按钮可选状态 true 禁止选择 false可选择
|
public disabledUpTop: any = true; //置顶控制按钮可选状态 true 禁止选择 false可选择
|
||||||
public disabledDownBtm:any=true; //最低控制按钮可选状态 true 禁止选择 false可选择
|
public disabledDownBtm: any = true; //最低控制按钮可选状态 true 禁止选择 false可选择
|
||||||
public selectedType:any=''; //当前选中项所在项目 1在可选项 2在已选项框
|
public selectedType: any = ''; //当前选中项所在项目 1在可选项 2在已选项框
|
||||||
public moveIndex:any='false';
|
public moveIndex: any = 'false';
|
||||||
public search:any={
|
public search: any = {
|
||||||
page_index:'1',
|
page_index: '1',
|
||||||
page_size:'10',
|
page_size: '10',
|
||||||
role_name:'',
|
role_name: '',
|
||||||
}
|
}
|
||||||
public defaultCols:any=[]; //默认的全部列
|
public defaultCols: any = []; //默认的全部列
|
||||||
public colsData:any='';
|
public colsData: any = '';
|
||||||
isLoadingSave:any=false;
|
isLoadingSave: any = false;
|
||||||
statusParamsData:any={ //获取接口的状态,0请求失败 1请求前 2请求中 3请求成功,有数据 4请求成功,无数据
|
statusParamsData: any = { //获取接口的状态,0请求失败 1请求前 2请求中 3请求成功,有数据 4请求成功,无数据
|
||||||
status:1,
|
status: 1,
|
||||||
}
|
}
|
||||||
constructor(
|
constructor(
|
||||||
private http:HttpClientService,
|
private http: HttpClientService,
|
||||||
private message: NzMessageService,
|
private message: NzMessageService,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// 页面监听 动态改变表单高度
|
// 页面监听 动态改变表单高度
|
||||||
$('#main-box').css('height',(document.documentElement.clientHeight-106+'px'));
|
$('#main-box').css('height', (document.documentElement.clientHeight - 106 + 'px'));
|
||||||
$(window).resize(function(){
|
$(window).resize(function () {
|
||||||
$('#main-box').css('height',(document.documentElement.clientHeight-106+'px'));
|
$('#main-box').css('height', (document.documentElement.clientHeight - 106 + 'px'));
|
||||||
})
|
})
|
||||||
//this.list=[{"COL_CODE":"FLNO", "COL_CN":"航班号", "COL_ORDER":"10"}, {"COL_CODE":"ALCD", "COL_CN":"航空公司", "COL_ORDER":"8"}, {"COL_CODE":"FLIN", "COL_CN":"航线类别", "COL_ORDER":"4"}, {"COL_CODE":"FLTY", "COL_CN":"航班类别", "COL_ORDER":"5"}, {"COL_CODE":"MVIN", "COL_CN":"航向指示", "COL_ORDER":"9"}, {"COL_CODE":"TRML", "COL_CN":"候机楼", "COL_ORDER":"7"}, {"COL_CODE":"RENO", "COL_CN":"飞机号", "COL_ORDER":"3"}, {"COL_CODE":"SODT", "COL_CN":"计划到达/出发", "COL_ORDER":"13"}, {"COL_CODE":"ESTT", "COL_CN":"预计到达/出发", "COL_ORDER":"14"}, {"COL_CODE":"ACTT", "COL_CN":"实际到达/出发", "COL_ORDER":"15"}, {"COL_CODE":"STND", "COL_CN":"停机位", "COL_ORDER":"16"}, {"COL_CODE":"ORDER", "COL_CN":"排序", "COL_ORDER":"17"} ]
|
//this.list=[{"COL_CODE":"FLNO", "COL_CN":"航班号", "COL_ORDER":"10"}, {"COL_CODE":"ALCD", "COL_CN":"航空公司", "COL_ORDER":"8"}, {"COL_CODE":"FLIN", "COL_CN":"航线类别", "COL_ORDER":"4"}, {"COL_CODE":"FLTY", "COL_CN":"航班类别", "COL_ORDER":"5"}, {"COL_CODE":"MVIN", "COL_CN":"航向指示", "COL_ORDER":"9"}, {"COL_CODE":"TRML", "COL_CN":"候机楼", "COL_ORDER":"7"}, {"COL_CODE":"RENO", "COL_CN":"飞机号", "COL_ORDER":"3"}, {"COL_CODE":"SODT", "COL_CN":"计划到达/出发", "COL_ORDER":"13"}, {"COL_CODE":"ESTT", "COL_CN":"预计到达/出发", "COL_ORDER":"14"}, {"COL_CODE":"ACTT", "COL_CN":"实际到达/出发", "COL_ORDER":"15"}, {"COL_CODE":"STND", "COL_CN":"停机位", "COL_ORDER":"16"}, {"COL_CODE":"ORDER", "COL_CN":"排序", "COL_ORDER":"17"} ]
|
||||||
this.defaultCols=[
|
this.defaultCols = [
|
||||||
{"COL_CODE":"ACFT", "COL_CN":"机型", "COL_ORDER":"1"},
|
{ "COL_CODE": "ACFT", "COL_CN": "机型", "COL_ORDER": "1", "COL_WIDTH": "85px" },
|
||||||
{"COL_CODE":"GCTM", "COL_CN":"登机结束", "COL_ORDER":"2"},
|
{ "COL_CODE": "GCTM", "COL_CN": "登机结束", "COL_ORDER": "2", "COL_WIDTH": "85px" },
|
||||||
{"COL_CODE":"BOTM", "COL_CN":"登机开始", "COL_ORDER":"3"},
|
{ "COL_CODE": "BOTM", "COL_CN": "登机开始", "COL_ORDER": "3", "COL_WIDTH": "85px" },
|
||||||
{"COL_CODE":"ABDG", "COL_CN":"登机桥", "COL_ORDER":"4"},
|
{ "COL_CODE": "ABDG", "COL_CN": "登机桥", "COL_ORDER": "4", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"AOTM_D", "COL_CN":"撤桥时间", "COL_ORDER":"5"},
|
{ "COL_CODE": "AOTM_D", "COL_CN": "撤桥时间", "COL_ORDER": "5", "COL_WIDTH": "85px" },
|
||||||
{"COL_CODE":"AOTM_A", "COL_CN":"靠桥时间", "COL_ORDER":"6"},
|
{ "COL_CODE": "AOTM_A", "COL_CN": "靠桥时间", "COL_ORDER": "6", "COL_WIDTH": "85px" },
|
||||||
{"COL_CODE":"BELT", "COL_CN":"转盘号", "COL_ORDER":"7"},
|
{ "COL_CODE": "BELT", "COL_CN": "转盘号", "COL_ORDER": "7", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"CHKC", "COL_CN":"值机柜台", "COL_ORDER":"8"},
|
{ "COL_CODE": "CHKC", "COL_CN": "值机柜台", "COL_ORDER": "8", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"CCTM", "COL_CN":"值机结束", "COL_ORDER":"9"},
|
{ "COL_CODE": "CCTM", "COL_CN": "值机结束", "COL_ORDER": "9", "COL_WIDTH": "85px" },
|
||||||
{"COL_CODE":"COTM", "COL_CN":"值机开始", "COL_ORDER":"10"},
|
{ "COL_CODE": "COTM", "COL_CN": "值机开始", "COL_ORDER": "10", "COL_WIDTH": "85px" },
|
||||||
{"COL_CODE":"CHTM_OFF", "COL_CN":"下轮挡", "COL_ORDER":"11"},
|
{ "COL_CODE": "CHTM_OFF", "COL_CN": "下轮挡", "COL_ORDER": "11", "COL_WIDTH": "85px" },
|
||||||
{"COL_CODE":"CHTM_ON", "COL_CN":"上轮挡", "COL_ORDER":"12"},
|
{ "COL_CODE": "CHTM_ON", "COL_CN": "上轮挡", "COL_ORDER": "12", "COL_WIDTH": "85px" },
|
||||||
{"COL_CODE":"LACL", "COL_CN":"最后通知时间", "COL_ORDER":"13"},
|
{ "COL_CODE": "LACL", "COL_CN": "最后通知时间", "COL_ORDER": "13", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"CHUT", "COL_CN":"行李传送带", "COL_ORDER":"14"},
|
{ "COL_CODE": "CHUT", "COL_CN": "行李传送带", "COL_ORDER": "14", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"RENO", "COL_CN":"飞机号", "COL_ORDER":"15"},
|
{ "COL_CODE": "RENO", "COL_CN": "飞机号", "COL_ORDER": "15", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"ALCD", "COL_CN":"航空公司", "COL_ORDER":"16"},
|
{ "COL_CODE": "ALCD", "COL_CN": "航空公司", "COL_ORDER": "16", "COL_WIDTH": "185px" },
|
||||||
{"COL_CODE":"ACTT", "COL_CN":"实际到达/出发", "COL_ORDER":"17"},
|
{ "COL_CODE": "ACTT", "COL_CN": "实际到达/出发", "COL_ORDER": "17", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"PSST", "COL_CN":"计划机位", "COL_ORDER":"18"},
|
{ "COL_CODE": "PSST", "COL_CN": "计划机位", "COL_ORDER": "18", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"ESTT", "COL_CN":"预计到达/出发 ", "COL_ORDER":"19"},
|
{ "COL_CODE": "ESTT", "COL_CN": "预计到达/出发 ", "COL_ORDER": "19", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"MVIN", "COL_CN":"到达/出发", "COL_ORDER":"20"},
|
{ "COL_CODE": "MVIN", "COL_CN": "到达/出发", "COL_ORDER": "20", "COL_WIDTH": "85px" },
|
||||||
{"COL_CODE":"ERUT", "COL_CN":"航线", "COL_ORDER":"21"},
|
{ "COL_CODE": "ERUT", "COL_CN": "航线", "COL_ORDER": "21", "COL_WIDTH": "245px" },
|
||||||
{"COL_CODE":"FLNO", "COL_CN":"航班号", "COL_ORDER":"22"},
|
{ "COL_CODE": "FLNO", "COL_CN": "航班号", "COL_ORDER": "22", "COL_WIDTH": "140px" },
|
||||||
{"COL_CODE":"FTSS", "COL_CN":"运营状态", "COL_ORDER":"23"},
|
{ "COL_CODE": "FTSS", "COL_CN": "运营状态", "COL_ORDER": "23", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"FLIN", "COL_CN":"航线类别", "COL_ORDER":"24"},
|
{ "COL_CODE": "FLIN", "COL_CN": "航线类别", "COL_ORDER": "24", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"SODT", "COL_CN":"计划到达/出发", "COL_ORDER":"25"},
|
{ "COL_CODE": "SODT", "COL_CN": "计划到达/出发", "COL_ORDER": "25", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"TRML", "COL_CN":"航站楼", "COL_ORDER":"26"},
|
{ "COL_CODE": "TRML", "COL_CN": "航站楼", "COL_ORDER": "26", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"FLTY", "COL_CN":"航班类别", "COL_ORDER":"27"},
|
{ "COL_CODE": "FLTY", "COL_CN": "航班类别", "COL_ORDER": "27", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"GTDT", "COL_CN":"登机门号 ", "COL_ORDER":"28"},
|
{ "COL_CODE": "GTDT", "COL_CN": "登机门号 ", "COL_ORDER": "28", "COL_WIDTH": "120px" },
|
||||||
{"COL_CODE":"PADT", "COL_CN":"前站起飞时间", "COL_ORDER":"29"},
|
{ "COL_CODE": "PADT", "COL_CN": "前站起飞时间", "COL_ORDER": "29", "COL_WIDTH": "85px" },
|
||||||
{"COL_CODE":"CSFT", "COL_CN":"共享航班号", "COL_ORDER":"30"},
|
{ "COL_CODE": "CSFT", "COL_CN": "共享航班号", "COL_ORDER": "30", "COL_WIDTH": "85px" },
|
||||||
{"COL_CODE":"STND", "COL_CN":"当前机位", "COL_ORDER":"31"},
|
{ "COL_CODE": "STND", "COL_CN": "当前机位", "COL_ORDER": "31", "COL_WIDTH": "85px" },
|
||||||
]
|
]
|
||||||
/*
|
/*
|
||||||
备注:实际数据中,把原始数据录入到临时变量中,方便取消按钮,重置数据
|
备注:实际数据中,把原始数据录入到临时变量中,方便取消按钮,重置数据
|
||||||
@@ -87,119 +87,119 @@ export class PersonalSettingsComponent implements OnInit {
|
|||||||
this.queryTable();
|
this.queryTable();
|
||||||
}
|
}
|
||||||
//对象数组深度复制
|
//对象数组深度复制
|
||||||
deepCopy(data){
|
deepCopy(data) {
|
||||||
let itemObj={};
|
let itemObj = {};
|
||||||
for(let key in data){
|
for (let key in data) {
|
||||||
itemObj[key]=data[key];
|
itemObj[key] = data[key];
|
||||||
}
|
}
|
||||||
return itemObj;
|
return itemObj;
|
||||||
}
|
}
|
||||||
//数组深度复制构造
|
//数组深度复制构造
|
||||||
listsCope(sourceList,targetList){
|
listsCope(sourceList, targetList) {
|
||||||
sourceList.forEach(item=>{
|
sourceList.forEach(item => {
|
||||||
let option=this.deepCopy(item);
|
let option = this.deepCopy(item);
|
||||||
targetList.push(option);
|
targetList.push(option);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//上下调整项目顺序 type 1上移 2下移 3置顶 4置底 要做头尾判断
|
//上下调整项目顺序 type 1上移 2下移 3置顶 4置底 要做头尾判断
|
||||||
moveUpDown(type){
|
moveUpDown(type) {
|
||||||
let index=this.moveIndex;
|
let index = this.moveIndex;
|
||||||
if(type==1){
|
if (type == 1) {
|
||||||
this.targetList[index] = this.targetList.splice(index-1, 1, this.targetList[index])[0];
|
this.targetList[index] = this.targetList.splice(index - 1, 1, this.targetList[index])[0];
|
||||||
this.moveIndex--;
|
this.moveIndex--;
|
||||||
}else if(type==2){
|
} else if (type == 2) {
|
||||||
this.targetList[index] = this.targetList.splice(index+1, 1, this.targetList[index])[0];
|
this.targetList[index] = this.targetList.splice(index + 1, 1, this.targetList[index])[0];
|
||||||
this.moveIndex++;
|
this.moveIndex++;
|
||||||
}else if(type==3){
|
} else if (type == 3) {
|
||||||
let item=this.targetList[index];
|
let item = this.targetList[index];
|
||||||
this.targetList.splice(index,1)
|
this.targetList.splice(index, 1)
|
||||||
this.targetList.unshift(item);
|
this.targetList.unshift(item);
|
||||||
this.moveIndex=0;
|
this.moveIndex = 0;
|
||||||
}else if(type==4){
|
} else if (type == 4) {
|
||||||
this.targetList.push(this.targetList[index]);
|
this.targetList.push(this.targetList[index]);
|
||||||
this.targetList.splice(index,1);
|
this.targetList.splice(index, 1);
|
||||||
this.moveIndex=this.targetList.length-1;
|
this.moveIndex = this.targetList.length - 1;
|
||||||
}
|
}
|
||||||
this.btnStatusContrl();
|
this.btnStatusContrl();
|
||||||
|
|
||||||
}
|
}
|
||||||
//左右选择项目 type 1右移 2左移 3全部右移 4全部左移
|
//左右选择项目 type 1右移 2左移 3全部右移 4全部左移
|
||||||
moveCross(type){
|
moveCross(type) {
|
||||||
let index=this.moveIndex;
|
let index = this.moveIndex;
|
||||||
if(type==1){
|
if (type == 1) {
|
||||||
let item=this.sourceList[index];
|
let item = this.sourceList[index];
|
||||||
this.sourceList.splice(index,1)
|
this.sourceList.splice(index, 1)
|
||||||
this.targetList.push(item);
|
this.targetList.push(item);
|
||||||
if(this.sourceList.length==0){
|
if (this.sourceList.length == 0) {
|
||||||
this.disableRight=true;
|
this.disableRight = true;
|
||||||
}
|
}
|
||||||
}else if(type==2){
|
} else if (type == 2) {
|
||||||
let item=this.targetList[index];
|
let item = this.targetList[index];
|
||||||
this.targetList.splice(index,1)
|
this.targetList.splice(index, 1)
|
||||||
this.sourceList.push(item);
|
this.sourceList.push(item);
|
||||||
if(this.targetList.length==0){
|
if (this.targetList.length == 0) {
|
||||||
this.disabledLeft=true;
|
this.disabledLeft = true;
|
||||||
}
|
}
|
||||||
}else if(type==3){
|
} else if (type == 3) {
|
||||||
this.sourceList.forEach(item=>{
|
this.sourceList.forEach(item => {
|
||||||
this.targetList.push(item)
|
this.targetList.push(item)
|
||||||
})
|
})
|
||||||
this.sourceList=[];
|
this.sourceList = [];
|
||||||
}else if(type==4){
|
} else if (type == 4) {
|
||||||
this.targetList.forEach(item=>{
|
this.targetList.forEach(item => {
|
||||||
this.sourceList.push(item)
|
this.sourceList.push(item)
|
||||||
})
|
})
|
||||||
this.targetList=[];
|
this.targetList = [];
|
||||||
}
|
}
|
||||||
this.moveIndex='false';
|
this.moveIndex = 'false';
|
||||||
this.selectedType='';
|
this.selectedType = '';
|
||||||
this.disabledLeft=true;
|
this.disabledLeft = true;
|
||||||
this.disableRight=true;
|
this.disableRight = true;
|
||||||
this.sortBtnDisabled();
|
this.sortBtnDisabled();
|
||||||
}
|
}
|
||||||
//选中选框中的项 type 1可选框的项 2已选框的项
|
//选中选框中的项 type 1可选框的项 2已选框的项
|
||||||
selectNode(item,index,type){
|
selectNode(item, index, type) {
|
||||||
this.selectedType=type;
|
this.selectedType = type;
|
||||||
this.moveIndex=index;
|
this.moveIndex = index;
|
||||||
if(type==1){
|
if (type == 1) {
|
||||||
this.disabledLeft=true;
|
this.disabledLeft = true;
|
||||||
this.disableRight=false;
|
this.disableRight = false;
|
||||||
this.sortBtnDisabled();
|
this.sortBtnDisabled();
|
||||||
}else if(type==2){
|
} else if (type == 2) {
|
||||||
this.disableRight=true;
|
this.disableRight = true;
|
||||||
this.disabledLeft=false;
|
this.disabledLeft = false;
|
||||||
this.btnStatusContrl();
|
this.btnStatusContrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//右侧上下移懂按钮禁用状态控制
|
//右侧上下移懂按钮禁用状态控制
|
||||||
btnStatusContrl(){
|
btnStatusContrl() {
|
||||||
let len=this.targetList.length;
|
let len = this.targetList.length;
|
||||||
if(len<2){
|
if (len < 2) {
|
||||||
this.disabledUpTop=true;
|
this.disabledUpTop = true;
|
||||||
this.disableDown=true;
|
this.disableDown = true;
|
||||||
}
|
}
|
||||||
if(this.moveIndex==0){
|
if (this.moveIndex == 0) {
|
||||||
this.disabledUpTop=true;
|
this.disabledUpTop = true;
|
||||||
this.disableUp=true;
|
this.disableUp = true;
|
||||||
}else{
|
} else {
|
||||||
this.disabledUpTop=false
|
this.disabledUpTop = false
|
||||||
this.disableUp=false;
|
this.disableUp = false;
|
||||||
}
|
}
|
||||||
if(this.moveIndex==len-1){
|
if (this.moveIndex == len - 1) {
|
||||||
this.disabledDownBtm=true;
|
this.disabledDownBtm = true;
|
||||||
this.disableDown=true;
|
this.disableDown = true;
|
||||||
}else{
|
} else {
|
||||||
this.disabledDownBtm=false;
|
this.disabledDownBtm = false;
|
||||||
this.disableDown=false;
|
this.disableDown = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//排序按钮状态统一控制
|
//排序按钮状态统一控制
|
||||||
sortBtnDisabled(){
|
sortBtnDisabled() {
|
||||||
this.disableDown=true;
|
this.disableDown = true;
|
||||||
this.disableUp=true;
|
this.disableUp = true;
|
||||||
this.disabledDownBtm=true;
|
this.disabledDownBtm = true;
|
||||||
this.disabledUpTop=true;
|
this.disabledUpTop = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
//保存-自定义列显示保存
|
//保存-自定义列显示保存
|
||||||
@@ -211,72 +211,71 @@ export class PersonalSettingsComponent implements OnInit {
|
|||||||
groupCode:'userSettingMsgVoice',
|
groupCode:'userSettingMsgVoice',
|
||||||
groupCode:'userSettingFlyAgency',
|
groupCode:'userSettingFlyAgency',
|
||||||
*/
|
*/
|
||||||
saveSelf(){
|
saveSelf() {
|
||||||
this.sourceList.forEach((item,index)=>{
|
this.sourceList.forEach((item, index) => {
|
||||||
item.COL_ORDER=index+1
|
item.COL_ORDER = index + 1
|
||||||
})
|
})
|
||||||
this.targetList.forEach((item,index)=>{
|
this.targetList.forEach((item, index) => {
|
||||||
item.COL_ORDER=index+1
|
item.COL_ORDER = index + 1
|
||||||
})
|
})
|
||||||
let content={
|
let content = {
|
||||||
defaultData:this.defaultCols,
|
defaultData: this.defaultCols,
|
||||||
sourceList:this.sourceList,
|
sourceList: this.sourceList,
|
||||||
targetList:this.targetList,
|
targetList: this.targetList,
|
||||||
}
|
}
|
||||||
let settingContent=JSON.stringify(content);
|
let settingContent = JSON.stringify(content);
|
||||||
let params:any={
|
let params: any = {
|
||||||
envCode:'web',
|
envCode: 'web',
|
||||||
groupCode:'userSettingCol',
|
groupCode: 'userSettingCol',
|
||||||
settingContent:settingContent,
|
settingContent: settingContent,
|
||||||
}
|
}
|
||||||
this.isLoadingSave=true;
|
this.isLoadingSave = true;
|
||||||
this.http.post('/adminapi/settings/uisettings',params).subscribe((json)=>{
|
this.http.post('/adminapi/settings/uisettings', params).subscribe((json) => {
|
||||||
this.isLoadingSave=false;
|
this.isLoadingSave = false;
|
||||||
if(json.is_success){
|
if (json.is_success) {
|
||||||
this.message.success(`保存成功!`);
|
this.message.success(`保存成功!`);
|
||||||
this.queryTable();
|
this.queryTable();
|
||||||
}else{
|
} else {
|
||||||
this.message.error(`保存失败!`);
|
this.message.error(`保存失败!`);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//重置数据
|
//重置数据
|
||||||
cancelSelf(){
|
cancelSelf() {
|
||||||
this.queryTable();
|
this.queryTable();
|
||||||
}
|
}
|
||||||
//获取列表
|
//获取列表
|
||||||
queryTable():void{
|
queryTable(): void {
|
||||||
this.statusParamsData.status=1;
|
this.statusParamsData.status = 1;
|
||||||
this.list=[];
|
this.list = [];
|
||||||
this.sourceList=[];
|
this.sourceList = [];
|
||||||
this.targetList=[];
|
this.targetList = [];
|
||||||
this.colsData='';
|
this.colsData = '';
|
||||||
this.http.get('/adminapi/settings/uisettings',{groupCode:'userSettingCol'}).subscribe((json)=>{
|
this.http.get('/adminapi/settings/uisettings', { groupCode: 'userSettingCol' }).subscribe((json) => {
|
||||||
if(json.is_success){
|
if (json.is_success) {
|
||||||
this.statusParamsData.status=3;
|
this.statusParamsData.status = 3;
|
||||||
let data=json.body;
|
let data = json.body;
|
||||||
this.colsData=json.body;
|
this.colsData = json.body;
|
||||||
//当data为空是,初始化
|
//当data为空是,初始化
|
||||||
this.listsCope(this.defaultCols,this.list);
|
this.listsCope(this.defaultCols, this.list);
|
||||||
//判断data是否为空,空的时候则为最初的初始化;如果不为空,则有设置过个人设置的某个模块
|
//判断data是否为空,空的时候则为最初的初始化;如果不为空,则有设置过个人设置的某个模块
|
||||||
if(data&&data.length>0){
|
if (data && data.length > 0) {
|
||||||
data.forEach(item=>{
|
data.forEach(item => {
|
||||||
if(item.settingContent){
|
if (item.settingContent) {
|
||||||
let content=JSON.parse(item.settingContent);
|
let content = JSON.parse(item.settingContent);
|
||||||
this.listsCope(content.sourceList,this.sourceList);
|
this.listsCope(content.sourceList, this.sourceList);
|
||||||
this.listsCope(content.targetList,this.targetList);
|
this.listsCope(content.targetList, this.targetList);
|
||||||
}else{
|
} else {
|
||||||
this.listsCope(this.list,this.sourceList);
|
this.listsCope(this.list, this.sourceList);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
//接口数据为空,说明各个模块设置都为未初始化,可选项则为默认全部列
|
//接口数据为空,说明各个模块设置都为未初始化,可选项则为默认全部列
|
||||||
this.listsCope(this.list,this.sourceList);
|
this.listsCope(this.list, this.sourceList);
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
this.statusParamsData.status=0;
|
this.statusParamsData.status = 0;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,388 +257,388 @@ export class FlightsDataHandle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public dynamicMessageHandle(message, render_data, col_lists, filterItems, LASTSEARCH, LAST_SEL_COL, airports, citys, airlines, flightStatus, flightTypes) {
|
// public dynamicMessageHandle(message, render_data, col_lists, filterItems, LASTSEARCH, LAST_SEL_COL, airports, citys, airlines, flightStatus, flightTypes) {
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
if (message.MVIN === 'A') {
|
// if (message.MVIN === 'A') {
|
||||||
//针对render_data的处理
|
// //针对render_data的处理
|
||||||
let index1 = render_data.findIndex(element => {
|
// let index1 = render_data.findIndex(element => {
|
||||||
if (this.orderHandle.isArriFlight(element) || this.orderHandle.isLinked(element)) {
|
// if (this.orderHandle.isArriFlight(element) || this.orderHandle.isLinked(element)) {
|
||||||
if (element['preFlight']['FLID'] === message.FLID) {
|
// if (element['preFlight']['FLID'] === message.FLID) {
|
||||||
return true;
|
// return true;
|
||||||
} else {
|
// } else {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
if (index1 > -1) {
|
// if (index1 > -1) {
|
||||||
render_data[index1]['preFlight'] = message;
|
// render_data[index1]['preFlight'] = message;
|
||||||
render_data[index1] = this.flightsRenderTransfer(render_data[index1], col_lists);
|
// render_data[index1] = this.flightsRenderTransfer(render_data[index1], col_lists);
|
||||||
render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus, flightTypes);
|
// render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus, flightTypes);
|
||||||
|
|
||||||
let is_satis = true;
|
// let is_satis = true;
|
||||||
for (const key in filterItems) {
|
// for (const key in filterItems) {
|
||||||
if (filterItems.hasOwnProperty(key) && filterItems[key]) {
|
// if (filterItems.hasOwnProperty(key) && filterItems[key]) {
|
||||||
if (key === 'Abnormal_state') {
|
// if (key === 'Abnormal_state') {
|
||||||
if (render_data[index1]['preFlight'][filterItems[key]]) {
|
// if (render_data[index1]['preFlight'][filterItems[key]]) {
|
||||||
is_satis = true;
|
// is_satis = true;
|
||||||
continue;
|
// continue;
|
||||||
} else {
|
// } else {
|
||||||
is_satis = false;
|
// is_satis = false;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
if (render_data[index1]['preFlight'][key] === filterItems[key]) {
|
// if (render_data[index1]['preFlight'][key] === filterItems[key]) {
|
||||||
is_satis = true;
|
// is_satis = true;
|
||||||
continue;
|
// continue;
|
||||||
} else {
|
// } else {
|
||||||
is_satis = false;
|
// is_satis = false;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
let search_satis = true;
|
// let search_satis = true;
|
||||||
if (LASTSEARCH) {
|
// if (LASTSEARCH) {
|
||||||
if (LAST_SEL_COL) {
|
// if (LAST_SEL_COL) {
|
||||||
if (render_data[index1]['preFlight'][LAST_SEL_COL]) {
|
// if (render_data[index1]['preFlight'][LAST_SEL_COL]) {
|
||||||
if (render_data[index1]['preFlight'][LAST_SEL_COL].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
// if (render_data[index1]['preFlight'][LAST_SEL_COL].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
||||||
search_satis = true;
|
// search_satis = true;
|
||||||
} else {
|
// } else {
|
||||||
search_satis = false;
|
// search_satis = false;
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
search_satis = false;
|
// search_satis = false;
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
let cols = col_lists;
|
// let cols = col_lists;
|
||||||
for (let i = 0; i < cols.length; i++) {
|
// for (let i = 0; i < cols.length; i++) {
|
||||||
if (render_data[index1]['renderFlight'][cols[i]['COL_CODE']]) {
|
// if (render_data[index1]['renderFlight'][cols[i]['COL_CODE']]) {
|
||||||
if (render_data[index1]['renderFlight'][cols[i]['COL_CODE']].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
// if (render_data[index1]['renderFlight'][cols[i]['COL_CODE']].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
||||||
search_satis = true;
|
// search_satis = true;
|
||||||
break;
|
// break;
|
||||||
} else {
|
// } else {
|
||||||
search_satis = false;
|
// search_satis = false;
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
search_satis = false;
|
// search_satis = false;
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (is_satis && search_satis) {
|
// if (is_satis && search_satis) {
|
||||||
// if (message.UPTP === 'FLOP-TAOP') {
|
// // if (message.UPTP === 'FLOP-TAOP') {
|
||||||
if (message.TAID) {
|
// if (message.TAID) {
|
||||||
if (this.orderHandle.isArriFlight(render_data[index1])) {
|
// if (this.orderHandle.isArriFlight(render_data[index1])) {
|
||||||
let i = render_data.findIndex(element => {
|
// let i = render_data.findIndex(element => {
|
||||||
if (this.orderHandle.isDeptFlight(element)) {
|
// if (this.orderHandle.isDeptFlight(element)) {
|
||||||
if (message.TAID === element['reaFlight']['FLID']) {
|
// if (message.TAID === element['reaFlight']['FLID']) {
|
||||||
return true;
|
// return true;
|
||||||
} else {
|
// } else {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
if (i > -1) {
|
// if (i > -1) {
|
||||||
|
// // render_data.splice(index1, 1);
|
||||||
|
// render_data[i]['reaFlight']['TAID'] = message.FLID;
|
||||||
|
// render_data[i]['preFlight'] = message;
|
||||||
// render_data.splice(index1, 1);
|
// render_data.splice(index1, 1);
|
||||||
render_data[i]['reaFlight']['TAID'] = message.FLID;
|
// // let newFlight = {};
|
||||||
render_data[i]['preFlight'] = message;
|
// // newFlight['preFlight'] = message;
|
||||||
render_data.splice(index1, 1);
|
// // newFlight['reaFlight'] = render_data[i]['reaFlight'];
|
||||||
|
// // render_data.splice(i, 1);
|
||||||
|
// render_data[i] = this.flightsRenderTransfer(render_data[i], col_lists);
|
||||||
|
// render_data[i] = this.basicDataTransHandle(render_data[i], airports, citys, airlines, flightStatus, flightTypes);
|
||||||
|
// // render_data.push(newFlight)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// if (this.orderHandle.isLinked(render_data[index1])) {
|
||||||
|
// let newPreFlight = {},
|
||||||
|
// newReaFlight = {};
|
||||||
|
|
||||||
|
// delete render_data[index1]['preFlight']['TAID'];
|
||||||
|
// newPreFlight['preFlight'] = render_data[index1]['preFlight'];
|
||||||
|
// newPreFlight['renderFlight'] = render_data[index1]['renderPreFlight'];
|
||||||
|
// delete render_data[index1]['reaFlight']['TAID'];
|
||||||
|
// newPreFlight['reaFlight'] = render_data[index1]['reaFlight'];
|
||||||
|
// newPreFlight['renderFlight'] = render_data[index1]['renderReaFlight'];
|
||||||
|
// render_data.splice(index1, 1);
|
||||||
|
// render_data.push(newPreFlight);
|
||||||
|
// render_data.push(newReaFlight);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// // }
|
||||||
|
// } else {
|
||||||
|
// if (this.orderHandle.isArriFlight(render_data[index1])) {
|
||||||
|
// render_data.splice(index1, 1);
|
||||||
|
// } else if (this.orderHandle.isLinked(render_data[index1])) {
|
||||||
|
// delete render_data[index1]['preFlight'];
|
||||||
|
// delete render_data[index1]['renderPreFlight'];
|
||||||
|
// render_data[index1] = this.flightsRenderTransfer(render_data[index1], col_lists);
|
||||||
|
// render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus, flightTypes);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
// let newFlight = {};
|
// let newFlight = {};
|
||||||
// newFlight['preFlight'] = message;
|
// newFlight['preFlight'] = message;
|
||||||
// newFlight['reaFlight'] = render_data[i]['reaFlight'];
|
// newFlight = this.flightsRenderTransfer(newFlight, col_lists);
|
||||||
// render_data.splice(i, 1);
|
// newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus, flightTypes);
|
||||||
render_data[i] = this.flightsRenderTransfer(render_data[i], col_lists);
|
|
||||||
render_data[i] = this.basicDataTransHandle(render_data[i], airports, citys, airlines, flightStatus, flightTypes);
|
|
||||||
// render_data.push(newFlight)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (this.orderHandle.isLinked(render_data[index1])) {
|
|
||||||
let newPreFlight = {},
|
|
||||||
newReaFlight = {};
|
|
||||||
|
|
||||||
delete render_data[index1]['preFlight']['TAID'];
|
// let is_satis = true;
|
||||||
newPreFlight['preFlight'] = render_data[index1]['preFlight'];
|
// for (const key in filterItems) {
|
||||||
newPreFlight['renderFlight'] = render_data[index1]['renderPreFlight'];
|
// if (filterItems.hasOwnProperty(key) && filterItems[key]) {
|
||||||
delete render_data[index1]['reaFlight']['TAID'];
|
// if (key === 'Abnormal_state') {
|
||||||
newPreFlight['reaFlight'] = render_data[index1]['reaFlight'];
|
// if (newFlight['preFlight'][filterItems[key]]) {
|
||||||
newPreFlight['renderFlight'] = render_data[index1]['renderReaFlight'];
|
// is_satis = true;
|
||||||
render_data.splice(index1, 1);
|
// continue;
|
||||||
render_data.push(newPreFlight);
|
// } else {
|
||||||
render_data.push(newReaFlight);
|
// is_satis = false;
|
||||||
}
|
// break;
|
||||||
}
|
// }
|
||||||
|
// } else {
|
||||||
|
// if (newFlight['preFlight'][key] === filterItems[key]) {
|
||||||
|
// is_satis = true;
|
||||||
|
// continue;
|
||||||
|
// } else {
|
||||||
|
// is_satis = false;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
// }
|
// }
|
||||||
} else {
|
|
||||||
if (this.orderHandle.isArriFlight(render_data[index1])) {
|
|
||||||
render_data.splice(index1, 1);
|
|
||||||
} else if (this.orderHandle.isLinked(render_data[index1])) {
|
|
||||||
delete render_data[index1]['preFlight'];
|
|
||||||
delete render_data[index1]['renderPreFlight'];
|
|
||||||
render_data[index1] = this.flightsRenderTransfer(render_data[index1], col_lists);
|
|
||||||
render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus, flightTypes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
let newFlight = {};
|
|
||||||
newFlight['preFlight'] = message;
|
|
||||||
newFlight = this.flightsRenderTransfer(newFlight, col_lists);
|
|
||||||
newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus, flightTypes);
|
|
||||||
|
|
||||||
let is_satis = true;
|
// let search_satis = true;
|
||||||
for (const key in filterItems) {
|
// if (LASTSEARCH) {
|
||||||
if (filterItems.hasOwnProperty(key) && filterItems[key]) {
|
// if (LAST_SEL_COL) {
|
||||||
if (key === 'Abnormal_state') {
|
// if (newFlight['preFlight'][LAST_SEL_COL]) {
|
||||||
if (newFlight['preFlight'][filterItems[key]]) {
|
// if (newFlight['preFlight'][LAST_SEL_COL].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
||||||
is_satis = true;
|
// search_satis = true;
|
||||||
continue;
|
// } else {
|
||||||
} else {
|
// search_satis = false;
|
||||||
is_satis = false;
|
// }
|
||||||
break;
|
// } else {
|
||||||
}
|
// search_satis = false;
|
||||||
} else {
|
// }
|
||||||
if (newFlight['preFlight'][key] === filterItems[key]) {
|
// } else {
|
||||||
is_satis = true;
|
// let cols = col_lists;
|
||||||
continue;
|
// for (let i = 0; i < cols.length; i++) {
|
||||||
} else {
|
// if (newFlight['renderFlight'][cols[i]['COL_CODE']]) {
|
||||||
is_satis = false;
|
// if (newFlight['renderFlight'][cols[i]['COL_CODE']].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
||||||
break;
|
// search_satis = true;
|
||||||
}
|
// break;
|
||||||
}
|
// } else {
|
||||||
}
|
// search_satis = false;
|
||||||
}
|
// continue;
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// search_satis = false;
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (is_satis && search_satis) {
|
||||||
|
// if (message.TAID) {
|
||||||
|
// let i = render_data.findIndex(element => {
|
||||||
|
// if (this.orderHandle.isDeptFlight(element)) {
|
||||||
|
// if (message.TAID === element['reaFlight']['FLID']) {
|
||||||
|
// return true;
|
||||||
|
// } else {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
let search_satis = true;
|
// if (i > -1) {
|
||||||
if (LASTSEARCH) {
|
// render_data[i]['preFlight'] = newFlight['preFlight'];
|
||||||
if (LAST_SEL_COL) {
|
// render_data[i]['renderPreFlight'] = newFlight['renderPreFlight'];
|
||||||
if (newFlight['preFlight'][LAST_SEL_COL]) {
|
// } else {
|
||||||
if (newFlight['preFlight'][LAST_SEL_COL].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
// render_data.push(newFlight);
|
||||||
search_satis = true;
|
// }
|
||||||
} else {
|
// } else {
|
||||||
search_satis = false;
|
// render_data.push(newFlight);
|
||||||
}
|
// }
|
||||||
} else {
|
// }
|
||||||
search_satis = false;
|
// }
|
||||||
}
|
// } else {
|
||||||
} else {
|
// //针对render_data的处理
|
||||||
let cols = col_lists;
|
// let index1 = render_data.findIndex(element => {
|
||||||
for (let i = 0; i < cols.length; i++) {
|
// if (this.orderHandle.isDeptFlight(element) || this.orderHandle.isLinked(element)) {
|
||||||
if (newFlight['renderFlight'][cols[i]['COL_CODE']]) {
|
// if (element['reaFlight']['FLID'] === message.FLID) {
|
||||||
if (newFlight['renderFlight'][cols[i]['COL_CODE']].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
// return true;
|
||||||
search_satis = true;
|
// } else {
|
||||||
break;
|
// return false;
|
||||||
} else {
|
// }
|
||||||
search_satis = false;
|
// } else {
|
||||||
continue;
|
// return false;
|
||||||
}
|
// }
|
||||||
} else {
|
// });
|
||||||
search_satis = false;
|
// if (index1 > -1) {
|
||||||
continue;
|
// render_data[index1]['reaFlight'] = message;
|
||||||
}
|
// render_data[index1] = this.flightsRenderTransfer(render_data[index1], col_lists);
|
||||||
}
|
// render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus, flightTypes);
|
||||||
}
|
|
||||||
}
|
|
||||||
if (is_satis && search_satis) {
|
|
||||||
if (message.TAID) {
|
|
||||||
let i = render_data.findIndex(element => {
|
|
||||||
if (this.orderHandle.isDeptFlight(element)) {
|
|
||||||
if (message.TAID === element['reaFlight']['FLID']) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
if (i > -1) {
|
// let is_satis = true;
|
||||||
render_data[i]['preFlight'] = newFlight['preFlight'];
|
// for (const key in filterItems) {
|
||||||
render_data[i]['renderPreFlight'] = newFlight['renderPreFlight'];
|
// if (filterItems.hasOwnProperty(key) && filterItems[key]) {
|
||||||
} else {
|
// if (key === 'Abnormal_state') {
|
||||||
render_data.push(newFlight);
|
// if (render_data[index1]['reaFlight'][filterItems[key]]) {
|
||||||
}
|
// is_satis = true;
|
||||||
} else {
|
// continue;
|
||||||
render_data.push(newFlight);
|
// } else {
|
||||||
}
|
// is_satis = false;
|
||||||
}
|
// break;
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
//针对render_data的处理
|
// if (render_data[index1]['reaFlight'][key] === filterItems[key]) {
|
||||||
let index1 = render_data.findIndex(element => {
|
// is_satis = true;
|
||||||
if (this.orderHandle.isDeptFlight(element) || this.orderHandle.isLinked(element)) {
|
// continue;
|
||||||
if (element['reaFlight']['FLID'] === message.FLID) {
|
// } else {
|
||||||
return true;
|
// is_satis = false;
|
||||||
} else {
|
// break;
|
||||||
return false;
|
// }
|
||||||
}
|
// }
|
||||||
} else {
|
// }
|
||||||
return false;
|
// }
|
||||||
}
|
// let search_satis = true;
|
||||||
});
|
// if (LASTSEARCH) {
|
||||||
if (index1 > -1) {
|
// if (LAST_SEL_COL) {
|
||||||
render_data[index1]['reaFlight'] = message;
|
// if (render_data[index1]['reaFlight'][LAST_SEL_COL]) {
|
||||||
render_data[index1] = this.flightsRenderTransfer(render_data[index1], col_lists);
|
// if (render_data[index1]['reaFlight'][LAST_SEL_COL].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
||||||
render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus, flightTypes);
|
// search_satis = true;
|
||||||
|
// } else {
|
||||||
|
// search_satis = false;
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// search_satis = false;
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// let cols = col_lists;
|
||||||
|
// for (let i = 0; i < cols.length; i++) {
|
||||||
|
// if (render_data[index1]['renderFlight'][cols[i]['COL_CODE']]) {
|
||||||
|
// if (render_data[index1]['renderFlight'][cols[i]['COL_CODE']].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
||||||
|
// search_satis = true;
|
||||||
|
// break;
|
||||||
|
// } else {
|
||||||
|
// search_satis = false;
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// search_satis = false;
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (!is_satis || !search_satis) {
|
||||||
|
// if (this.orderHandle.isDeptFlight(render_data[index1])) {
|
||||||
|
// render_data.splice(index1, 1);
|
||||||
|
// } else if (this.orderHandle.isLinked(render_data[index1])) {
|
||||||
|
// delete render_data[index1]['reaFlight'];
|
||||||
|
// delete render_data[index1]['renderReaFlight'];
|
||||||
|
|
||||||
let is_satis = true;
|
// render_data[index1] = this.flightsRenderTransfer(render_data[index1], col_lists);
|
||||||
for (const key in filterItems) {
|
// render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus, flightTypes);
|
||||||
if (filterItems.hasOwnProperty(key) && filterItems[key]) {
|
// }
|
||||||
if (key === 'Abnormal_state') {
|
// }
|
||||||
if (render_data[index1]['reaFlight'][filterItems[key]]) {
|
// } else {
|
||||||
is_satis = true;
|
// let newFlight = {};
|
||||||
continue;
|
// newFlight['reaFlight'] = message;
|
||||||
} else {
|
// newFlight = this.flightsRenderTransfer(newFlight, col_lists);
|
||||||
is_satis = false;
|
// newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus, flightTypes);
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (render_data[index1]['reaFlight'][key] === filterItems[key]) {
|
|
||||||
is_satis = true;
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
is_satis = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let search_satis = true;
|
|
||||||
if (LASTSEARCH) {
|
|
||||||
if (LAST_SEL_COL) {
|
|
||||||
if (render_data[index1]['reaFlight'][LAST_SEL_COL]) {
|
|
||||||
if (render_data[index1]['reaFlight'][LAST_SEL_COL].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
|
||||||
search_satis = true;
|
|
||||||
} else {
|
|
||||||
search_satis = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
search_satis = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
let cols = col_lists;
|
|
||||||
for (let i = 0; i < cols.length; i++) {
|
|
||||||
if (render_data[index1]['renderFlight'][cols[i]['COL_CODE']]) {
|
|
||||||
if (render_data[index1]['renderFlight'][cols[i]['COL_CODE']].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
|
||||||
search_satis = true;
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
search_satis = false;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
search_satis = false;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!is_satis || !search_satis) {
|
|
||||||
if (this.orderHandle.isDeptFlight(render_data[index1])) {
|
|
||||||
render_data.splice(index1, 1);
|
|
||||||
} else if (this.orderHandle.isLinked(render_data[index1])) {
|
|
||||||
delete render_data[index1]['reaFlight'];
|
|
||||||
delete render_data[index1]['renderReaFlight'];
|
|
||||||
|
|
||||||
render_data[index1] = this.flightsRenderTransfer(render_data[index1], col_lists);
|
// let is_satis = true;
|
||||||
render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus, flightTypes);
|
// for (const key in filterItems) {
|
||||||
}
|
// if (filterItems.hasOwnProperty(key) && filterItems[key]) {
|
||||||
}
|
// if (key === 'Abnormal_state') {
|
||||||
} else {
|
// if (newFlight['reaFlight'][filterItems[key]]) {
|
||||||
let newFlight = {};
|
// is_satis = true;
|
||||||
newFlight['reaFlight'] = message;
|
// continue;
|
||||||
newFlight = this.flightsRenderTransfer(newFlight, col_lists);
|
// } else {
|
||||||
newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus, flightTypes);
|
// is_satis = false;
|
||||||
|
// break;
|
||||||
let is_satis = true;
|
// }
|
||||||
for (const key in filterItems) {
|
// } else {
|
||||||
if (filterItems.hasOwnProperty(key) && filterItems[key]) {
|
// if (newFlight['reaFlight'][key] === filterItems[key]) {
|
||||||
if (key === 'Abnormal_state') {
|
// is_satis = true;
|
||||||
if (newFlight['reaFlight'][filterItems[key]]) {
|
// continue;
|
||||||
is_satis = true;
|
// } else {
|
||||||
continue;
|
// is_satis = false;
|
||||||
} else {
|
// break;
|
||||||
is_satis = false;
|
// }
|
||||||
break;
|
// }
|
||||||
}
|
// }
|
||||||
} else {
|
// }
|
||||||
if (newFlight['reaFlight'][key] === filterItems[key]) {
|
// let search_satis = true;
|
||||||
is_satis = true;
|
// if (LASTSEARCH) {
|
||||||
continue;
|
// if (LAST_SEL_COL) {
|
||||||
} else {
|
// if (newFlight['reaFlight'][LAST_SEL_COL]) {
|
||||||
is_satis = false;
|
// if (newFlight['reaFlight'][LAST_SEL_COL].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
||||||
break;
|
// search_satis = true;
|
||||||
}
|
// } else {
|
||||||
}
|
// search_satis = false;
|
||||||
}
|
// }
|
||||||
}
|
// } else {
|
||||||
let search_satis = true;
|
// search_satis = false;
|
||||||
if (LASTSEARCH) {
|
// }
|
||||||
if (LAST_SEL_COL) {
|
// } else {
|
||||||
if (newFlight['reaFlight'][LAST_SEL_COL]) {
|
// let cols = col_lists;
|
||||||
if (newFlight['reaFlight'][LAST_SEL_COL].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
// for (let i = 0; i < cols.length; i++) {
|
||||||
search_satis = true;
|
// if (newFlight['renderFlight'][cols[i]['COL_CODE']]) {
|
||||||
} else {
|
// if (newFlight['renderFlight'][cols[i]['COL_CODE']].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
||||||
search_satis = false;
|
// search_satis = true;
|
||||||
}
|
// break;
|
||||||
} else {
|
// } else {
|
||||||
search_satis = false;
|
// search_satis = false;
|
||||||
}
|
// continue;
|
||||||
} else {
|
// }
|
||||||
let cols = col_lists;
|
// } else {
|
||||||
for (let i = 0; i < cols.length; i++) {
|
// search_satis = false;
|
||||||
if (newFlight['renderFlight'][cols[i]['COL_CODE']]) {
|
// continue;
|
||||||
if (newFlight['renderFlight'][cols[i]['COL_CODE']].toString().match(new RegExp(LASTSEARCH, 'i'))) {
|
// }
|
||||||
search_satis = true;
|
// }
|
||||||
break;
|
// }
|
||||||
} else {
|
// }
|
||||||
search_satis = false;
|
// if (is_satis && search_satis) {
|
||||||
continue;
|
// let i = render_data.findIndex(element => {
|
||||||
}
|
// if (this.orderHandle.isArriFlight(element)) {
|
||||||
} else {
|
// if (message.TAID === element['preFlight']['FLID']) {
|
||||||
search_satis = false;
|
// return true;
|
||||||
continue;
|
// } else {
|
||||||
}
|
// return false;
|
||||||
}
|
// }
|
||||||
}
|
// } else {
|
||||||
}
|
// return false;
|
||||||
if (is_satis && search_satis) {
|
// }
|
||||||
let i = render_data.findIndex(element => {
|
// })
|
||||||
if (this.orderHandle.isArriFlight(element)) {
|
// if (i > -1) {
|
||||||
if (message.TAID === element['preFlight']['FLID']) {
|
// render_data[i]['reaFlight'] = newFlight['reaFlight'];
|
||||||
return true;
|
// render_data[i]['renderReaFlight'] = newFlight['renderReaFlight'];
|
||||||
} else {
|
// } else {
|
||||||
return false;
|
// render_data.push(newFlight);
|
||||||
}
|
// }
|
||||||
} else {
|
// }
|
||||||
return false;
|
// }
|
||||||
}
|
// }
|
||||||
})
|
// } catch (error) {
|
||||||
if (i > -1) {
|
// console.log('航班号为:' + message.FLNO + ' - 消息有误,处理失败,请检查消息数据');
|
||||||
render_data[i]['reaFlight'] = newFlight['reaFlight'];
|
// throw error;
|
||||||
render_data[i]['renderReaFlight'] = newFlight['renderReaFlight'];
|
// } finally {
|
||||||
} else {
|
// return {
|
||||||
render_data.push(newFlight);
|
// 'render_data': render_data
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.log('航班号为:' + message.FLNO + ' - 消息有误,处理失败,请检查消息数据');
|
|
||||||
throw error;
|
|
||||||
} finally {
|
|
||||||
return {
|
|
||||||
'render_data': render_data
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user