机场-城市、列表所在城市数据处理及选择列名、过滤、查找定位

This commit is contained in:
714943302@qq.com
2018-11-27 11:51:38 +08:00
parent 63f995b7d7
commit a48b40710d
2 changed files with 6 additions and 6 deletions
@@ -14,7 +14,7 @@
<option value="airportCodeCaa">CAA码</option>
<option value="airportCodeIcao">ICAO码</option>
<option value="airportGroupId">机场集团</option>
<option value="cityId">所在城市</option>
<option value="cityName">所在城市</option>
</select>
<label class="radio-inline custom-radio nowrap mr-4">
<input type="radio" [(ngModel)]="FLT_POS" [value]="1" name="filter-position">
@@ -31,7 +31,7 @@
<button type="button" class="btn btn-info mr-3">机场管理</button>
<button type="button" class="btn btn-info mr-3">机场集团管理</button>
<button type="button" class="btn btn-info mr-3">定制查询</button> -->
<button type="button" class="btn btn-info mr-3">刷新</button>
<!-- <button type="button" class="btn btn-info mr-3">刷新</button> -->
</div>
</div>
@@ -52,7 +52,7 @@
<!-- <option value="GZ">广州</option>
<option value="SH">上海</option>
<option value="BJ">北京</option> -->
<option *ngFor="let item of citys" [value]="item.cityNameChn">{{item.cityNameChn}}</option>
<option *ngFor="let item of citys" [value]="item.cityId">{{item.cityNameChn}}</option>
</select>
</div>
</div>
@@ -90,7 +90,7 @@
<td>{{airport.airportCodeCaa}}</td>
<td>{{airport.airportCodeIcao}}</td>
<td>{{airport.airportGroupId}}</td>
<td>{{airport.cityId}}</td>
<td>{{airport.cityName}}</td>
<!-- <td *ngFor="let airline_col of airport_lists" [ngStyle]="{'background-color':getColor(airline_col.COL_CODE)}">{{airline_row['renderFlight'][airline_col.COL_CODE]}}</td> -->
</tr>
</tbody>
@@ -64,7 +64,7 @@ ngOnInit() {
basicDataTransHandle() {
this.render_data.forEach(item => {
let citysLinkIndex = this.citys.findIndex(val => val.cityId === item['cityId']);
item['cityId'] = this.citys[citysLinkIndex].cityNameChn;
item['cityName'] = this.citys[citysLinkIndex].cityNameChn;
})
}
@@ -92,7 +92,7 @@ selectChange() {
let is_satis = true;
for (const key in this.filterItems) {
if (this.filterItems.hasOwnProperty(key) && this.filterItems[key]) {
if (item[key] === this.filterItems[key]) {
if (item[key] === +this.filterItems[key] || item[key] === this.filterItems[key]) {
is_satis = true;
continue;
} else {