优化基础数据
This commit is contained in:
@@ -49,6 +49,7 @@ export class StandComponent implements OnInit {
|
||||
data => {
|
||||
this.stands = data;
|
||||
this.render_data = data;
|
||||
this.initStandStatus();//资源状态列表显示数据转换
|
||||
}
|
||||
)
|
||||
this.basicDataService.terminal_area_subject.subscribe(
|
||||
@@ -74,6 +75,8 @@ export class StandComponent implements OnInit {
|
||||
this.terminalAreasHandle();
|
||||
//停机位类别数据转换处理
|
||||
this.standTypesHandle();
|
||||
//资源状态列表显示数据转换
|
||||
this.initStandStatus();
|
||||
}
|
||||
/**
|
||||
* 固定表头
|
||||
@@ -122,9 +125,38 @@ export class StandComponent implements OnInit {
|
||||
this.row_state = i;
|
||||
}
|
||||
|
||||
//资源状态列表显示数据转换
|
||||
initStandStatus(){
|
||||
this.render_data.forEach(element => {
|
||||
if (element['standStatus'] == '0') {
|
||||
element['standStatus'] = '可用'
|
||||
}else if(element['standStatus'] == '1'){
|
||||
element['standStatus'] = '在用'
|
||||
}else if(element['standStatus'] == '2'){
|
||||
element['standStatus'] = '锁定'
|
||||
}else if(element['standStatus'] == '3'){
|
||||
element['standStatus'] = '禁用'
|
||||
}else if(element['standStatus'] == '4'){
|
||||
element['standStatus'] = '预分'
|
||||
}
|
||||
return element['standStatus'];
|
||||
});
|
||||
}
|
||||
|
||||
//下拉框选择筛选
|
||||
selectChange() {
|
||||
this.render_data = this.stands.filter(item => {
|
||||
if (item['standStatus'] == '可用') {
|
||||
item['standStatus'] = '0'
|
||||
}else if(item['standStatus'] == '在用'){
|
||||
item['standStatus'] = '1'
|
||||
}else if(item['standStatus'] == '锁定'){
|
||||
item['standStatus'] = '2'
|
||||
}else if(item['standStatus'] == '禁用'){
|
||||
item['standStatus'] = '3'
|
||||
}else if(item['standStatus'] == '预分'){
|
||||
item['standStatus'] = '4'
|
||||
}
|
||||
let is_satis = true;
|
||||
for (const key in this.filterItems) {
|
||||
if (this.filterItems.hasOwnProperty(key) && this.filterItems[key]) {
|
||||
@@ -139,6 +171,7 @@ export class StandComponent implements OnInit {
|
||||
}
|
||||
return is_satis;
|
||||
})
|
||||
this.initStandStatus(); //资源状态列表显示数据转换
|
||||
if (this.FLT_POS === 1) {
|
||||
this.inputFilter(this.render_data);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user