资源状态数据转换
This commit is contained in:
@@ -39,6 +39,28 @@ ngOnInit() {
|
||||
if(this.terminalAreas && this.terminalAreas.length > 0){//所属航站楼区域数据显示处理
|
||||
this.terminalAreasHandle();
|
||||
}
|
||||
this.render_data.forEach(element => {//资源状态列表显示数据转换
|
||||
if (element['gateStatus'] == '0') {
|
||||
element['gateStatus'] = '可用'
|
||||
return element['gateStatus'];
|
||||
}
|
||||
if(element['gateStatus'] == '1'){
|
||||
element['gateStatus'] = '在用'
|
||||
return element['gateStatus'];
|
||||
}
|
||||
if(element['gateStatus'] == '2'){
|
||||
element['gateStatus'] = '锁定'
|
||||
return element['gateStatus'];
|
||||
}
|
||||
if(element['gateStatus'] == '3'){
|
||||
element['gateStatus'] = '禁用'
|
||||
return element['gateStatus'];
|
||||
}
|
||||
if(element['gateStatus'] == '4'){
|
||||
element['gateStatus'] = '预分'
|
||||
return element['gateStatus'];
|
||||
}
|
||||
});
|
||||
}
|
||||
)
|
||||
//所属航站楼区域
|
||||
@@ -89,9 +111,24 @@ inputEnter() {
|
||||
selectChange() {
|
||||
this.return_data = this.gates.filter(item=>{
|
||||
let is_satis = true;
|
||||
if (item['gateStatus'] == '可用') {
|
||||
item['gateStatus'] = '0'
|
||||
}
|
||||
if(item['gateStatus'] == '在用'){
|
||||
item['gateStatus'] = '1'
|
||||
}
|
||||
if(item['gateStatus'] == '锁定'){
|
||||
item['gateStatus'] = '2'
|
||||
}
|
||||
if(item['gateStatus'] == '禁用'){
|
||||
item['gateStatus'] = '3'
|
||||
}
|
||||
if(item['gateStatus'] == '预分'){
|
||||
item['gateStatus'] = '4'
|
||||
}
|
||||
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 {
|
||||
@@ -102,6 +139,28 @@ selectChange() {
|
||||
}
|
||||
return is_satis;
|
||||
})
|
||||
this.return_data.forEach(element => {//资源状态列表显示数据转换
|
||||
if (element['gateStatus'] == '0') {
|
||||
element['gateStatus'] = '可用'
|
||||
return element['gateStatus'];
|
||||
}
|
||||
if(element['gateStatus'] == '1'){
|
||||
element['gateStatus'] = '在用'
|
||||
return element['gateStatus'];
|
||||
}
|
||||
if(element['gateStatus'] == '2'){
|
||||
element['gateStatus'] = '锁定'
|
||||
return element['gateStatus'];
|
||||
}
|
||||
if(element['gateStatus'] == '3'){
|
||||
element['gateStatus'] = '禁用'
|
||||
return element['gateStatus'];
|
||||
}
|
||||
if(element['gateStatus'] = '4'){
|
||||
element['gateStatus'] = '预分'
|
||||
return element['gateStatus'];
|
||||
}
|
||||
});
|
||||
this.render_data = this.return_data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user