机场下拉框数据转换

This commit is contained in:
714943302@qq.com
2018-11-26 17:41:28 +08:00
parent 1f020ee82e
commit 8cb3f94bf4
3 changed files with 13 additions and 6 deletions
@@ -52,7 +52,7 @@
<!-- <option value="GZ">广州</option> <!-- <option value="GZ">广州</option>
<option value="SH">上海</option> <option value="SH">上海</option>
<option value="BJ">北京</option> --> <option value="BJ">北京</option> -->
<option *ngFor="let item of airports" [value]="item.cityId">{{item.cityId}}</option> <option *ngFor="let item of citys" [value]="item.cityNameChn">{{item.cityNameChn}}</option>
</select> </select>
</div> </div>
</div> </div>
@@ -25,7 +25,7 @@ public filterItems = {
airportGroupId:'', airportGroupId:'',
cityId:'', cityId:'',
} }
citys : Array<any>; //城市
airports : Array<any>; airports : Array<any>;
public row_state: any = { renderFlight: {} }; public row_state: any = { renderFlight: {} };
public render_data: Array<object> = []; //显示数据,即需要显示的数据 public render_data: Array<object> = []; //显示数据,即需要显示的数据
@@ -39,6 +39,13 @@ ngOnInit() {
this.render_data = this.airports; this.render_data = this.airports;
} }
) )
//城市
this.citys = this.basicDataService.city;
this.basicDataService.city_subject.subscribe(
data=>{
this.citys = data;
}
)
/** /**
* 固定表头 * 固定表头
*/ */
@@ -31,12 +31,12 @@
</div> </div>
<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="">洲/地区:&nbsp;&nbsp;</label> <label for="">洲/地区:&nbsp;&nbsp;</label>
<select class="form-control"> <select class="form-control">
<option value=""></option> <option value=""></option>
</select> </select>
</div> </div> -->
<div class="input-container mr-4"> <div class="input-container mr-4">
<label for="countryId">国家:&nbsp;&nbsp;</label> <label for="countryId">国家:&nbsp;&nbsp;</label>
<select class="form-control" [(ngModel)]="filterItems.countryId" (ngModelChange)="selectChange()" id="citry"> <select class="form-control" [(ngModel)]="filterItems.countryId" (ngModelChange)="selectChange()" id="citry">
@@ -48,10 +48,10 @@
</select> </select>
</div> </div>
<div class="third-condition row"> <div class="third-condition row">
<label class="radio-inline custom-checkbox nowrap checkInfo mr-4"> <!-- <label class="radio-inline custom-checkbox nowrap checkInfo mr-4">
<input type="checkbox"> <input type="checkbox">
<span>洲/地区-国家关联</span> <span>洲/地区-国家关联</span>
</label> </label> -->
<label class="radio-inline custom-checkbox nowrap checkInfo mr-4"> <label class="radio-inline custom-checkbox nowrap checkInfo mr-4">
<input type="checkbox"> <input type="checkbox">
<span>国家-城市关联</span> <span>国家-城市关联</span>