航班动态选择列添加航班号

This commit is contained in:
zhouyuejun
2019-05-09 11:31:45 +08:00
parent 833108cd0d
commit 7e2d84c443
2 changed files with 17 additions and 12 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
<div class="line-operator-left input-container mb-2">
<select [(ngModel)]="SEL_COL" class="mr-4 form-control" (ngModelChange)="resetPositionArray()">
<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">
+7 -2
View File
@@ -96,6 +96,7 @@ export class MainComponent implements OnInit {
public commonCol: Array<object>;
public col_lists: Array<object>; //列数据
public render_col_lists: Array<object>;
public select_col_lists: Array<object>;
public airline_color: Array<object> = [];
public airline_message_alert: Array<object> = [];
@@ -163,6 +164,8 @@ export class MainComponent 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" })
} else if (element.groupCode === 'userSettingColor') {
this.airline_color = JSON.parse(element.settingContent);
} else if (element.groupCode === 'userSettingMsgAlert') {
@@ -386,6 +389,8 @@ export class MainComponent 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" })
} else if (element.groupCode === 'userSettingColor') {
this.airline_color = JSON.parse(element.settingContent);
} else if (element.groupCode === 'userSettingMsgAlert') {
@@ -438,7 +443,7 @@ export class MainComponent implements OnInit {
})
let colArray = [];
this.render_col_lists.forEach(element => {
this.select_col_lists.forEach(element => {
let column = { 'key': element['COL_CODE'], "name": element['COL_CN'] }
colArray.push(column);
})
@@ -1120,7 +1125,7 @@ export class MainComponent 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 = [];