...
|
...
|
@@ -3,9 +3,9 @@ export default { |
|
|
template: '',
|
|
|
components: {},
|
|
|
props: {
|
|
|
faultNo: {
|
|
|
type: String,
|
|
|
default: ''
|
|
|
itemInfo: {
|
|
|
type: Object,
|
|
|
default: {}
|
|
|
},
|
|
|
},
|
|
|
data() {
|
...
|
...
|
@@ -16,36 +16,69 @@ 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
|
|
|
}]
|
|
|
}]);
|
|
|
|
|
|
Vue.onMounted(() => {
|
|
|
proxy.getNetLinkList();
|
|
|
// Vue.onMounted(() => {
|
|
|
// getNetLinkList();
|
|
|
// })
|
|
|
// Vue.watch(props.itemInfo, (newVal) => {
|
|
|
// getNetLinkList()
|
|
|
// })
|
|
|
|
|
|
})
|
|
|
Vue.watch(props.targetId, (newVal) => {
|
|
|
console.log("new targetid",newVal)
|
|
|
proxy.getNetLinkList()
|
|
|
})
|
|
|
//根据targetId获取链路信息列表
|
|
|
let getNetLinkList=()=>{
|
|
|
/**
|
|
|
* 获取所有链路的状态信息
|
|
|
* <p>
|
|
|
* 作者: Wang
|
|
|
* 时间:2021/12/27 14:58
|
|
|
*/
|
|
|
let getNetLinkList = () => {
|
|
|
let params={
|
|
|
// targetId:props.targetId,
|
|
|
faultNo:props.faultNo
|
|
|
|
|
|
configId: props.itemInfo.faultconfid,
|
|
|
faultNo: props.itemInfo.faultNo
|
|
|
}
|
|
|
//api-web/fault/result/findNetLinkResult
|
|
|
//api-web/fault/conf/netLink/getNetLinkList
|
|
|
proxy.$http.get('/api-web/fault/result/findNetLinkResult',params,function (res){
|
|
|
if(res && res.data){
|
|
|
proxy.networkMonitorList=res.data;
|
|
|
|
|
|
networkMonitorList.value = res.data;
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
getNetLinkList,
|
|
|
networkMonitorList,
|
|
|
}
|
|
|
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
|
|
} |
...
|
...
|
|