登机桥显示字段修改及基础数据航空公司修改
This commit is contained in:
@@ -20,25 +20,6 @@
|
||||
(keyup.enter)="inputEnter()" id="gl">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="second-condition mb-3 row">
|
||||
<div class="input-container mr-4">
|
||||
<label for="airlineGroupId">航空集团: </label>
|
||||
<select class="form-control" [(ngModel)]="filterItems.airlineGroupId" (ngModelChange)="selectChange()"
|
||||
id="handkong">
|
||||
<option value=""></option>
|
||||
<option *ngFor="let item of airlinegroups" [value]="item.airlineGroupId">{{item.airlineGroupName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- <div class="input-container mr-4">
|
||||
<label for="briefNameChn">航班代理: </label>
|
||||
<select class="form-control" [(ngModel)]="filterItems.briefNameChn" (ngModelChange)="selectChange()"
|
||||
id="hb">
|
||||
<option value=""></option>
|
||||
<option *ngFor="let items of airlines" [value]="items.briefNameChn">{{items.briefNameChn}}</option>
|
||||
</select>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="airline-table">
|
||||
|
||||
@@ -40,7 +40,7 @@ export class AirlineComponent implements OnInit {
|
||||
airlineGroupId: '',
|
||||
}
|
||||
|
||||
public airlinegroups: Array<any>; //航空集团
|
||||
// public airlinegroups: Array<any>; //航空集团
|
||||
public airlines: Array<any>;
|
||||
|
||||
public wait_render_data: Array<object> = [];
|
||||
@@ -68,22 +68,23 @@ export class AirlineComponent implements OnInit {
|
||||
}.bind(this)
|
||||
|
||||
this.airlines = this.basicDataService.airline;
|
||||
this.airlinegroups = this.basicDataService.airlinegroup;
|
||||
// this.airlinegroups = this.basicDataService.airlinegroup;
|
||||
|
||||
if (this.airlinegroups && Array.isArray(this.airlinegroups)) {
|
||||
if (this.airlines && Array.isArray(this.airlines)) {
|
||||
this.dataTransfer();
|
||||
} else {
|
||||
this.basicDataService.airline_subject.subscribe(
|
||||
data => {
|
||||
this.airlines = data;
|
||||
}
|
||||
)
|
||||
this.basicDataService.airlinegroup_subject.subscribe(
|
||||
data => {
|
||||
this.airlinegroups = data;
|
||||
this.dataTransfer();
|
||||
}
|
||||
)
|
||||
// this.basicDataService.airlinegroup_subject.subscribe(
|
||||
// data => {
|
||||
// this.airlinegroups = data;
|
||||
// this.dataTransfer();
|
||||
// }
|
||||
// )
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,6 +95,13 @@ export class AirlineComponent implements OnInit {
|
||||
item['parentAirlineName'] = this.airlines[airlinesLinkIndex].airlineName;
|
||||
}
|
||||
}
|
||||
// //航空集团数据转换处理
|
||||
// airlineGroupTransHandle(item){
|
||||
// let airlineGroupIndex = this.airlinegroups.findIndex(val => val.airlineGroupId === item['airlineGroupId']);
|
||||
// if (airlineGroupIndex > -1) {
|
||||
// item['airlineGroupName'] = this.airlinegroups[airlineGroupIndex].airlineGroupName;
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 数据转换显示统一处理
|
||||
|
||||
@@ -137,6 +137,10 @@ export class MainComponent implements OnInit {
|
||||
//订阅航班更新
|
||||
this.websocketService.dynamicsMessage().subscribe(
|
||||
event => {
|
||||
setInterval(() => {
|
||||
let msg = { "topic": "heart-beat", "message": "" };
|
||||
this.websocketService.websocket.send(JSON.stringify(msg));
|
||||
}, 30000);
|
||||
let data = JSON.parse(event as string);
|
||||
if (data.topic === 'schd') {
|
||||
let message = JSON.parse(data.message);
|
||||
|
||||
@@ -17,10 +17,6 @@ export class WebsocketService {
|
||||
}
|
||||
|
||||
this.websocket = new WebSocket(url);
|
||||
setInterval(() => {
|
||||
let msg = { "topic": "heart-beat", "message": "" };
|
||||
this.websocket.send(JSON.stringify(msg));
|
||||
}, 30000);
|
||||
return new Observable(ob => {
|
||||
this.websocket.onopen = () => {
|
||||
console.log('websocket was connected...')
|
||||
|
||||
@@ -97,19 +97,8 @@ export class TransferRenderHandle {
|
||||
}
|
||||
}
|
||||
public abdgFormatter(flight) {
|
||||
if (flight['ABTM']) {
|
||||
if (Array.isArray(flight['ABTM']) && flight['ABTM'].length > 0) {
|
||||
let abdg = [];
|
||||
for (let i = 0; i < flight['ABTM'].length; i++) {
|
||||
abdg.push(flight['ABTM'][i]['ABDG']);
|
||||
}
|
||||
let set = new Set(abdg);
|
||||
return Array.from(set).join(',');
|
||||
} else if (Object.prototype.toString.call(flight['ABTM']) === '[object Object]') {
|
||||
return flight['ABTM']['ABDG'];
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
if (flight['ABDG']) {
|
||||
return flight['ABDG'];
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user