...
|
...
|
@@ -16,18 +16,46 @@ export default { |
|
|
computed: {},
|
|
|
setup(props) {
|
|
|
const {proxy} = Vue.getCurrentInstance();
|
|
|
let networkMonitorList=Vue.ref([]);
|
|
|
let networkMonitorList = Vue.ref([{
|
|
|
linkName:'链路1',
|
|
|
linkDesc:'测试链路1',
|
|
|
nodeList:[{
|
|
|
name:'节点1',
|
|
|
desc:'xxx',
|
|
|
state:0
|
|
|
},{
|
|
|
name:'节点2',
|
|
|
desc:'xxx',
|
|
|
state:0
|
|
|
},{
|
|
|
name:'节点3',
|
|
|
desc:'xxx',
|
|
|
state:0
|
|
|
}]
|
|
|
},{
|
|
|
linkName:'链路2',
|
|
|
linkDesc:'测试链路2',
|
|
|
nodeList:[{
|
|
|
name:'节点1',
|
|
|
desc:'xxx',
|
|
|
state:0
|
|
|
},{
|
|
|
name:'节点2',
|
|
|
desc:'xxx',
|
|
|
state:0
|
|
|
},{
|
|
|
name:'节点3',
|
|
|
desc:'xxx',
|
|
|
state:0
|
|
|
}]
|
|
|
}]);
|
|
|
|
|
|
let linkMaps = Vue.ref({});
|
|
|
|
|
|
Vue.onMounted(() => {
|
|
|
getNetLinkState();
|
|
|
|
|
|
})
|
|
|
Vue.watch(props.targetId, (newVal) => {
|
|
|
|
|
|
getNetLinkState()
|
|
|
})
|
|
|
// Vue.onMounted(() => {
|
|
|
// getNetLinkList();
|
|
|
// })
|
|
|
// Vue.watch(props.itemInfo, (newVal) => {
|
|
|
// getNetLinkList()
|
|
|
// })
|
|
|
|
|
|
/**
|
|
|
* 获取所有链路的状态信息
|
...
|
...
|
@@ -41,31 +69,15 @@ export default { |
|
|
faultNo: props.itemInfo.faultNo
|
|
|
}
|
|
|
proxy.$http.get('/api-web/fault/result/findNetLinkResult',params,function (res){
|
|
|
if(res && res.map){
|
|
|
linkMaps.value = res.data;
|
|
|
if(res && res.data){
|
|
|
networkMonitorList.value = res.data;
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取所有链路的状态信息
|
|
|
* <p>
|
|
|
* 作者: Wang
|
|
|
* 时间:2021/12/27 14:58
|
|
|
*/
|
|
|
let getNetLinkState = () => {
|
|
|
let params={
|
|
|
faultNo:props.faultNo
|
|
|
}
|
|
|
proxy.$http.get('/api-web/fault/result/findNetLinkResult',params,function (res){
|
|
|
if(res && res.map){
|
|
|
linkMaps.value = res.data;
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
return {
|
|
|
getNetLinkState,
|
|
|
linkMaps,
|
|
|
getNetLinkList,
|
|
|
networkMonitorList,
|
|
|
}
|
|
|
|
|
|
}
|
...
|
...
|
|