机场、所在城市数据转换处理
This commit is contained in:
@@ -37,6 +37,9 @@ ngOnInit() {
|
||||
data=>{
|
||||
this.airports = data;
|
||||
this.render_data = this.airports;
|
||||
if(this.citys && this.citys.length > 0){//所在城市列表数据转换
|
||||
this.basicDataTransHandle();
|
||||
}
|
||||
}
|
||||
)
|
||||
//城市
|
||||
@@ -57,6 +60,14 @@ ngOnInit() {
|
||||
tableCont.addEventListener('scroll',scrollHandle);
|
||||
}
|
||||
|
||||
//所在城市数据转换处理
|
||||
basicDataTransHandle() {
|
||||
this.render_data.forEach(item => {
|
||||
let citysLinkIndex = this.citys.findIndex(val => val.cityId === item['cityId']);
|
||||
item['cityId'] = this.citys[citysLinkIndex].cityNameChn;
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 选中某行
|
||||
* @param i
|
||||
|
||||
Reference in New Issue
Block a user