基础数据类型转换处理
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
<label for="aircraftTypeCode">机型: </label>
|
<label for="aircraftTypeCode">机型: </label>
|
||||||
<select class="form-control" [(ngModel)]="filterItems.aircraftTypeCode" (ngModelChange)="selectChange()" id="jx">
|
<select class="form-control" [(ngModel)]="filterItems.aircraftTypeCode" (ngModelChange)="selectChange()" id="jx">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option *ngFor="let item of aircraftTypes" [value]="item.aircraftTypeCode">{{item.aircraftTypeCode}}</option>
|
<option *ngFor="let item of aircraftTypes" [value]="item.aircraftTypeCode">{{item.aircraftTypeName}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -63,8 +63,8 @@
|
|||||||
<td>{{aircraft.maxTakeoffWeight}}</td>
|
<td>{{aircraft.maxTakeoffWeight}}</td>
|
||||||
<td>{{aircraft.maxAirbridges}}</td>
|
<td>{{aircraft.maxAirbridges}}</td>
|
||||||
<td>{{aircraft.aircraftOwnerCode}}</td>
|
<td>{{aircraft.aircraftOwnerCode}}</td>
|
||||||
<td>{{aircraft.airlineCode}}</td>
|
<td>{{aircraft.airlineName}}</td>
|
||||||
<td>{{aircraft.aircraftTypeCode}}</td>
|
<td>{{aircraft.aircraftTypeName}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -49,11 +49,17 @@ export class AircraftComponent implements OnInit {
|
|||||||
data => {
|
data => {
|
||||||
this.aircrafts = data;
|
this.aircrafts = data;
|
||||||
this.render_data = data;
|
this.render_data = data;
|
||||||
|
if(this.aircraftTypes && this.aircraftTypes.length > 0){//机型列表数据转换
|
||||||
|
this.basicDataTransHandle();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
this.basicDataService.airline_subject.subscribe(
|
this.basicDataService.airline_subject.subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.airlines = data;
|
this.airlines = data;
|
||||||
|
if(this.airlines && this.airlines.length > 0){//航空公司数据转换处理
|
||||||
|
this.airlinesHandle();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
this.basicDataService.aircraft_type_subject.subscribe(
|
this.basicDataService.aircraft_type_subject.subscribe(
|
||||||
@@ -61,7 +67,16 @@ export class AircraftComponent implements OnInit {
|
|||||||
this.aircraftTypes = data;
|
this.aircraftTypes = data;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
//机型数据转换处理
|
||||||
|
this.render_data.forEach(item => {
|
||||||
|
let aircraftTypesLinkIndex = this.aircraftTypes.findIndex(val => val.aircraftTypeCode === item['aircraftTypeCode']);
|
||||||
|
item['aircraftTypeName'] = this.aircraftTypes[aircraftTypesLinkIndex].aircraftTypeName;
|
||||||
|
})
|
||||||
|
//航空公司数据转换处理
|
||||||
|
this.render_data.forEach(item => {
|
||||||
|
let airlinesLinkIndex = this.airlines.findIndex(val => val.airlineCode === item['airlineCode']);
|
||||||
|
item['airlineName'] = this.airlines[airlinesLinkIndex].airlineName;
|
||||||
|
})
|
||||||
/**
|
/**
|
||||||
* 固定表头
|
* 固定表头
|
||||||
*/
|
*/
|
||||||
@@ -73,6 +88,22 @@ export class AircraftComponent implements OnInit {
|
|||||||
tableCont.addEventListener('scroll', scrollHandle);
|
tableCont.addEventListener('scroll', scrollHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//航空公司数据转换处理
|
||||||
|
airlinesHandle() {
|
||||||
|
this.render_data.forEach(item => {
|
||||||
|
let airlinesLinkIndex = this.airlines.findIndex(val => val.airlineCode === item['airlineCode']);
|
||||||
|
item['airlineName'] = this.airlines[airlinesLinkIndex].airlineName;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//机型数据转换处理
|
||||||
|
basicDataTransHandle() {
|
||||||
|
this.render_data.forEach(item => {
|
||||||
|
let aircraftTypesLinkIndex = this.aircraftTypes.findIndex(val => val.aircraftTypeCode === item['aircraftTypeCode']);
|
||||||
|
item['aircraftTypeName'] = this.aircraftTypes[aircraftTypesLinkIndex].aircraftTypeName;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 选中某行
|
* 选中某行
|
||||||
* @param i
|
* @param i
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
<td>{{airport.airportCodeCaa}}</td>
|
<td>{{airport.airportCodeCaa}}</td>
|
||||||
<td>{{airport.airportCodeIcao}}</td>
|
<td>{{airport.airportCodeIcao}}</td>
|
||||||
<td>{{airport.airportGroupId}}</td>
|
<td>{{airport.airportGroupId}}</td>
|
||||||
<td>{{airport.cityId}}</td>
|
<td>{{airport.cityNameChn}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -52,14 +52,24 @@ export class AirportComponent implements OnInit {
|
|||||||
data => {
|
data => {
|
||||||
this.airports = data;
|
this.airports = data;
|
||||||
this.render_data = data;
|
this.render_data = data;
|
||||||
|
if(this.citys && this.citys.length > 0){//城市数据列表转换处理
|
||||||
|
this.basicDataTransHandle();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
this.basicDataService.city_subject.subscribe(
|
this.basicDataService.city_subject.subscribe(
|
||||||
data => this.citys = data
|
data => {
|
||||||
|
this.citys = data;
|
||||||
|
}
|
||||||
)
|
)
|
||||||
this.basicDataService.airportgroup_subject.subscribe(
|
this.basicDataService.airportgroup_subject.subscribe(
|
||||||
data => this.airportgroups = data
|
data => this.airportgroups = data
|
||||||
)
|
)
|
||||||
|
//城市数据转换处理
|
||||||
|
this.render_data.forEach(item => {
|
||||||
|
let citysLinkIndex = this.citys.findIndex(val => val.cityId === item['cityId']);
|
||||||
|
item['cityNameChn'] = this.citys[citysLinkIndex].cityNameChn;
|
||||||
|
})
|
||||||
/**
|
/**
|
||||||
* 固定表头
|
* 固定表头
|
||||||
*/
|
*/
|
||||||
@@ -71,6 +81,13 @@ export class AirportComponent implements OnInit {
|
|||||||
tableCont.addEventListener('scroll', scrollHandle);
|
tableCont.addEventListener('scroll', scrollHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//城市数据转换处理
|
||||||
|
basicDataTransHandle() {
|
||||||
|
this.render_data.forEach(item => {
|
||||||
|
let citysLinkIndex = this.citys.findIndex(val => val.cityId === item['cityId']);
|
||||||
|
item['cityNameChn'] = this.citys[citysLinkIndex].cityNameChn;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 选中某行
|
* 选中某行
|
||||||
|
|||||||
@@ -63,8 +63,8 @@
|
|||||||
<td>{{i+1}}</td>
|
<td>{{i+1}}</td>
|
||||||
<td>{{checkinDesk.checkindeskCode}}</td>
|
<td>{{checkinDesk.checkindeskCode}}</td>
|
||||||
<td>{{checkinDesk.checkindeskName}}</td>
|
<td>{{checkinDesk.checkindeskName}}</td>
|
||||||
<td>{{checkinDesk.checkinGroupCode}}</td>
|
<td>{{checkinDesk.checkinGroupName}}</td>
|
||||||
<td>{{checkinDesk.chutCode}}</td>
|
<td>{{checkinDesk.chutName}}</td>
|
||||||
<td>{{checkinDesk.terminalAreaCode|terminalArea}}</td>
|
<td>{{checkinDesk.terminalAreaCode|terminalArea}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -50,6 +50,12 @@ export class CheckinDeskComponent implements OnInit {
|
|||||||
data => {
|
data => {
|
||||||
this.checkinDesks = data;
|
this.checkinDesks = data;
|
||||||
this.render_data = data;
|
this.render_data = data;
|
||||||
|
if(this.checkinGroups && this.checkinGroups.length > 0){//值机岛列表数据转换
|
||||||
|
this.basicDataTransHandle();
|
||||||
|
}
|
||||||
|
if(this.chuts && this.chuts.length > 0){//行李传送带列表数据转换
|
||||||
|
this.chutsHandle();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
this.basicDataService.terminal_area_subject.subscribe(
|
this.basicDataService.terminal_area_subject.subscribe(
|
||||||
@@ -67,6 +73,15 @@ export class CheckinDeskComponent implements OnInit {
|
|||||||
this.chuts = data;
|
this.chuts = data;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
this.render_data.forEach(item => {//值机岛数据转换处理
|
||||||
|
let checkinGroupsLinkIndex = this.checkinGroups.findIndex(val => val.checkinGroupCode === item['checkinGroupCode']);
|
||||||
|
item['checkinGroupName'] = this.checkinGroups[checkinGroupsLinkIndex].checkinGroupName;
|
||||||
|
})
|
||||||
|
//行李传送带数据转换处理
|
||||||
|
this.render_data.forEach(item => {
|
||||||
|
let chutsLinkIndex = this.chuts.findIndex(val => val.chutCode === item['chutCode']);
|
||||||
|
item['chutName'] = this.chuts[chutsLinkIndex].chutName;
|
||||||
|
})
|
||||||
/**
|
/**
|
||||||
* 固定表头
|
* 固定表头
|
||||||
*/
|
*/
|
||||||
@@ -78,6 +93,22 @@ export class CheckinDeskComponent implements OnInit {
|
|||||||
tableCont.addEventListener('scroll', scrollHandle);
|
tableCont.addEventListener('scroll', scrollHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//值机岛数据转换处理
|
||||||
|
basicDataTransHandle() {
|
||||||
|
this.render_data.forEach(item => {
|
||||||
|
let checkinGroupsLinkIndex = this.checkinGroups.findIndex(val => val.checkinGroupCode === item['checkinGroupCode']);
|
||||||
|
item['checkinGroupName'] = this.checkinGroups[checkinGroupsLinkIndex].checkinGroupName;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//行李传送带数据转换处理
|
||||||
|
chutsHandle() {
|
||||||
|
this.render_data.forEach(item => {
|
||||||
|
let chutsLinkIndex = this.chuts.findIndex(val => val.chutCode === item['chutCode']);
|
||||||
|
item['chutName'] = this.chuts[chutsLinkIndex].chutName;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 选中某行
|
* 选中某行
|
||||||
* @param i
|
* @param i
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<td>{{city.cityCode}}</td>
|
<td>{{city.cityCode}}</td>
|
||||||
<td>{{city.cityNameChn}}</td>
|
<td>{{city.cityNameChn}}</td>
|
||||||
<td>{{city.cityNameEng}}</td>
|
<td>{{city.cityNameEng}}</td>
|
||||||
<td>{{city.countryId}}</td>
|
<td>{{city.countryNameChn}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -46,8 +46,17 @@ export class CityComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
this.basicDataService.country_subject.subscribe(
|
this.basicDataService.country_subject.subscribe(
|
||||||
data => this.countrys = data
|
data => {
|
||||||
|
this.countrys = data
|
||||||
|
if(this.countrys && this.countrys.length > 0){//国家列表数据转换
|
||||||
|
this.basicDataTransHandle();
|
||||||
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
this.render_data.forEach(item => {//国家数据转换处理
|
||||||
|
let countryLinkIndex = this.countrys.findIndex(val => val.countryId === item['countryId']);
|
||||||
|
item['countryNameChn'] = this.countrys[countryLinkIndex].countryNameChn;
|
||||||
|
})
|
||||||
/**
|
/**
|
||||||
* 固定表头
|
* 固定表头
|
||||||
*/
|
*/
|
||||||
@@ -59,6 +68,13 @@ export class CityComponent implements OnInit {
|
|||||||
tableCont.addEventListener('scroll', scrollHandle);
|
tableCont.addEventListener('scroll', scrollHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//国家数据转换处理
|
||||||
|
basicDataTransHandle() {
|
||||||
|
this.render_data.forEach(item => {
|
||||||
|
let countryLinkIndex = this.countrys.findIndex(val => val.countryId === item['countryId']);
|
||||||
|
item['countryNameChn'] = this.countrys[countryLinkIndex].countryNameChn;
|
||||||
|
})
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 选中某行
|
* 选中某行
|
||||||
* @param i
|
* @param i
|
||||||
|
|||||||
Reference in New Issue
Block a user