NEZ-744 fix:project topo 图中各个module 的图标颜色实现 与 module 异常信息关联
This commit is contained in:
@@ -208,7 +208,7 @@ export default {
|
|||||||
delete this.searchLabel.startAt
|
delete this.searchLabel.startAt
|
||||||
delete this.searchLabel.endAt
|
delete this.searchLabel.endAt
|
||||||
}
|
}
|
||||||
this.$get(this.url + '?state=' + this.state, { ...this.searchLabel }).then(response => {
|
this.$get(this.url, { state: this.state, ...this.searchLabel }).then(response => {
|
||||||
this.tools.loading = false
|
this.tools.loading = false
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
this.nowTime = this.utcTimeToTimezoneStr(response.time)
|
this.nowTime = this.utcTimeToTimezoneStr(response.time)
|
||||||
|
|||||||
@@ -1029,6 +1029,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getNodesArr () {
|
getNodesArr () {
|
||||||
|
const arr = []
|
||||||
if (!getTopology(this.topologyIndex)) return
|
if (!getTopology(this.topologyIndex)) return
|
||||||
this.nodesArr = getTopology(this.topologyIndex).data.pens.filter(item => {
|
this.nodesArr = getTopology(this.topologyIndex).data.pens.filter(item => {
|
||||||
if (!item.data) {
|
if (!item.data) {
|
||||||
@@ -1037,26 +1038,35 @@ export default {
|
|||||||
moduleName: '',
|
moduleName: '',
|
||||||
show: false,
|
show: false,
|
||||||
error: false,
|
error: false,
|
||||||
expressArr: []
|
expressArr: [],
|
||||||
|
state:{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return item.type === 0
|
return item.type === 0
|
||||||
})
|
})
|
||||||
// this.nodesArr=this.nodesArr.map(item=>{
|
this.nodesArr.forEach(item=>{
|
||||||
// if(!item.data){
|
item.data.error = false
|
||||||
// item.data={
|
item.data.state = {
|
||||||
// moduleId:'',
|
endpoint: false,
|
||||||
// moduleName:'',
|
asset: false,
|
||||||
// show:false,
|
total: false,
|
||||||
// error:false,
|
other: false,
|
||||||
// expressArr:[],
|
info: false,
|
||||||
// }
|
alert: false,
|
||||||
// }
|
main: false,
|
||||||
// return {
|
error: false
|
||||||
// rect:item.rect,
|
}
|
||||||
// data:item.data
|
arr.push(this.$get('stat/module/abnormal',{moduleId: item.data.moduleId}))
|
||||||
// }
|
});
|
||||||
// });
|
Promise.all(arr).then(res => {
|
||||||
|
this.nodesArr.forEach( (item, index) => {
|
||||||
|
item.data.state.error = item.data.error = !res[index].data.list[0].state
|
||||||
|
item.data.state.asset = !!res[index].data.list[0].asset
|
||||||
|
item.data.state.alert = !!res[index].data.list[0].alert
|
||||||
|
item.data.state.endpoint = !!res[index].data.list[0].endpoint
|
||||||
|
})
|
||||||
|
this.nodesArr = JSON.parse(JSON.stringify(this.nodesArr))
|
||||||
|
})
|
||||||
// 打开动画 是否更新顶部图标
|
// 打开动画 是否更新顶部图标
|
||||||
this.nodesArr = JSON.parse(JSON.stringify(this.nodesArr))
|
this.nodesArr = JSON.parse(JSON.stringify(this.nodesArr))
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1029,6 +1029,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getNodesArr () {
|
getNodesArr () {
|
||||||
|
const arr = []
|
||||||
if (!getTopology(this.topologyIndex)) return
|
if (!getTopology(this.topologyIndex)) return
|
||||||
this.nodesArr = getTopology(this.topologyIndex).data.pens.filter(item => {
|
this.nodesArr = getTopology(this.topologyIndex).data.pens.filter(item => {
|
||||||
if (!item.data) {
|
if (!item.data) {
|
||||||
@@ -1037,26 +1038,35 @@ export default {
|
|||||||
moduleName: '',
|
moduleName: '',
|
||||||
show: false,
|
show: false,
|
||||||
error: false,
|
error: false,
|
||||||
expressArr: []
|
expressArr: [],
|
||||||
|
state:{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return item.type === 0
|
return item.type === 0
|
||||||
})
|
})
|
||||||
// this.nodesArr=this.nodesArr.map(item=>{
|
this.nodesArr.forEach(item=>{
|
||||||
// if(!item.data){
|
item.data.error = false
|
||||||
// item.data={
|
item.data.state = {
|
||||||
// moduleId:'',
|
endpoint: false,
|
||||||
// moduleName:'',
|
asset: false,
|
||||||
// show:false,
|
total: false,
|
||||||
// error:false,
|
other: false,
|
||||||
// expressArr:[],
|
info: false,
|
||||||
// }
|
alert: false,
|
||||||
// }
|
main: false,
|
||||||
// return {
|
error: false
|
||||||
// rect:item.rect,
|
}
|
||||||
// data:item.data
|
arr.push(this.$get('stat/module/abnormal',{moduleId: item.data.moduleId}))
|
||||||
// }
|
});
|
||||||
// });
|
Promise.all(arr).then(res => {
|
||||||
|
this.nodesArr.forEach( (item, index) => {
|
||||||
|
item.data.state.error = item.data.error = !res[index].data.list[0].state
|
||||||
|
item.data.state.asset = !!res[index].data.list[0].asset
|
||||||
|
item.data.state.alert = !!res[index].data.list[0].alert
|
||||||
|
item.data.state.endpoint = !!res[index].data.list[0].endpoint
|
||||||
|
})
|
||||||
|
this.nodesArr = JSON.parse(JSON.stringify(this.nodesArr))
|
||||||
|
})
|
||||||
// 打开动画 是否更新顶部图标
|
// 打开动画 是否更新顶部图标
|
||||||
this.nodesArr = JSON.parse(JSON.stringify(this.nodesArr))
|
this.nodesArr = JSON.parse(JSON.stringify(this.nodesArr))
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user