基础数据类型转换处理
This commit is contained in:
@@ -88,7 +88,9 @@ export class AircraftComponent implements OnInit {
|
||||
airlinesHandle() {
|
||||
this.render_data.forEach(item => {
|
||||
let airlinesLinkIndex = this.airlines.findIndex(val => val.airlineCode === item['airlineCode']);
|
||||
item['airlineName'] = this.airlines[airlinesLinkIndex].airlineName;
|
||||
if(this.airlines[airlinesLinkIndex]){
|
||||
item['airlineName'] = this.airlines[airlinesLinkIndex].airlineName;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -96,7 +98,9 @@ export class AircraftComponent implements OnInit {
|
||||
basicDataTransHandle() {
|
||||
this.render_data.forEach(item => {
|
||||
let aircraftTypesLinkIndex = this.aircraftTypes.findIndex(val => val.aircraftTypeCode === item['aircraftTypeCode']);
|
||||
item['aircraftTypeName'] = this.aircraftTypes[aircraftTypesLinkIndex].aircraftTypeName;
|
||||
if(this.aircraftTypes[aircraftTypesLinkIndex]){
|
||||
item['aircraftTypeName'] = this.aircraftTypes[aircraftTypesLinkIndex].aircraftTypeName;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,9 @@ export class AirportComponent implements OnInit {
|
||||
basicDataTransHandle() {
|
||||
this.render_data.forEach(item => {
|
||||
let citysLinkIndex = this.citys.findIndex(val => val.cityId === item['cityId']);
|
||||
item['cityNameChn'] = this.citys[citysLinkIndex].cityNameChn;
|
||||
if(this.citys[citysLinkIndex]){
|
||||
item['cityNameChn'] = this.citys[citysLinkIndex].cityNameChn;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,9 @@ export class CheckinDeskComponent implements OnInit {
|
||||
chutsHandle() {
|
||||
this.render_data.forEach(item => {
|
||||
let chutsLinkIndex = this.chuts.findIndex(val => val.chutCode === item['chutCode']);
|
||||
item['chutName'] = this.chuts[chutsLinkIndex].chutName;
|
||||
if(this.chuts[chutsLinkIndex]){
|
||||
item['chutName'] = this.chuts[chutsLinkIndex].chutName;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,9 @@ export class CityComponent implements OnInit {
|
||||
basicDataTransHandle() {
|
||||
this.render_data.forEach(item => {
|
||||
let countryLinkIndex = this.countrys.findIndex(val => val.countryId === item['countryId']);
|
||||
item['countryNameChn'] = this.countrys[countryLinkIndex].countryNameChn;
|
||||
if(this.countrys[countryLinkIndex]){
|
||||
item['countryNameChn'] = this.countrys[countryLinkIndex].countryNameChn;
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user