飞机选择列名数据绑定及查找定位数据过滤筛选

This commit is contained in:
714943302@qq.com
2018-11-23 13:46:24 +08:00
parent 00864433f5
commit 3df87fdce6
2 changed files with 18 additions and 1 deletions
@@ -5,6 +5,14 @@
<div class="line-operator-left input-container mb-3 col-xlg-8 col-mlg-8 col-xl-8 col-lg-10">
<select class="mr-4 form-control" [(ngModel)]="SEL_COL" name="" id="">
<option value="">选择列名</option>
<option value="aircraftNumber">飞机号</option>
<option value="maxPassengers">最大乘客数</option>
<option value="maxFreightWeight">最大货物重量</option>
<option value="maxTakeoffWeight">最大起飞重量</option>
<option value="maxAirbridges">最大廊桥数</option>
<option value="aircraftOwnerCode">机主航空公司</option>
<option value="airlineCode">航空公司</option>
<option value="aircraftTypeCode">机型</option>
</select>
<label class="radio-inline custom-radio nowrap mr-4">
<input type="radio" [(ngModel)]="FLT_POS" [value]="1" name="filter-position">
@@ -65,7 +73,8 @@
</tr>
</thead>
<tbody>
<tr *ngFor="let aircraft of render_data;let i = index">
<tr *ngFor="let aircraft of render_data;let i = index" (click)="selectRow(aircraft)"
[ngClass]="{'selected':row_state===aircraft}">
<td>{{i+1}}</td>
<td>{{aircraft.aircraftNumber}}</td>
<td>{{aircraft.maxPassengers}}</td>
@@ -50,6 +50,14 @@ ngOnInit() {
tableCont.addEventListener('scroll',scrollHandle);
}
/**
* 选中某行
* @param i
*/
selectRow(i) {
this.row_state = i;
}
//输入框回车事件
inputEnter() {
if (this.FLT_POS === 1) {