Commit 1baf0a43 authored by xiaowenjie's avatar xiaowenjie

修改

parent 46d2afa9
......@@ -286,19 +286,6 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
editor.loadTopology('','', 'img/backimg.png');
}
interval(arr,str){
arr.forEach(e2=>{
setInterval(function(){
if(e2.alarm == str){
e2.alarm = null;
}else{
e2.alarm = str
}
}, 600);
})
}
//查询单个
getDetail(id) {
this.isLoading = true;
......@@ -348,11 +335,7 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
hostIds.push(e.hostId);
}
});
//危险对象
//故障对象
const glist = [];
//删除对象
const dlist = [];
if(hostIds.length > 0){
const res = {
hostIds : hostIds
......@@ -364,25 +347,21 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
resData.forEach(e1=>{
arr.forEach(e2=>{
if(e1.elementId == e2.hostId){
console.log("e1.status="+e1.status)
if(e1.status == -2){
e2.alarm = "主机被删除,请及时清理";
e2.fontColor='0,0,0';
e2.alarmAlpha=0.9;
dlist.push(e2)
}
if(e1.status == 1){
e2.alarm = "危险";
e2.fontColor='0,0,0';
e2.alarmColor='255,153,18';
e2.alarmAlpha=0.9;
wlist.push(e2);
}
if(e1.status == 2){
e2.alarm = "故障";
e2.fontColor='255,97,0';
e2.alarmAlpha=0.9;
glist.push(e2);
}
}
})
......@@ -390,9 +369,6 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
editor.loadTopologyByJson(topologyJson, 'img/backimg.png');
}
)
this.interval(wlist,"危险");
this.interval(glist,"故障");
this.interval(dlist,"已删除");
}
//流量数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment