不选列名筛选失败问题解决
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<div class="line-operator-left input-container mb-2">
|
||||
<select [(ngModel)]="SEL_COL" class="mr-4 form-control" (ngModelChange)="resetPositionArray()" name="" id="">
|
||||
<option value="">选择列名</option>
|
||||
<option *ngFor="let airline_col of render_col_lists" [value]="airline_col.COL_CODE">{{airline_col.COL_CN}}</option>
|
||||
<option *ngFor="let airline_col of select_col_lists" [value]="airline_col.COL_CODE">{{airline_col.COL_CN}}</option>
|
||||
</select>
|
||||
<label class="radio-inline custom-radio nowrap mr-4">
|
||||
<input type="radio" [(ngModel)]="FLT_POS" [value]="1" name="filter-position">
|
||||
|
||||
@@ -51,6 +51,7 @@ export class HistoricalDataComponent implements OnInit {
|
||||
|
||||
public col_lists: Array<object>; //列数据
|
||||
public render_col_lists: Array<object>;
|
||||
public select_col_lists: Array<object>;
|
||||
|
||||
public row_state: any = {};
|
||||
|
||||
@@ -124,6 +125,8 @@ export class HistoricalDataComponent implements OnInit {
|
||||
if (element.groupCode === 'userSettingCol') {
|
||||
this.col_lists = JSON.parse(element.settingContent).defaultData;
|
||||
this.render_col_lists = JSON.parse(element.settingContent).targetList;
|
||||
this.select_col_lists = JSON.parse(element.settingContent).targetList;
|
||||
this.select_col_lists.unshift({ "COL_CODE": "FLNO", "COL_CN": "航班号", "COL_ORDER": "0", "COL_WIDTH": "140px" })
|
||||
}
|
||||
})
|
||||
|
||||
@@ -311,6 +314,8 @@ export class HistoricalDataComponent implements OnInit {
|
||||
if (element.groupCode === 'userSettingCol') {
|
||||
this.col_lists = JSON.parse(element.settingContent).defaultData;
|
||||
this.render_col_lists = JSON.parse(element.settingContent).targetList;
|
||||
this.select_col_lists = JSON.parse(element.settingContent).targetList;
|
||||
this.select_col_lists.unshift({ "COL_CODE": "FLNO", "COL_CN": "航班号", "COL_ORDER": "0", "COL_WIDTH": "140px" })
|
||||
}
|
||||
})
|
||||
//获取航班动态信息
|
||||
@@ -527,7 +532,7 @@ export class HistoricalDataComponent implements OnInit {
|
||||
} else {
|
||||
filterData = filterData.filter(item => {
|
||||
let is_satis = false;
|
||||
let cols = this.col_lists;
|
||||
let cols = this.select_col_lists;
|
||||
for (let i = 0; i < cols.length; i++) {
|
||||
if (item['renderFlight'][cols[i]['COL_CODE']]) {
|
||||
if (item['renderFlight'][cols[i]['COL_CODE']].toString().match(new RegExp(this.LASTSEARCH, 'i'))) {
|
||||
@@ -655,7 +660,7 @@ export class HistoricalDataComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let cols = this.render_col_lists;
|
||||
let cols = this.select_col_lists;
|
||||
for (let i = 0; i < filterData.length; i++) {
|
||||
if (i === filterData.length - 1) {
|
||||
this.positionedArray = [];
|
||||
|
||||
@@ -1070,7 +1070,7 @@ export class MainComponent implements OnInit {
|
||||
} else {
|
||||
filterData = filterData.filter(item => {
|
||||
let is_satis = false;
|
||||
let cols = this.col_lists;
|
||||
let cols = this.select_col_lists;
|
||||
for (let i = 0; i < cols.length; i++) {
|
||||
if (item['renderFlight'][cols[i]['COL_CODE']]) {
|
||||
if (item['renderFlight'][cols[i]['COL_CODE']].toString().match(new RegExp(this.LASTSEARCH, 'i'))) {
|
||||
|
||||
Reference in New Issue
Block a user