机型组数据转换处理
This commit is contained in:
@@ -21,10 +21,10 @@
|
|||||||
|
|
||||||
<div class="second-condition mb-3 row">
|
<div class="second-condition mb-3 row">
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="aircrafttypegroupId">机型组: </label>
|
<label for="aircraftTypeGroupId">机型组: </label>
|
||||||
<select class="form-control" [(ngModel)]="filterItems.aircrafttypegroupId" (ngModelChange)="selectChange()" id="jgroup">
|
<select class="form-control" [(ngModel)]="filterItems.aircraftTypeGroupId" (ngModelChange)="selectChange()" id="jgroup">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option *ngFor="let item of aircraftTypesGroups" [value]="item.aircrafttypegroupId">{{item.aircraftTypeGroupName}}</option>
|
<option *ngFor="let item of aircraftTypesGroups" [value]="item.aircraftTypeGroupId">{{item.aircraftTypeGroupName}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
<td>{{aircraftType.maxFreightWeight}}</td>
|
<td>{{aircraftType.maxFreightWeight}}</td>
|
||||||
<td>{{aircraftType.maxTakeoffWeight}}</td>
|
<td>{{aircraftType.maxTakeoffWeight}}</td>
|
||||||
<td>{{aircraftType.maxAirbridges}}</td>
|
<td>{{aircraftType.maxAirbridges}}</td>
|
||||||
<td>{{aircraftType.aircrafttypegroupId}}</td>
|
<td>{{aircraftType.aircraftTypeGroupName}}</td>
|
||||||
<td>{{aircraftType.aircraftTypeCodeCaa}}</td>
|
<td>{{aircraftType.aircraftTypeCodeCaa}}</td>
|
||||||
<td>{{aircraftType.aircraftTypeCodeIata}}</td>
|
<td>{{aircraftType.aircraftTypeCodeIata}}</td>
|
||||||
<td>{{aircraftType.aircraftTypeCodeIcao}}</td>
|
<td>{{aircraftType.aircraftTypeCodeIcao}}</td>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export class AircraftTypeComponent implements OnInit {
|
|||||||
{ col_code: 'maxFreightWeight', col_chn: '最大货物重量' },
|
{ col_code: 'maxFreightWeight', col_chn: '最大货物重量' },
|
||||||
{ col_code: 'maxTakeoffWeight', col_chn: '最大起飞重量' },
|
{ col_code: 'maxTakeoffWeight', col_chn: '最大起飞重量' },
|
||||||
{ col_code: 'maxAirbridges', col_chn: '最大廊桥数' },
|
{ col_code: 'maxAirbridges', col_chn: '最大廊桥数' },
|
||||||
{ col_code: 'aircrafttypegroupId ', col_chn: '机型组' },
|
{ col_code: 'aircraftTypeGroupName', col_chn: '机型组' },
|
||||||
{ col_code: 'aircraftTypeCodeCaa', col_chn: 'CAA码' },
|
{ col_code: 'aircraftTypeCodeCaa', col_chn: 'CAA码' },
|
||||||
{ col_code: 'aircraftTypeCodeIata', col_chn: 'IATA码' },
|
{ col_code: 'aircraftTypeCodeIata', col_chn: 'IATA码' },
|
||||||
{ col_code: 'aircraftTypeCodeIcao', col_chn: 'ICAO码' },
|
{ col_code: 'aircraftTypeCodeIcao', col_chn: 'ICAO码' },
|
||||||
@@ -56,8 +56,17 @@ export class AircraftTypeComponent implements OnInit {
|
|||||||
)
|
)
|
||||||
//机型组
|
//机型组
|
||||||
this.basicDataService.aircraft_type_group_subject.subscribe(
|
this.basicDataService.aircraft_type_group_subject.subscribe(
|
||||||
data => this.aircraftTypesGroups = data
|
data => {
|
||||||
|
this.aircraftTypesGroups = data;
|
||||||
|
if(this.aircraftTypesGroups && this.aircraftTypesGroups.length > 0){ //机型组转换处理
|
||||||
|
this.aircraftTypesGroupsHandle();
|
||||||
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
//机型组转换处理
|
||||||
|
if(this.render_data){
|
||||||
|
this.aircraftTypesGroupsHandle();
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 固定表头
|
* 固定表头
|
||||||
*/
|
*/
|
||||||
@@ -69,6 +78,16 @@ export class AircraftTypeComponent implements OnInit {
|
|||||||
tableCont.addEventListener('scroll', scrollHandle);
|
tableCont.addEventListener('scroll', scrollHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//机型组转换处理
|
||||||
|
aircraftTypesGroupsHandle() {
|
||||||
|
this.render_data.forEach(item => {
|
||||||
|
let aircraftTypesGroupsLinkIndex = this.aircraftTypesGroups.findIndex(val => val.aircraftTypeGroupId === item['aircraftTypeGroupId']);
|
||||||
|
if(this.aircraftTypesGroups[aircraftTypesGroupsLinkIndex]){
|
||||||
|
item['aircraftTypeGroupName'] = this.aircraftTypesGroups[aircraftTypesGroupsLinkIndex].aircraftTypeGroupName;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 选中某行
|
* 选中某行
|
||||||
* @param i
|
* @param i
|
||||||
|
|||||||
Reference in New Issue
Block a user