Showing
1 changed file
with
43 additions
and
31 deletions
@@ -16,18 +16,46 @@ export default { | @@ -16,18 +16,46 @@ export default { | ||
16 | computed: {}, | 16 | computed: {}, |
17 | setup(props) { | 17 | setup(props) { |
18 | const {proxy} = Vue.getCurrentInstance(); | 18 | const {proxy} = Vue.getCurrentInstance(); |
19 | - let networkMonitorList=Vue.ref([]); | 19 | + let networkMonitorList = Vue.ref([{ |
20 | + linkName:'链路1', | ||
21 | + linkDesc:'测试链路1', | ||
22 | + nodeList:[{ | ||
23 | + name:'节点1', | ||
24 | + desc:'xxx', | ||
25 | + state:0 | ||
26 | + },{ | ||
27 | + name:'节点2', | ||
28 | + desc:'xxx', | ||
29 | + state:0 | ||
30 | + },{ | ||
31 | + name:'节点3', | ||
32 | + desc:'xxx', | ||
33 | + state:0 | ||
34 | + }] | ||
35 | + },{ | ||
36 | + linkName:'链路2', | ||
37 | + linkDesc:'测试链路2', | ||
38 | + nodeList:[{ | ||
39 | + name:'节点1', | ||
40 | + desc:'xxx', | ||
41 | + state:0 | ||
42 | + },{ | ||
43 | + name:'节点2', | ||
44 | + desc:'xxx', | ||
45 | + state:0 | ||
46 | + },{ | ||
47 | + name:'节点3', | ||
48 | + desc:'xxx', | ||
49 | + state:0 | ||
50 | + }] | ||
51 | + }]); | ||
20 | 52 | ||
21 | - let linkMaps = Vue.ref({}); | ||
22 | - | ||
23 | - Vue.onMounted(() => { | ||
24 | - getNetLinkState(); | ||
25 | - | ||
26 | - }) | ||
27 | - Vue.watch(props.targetId, (newVal) => { | ||
28 | - | ||
29 | - getNetLinkState() | ||
30 | - }) | 53 | + // Vue.onMounted(() => { |
54 | + // getNetLinkList(); | ||
55 | + // }) | ||
56 | + // Vue.watch(props.itemInfo, (newVal) => { | ||
57 | + // getNetLinkList() | ||
58 | + // }) | ||
31 | 59 | ||
32 | /** | 60 | /** |
33 | * 获取所有链路的状态信息 | 61 | * 获取所有链路的状态信息 |
@@ -41,31 +69,15 @@ export default { | @@ -41,31 +69,15 @@ export default { | ||
41 | faultNo: props.itemInfo.faultNo | 69 | faultNo: props.itemInfo.faultNo |
42 | } | 70 | } |
43 | proxy.$http.get('/api-web/fault/result/findNetLinkResult',params,function (res){ | 71 | proxy.$http.get('/api-web/fault/result/findNetLinkResult',params,function (res){ |
44 | - if(res && res.map){ | ||
45 | - linkMaps.value = res.data; | 72 | + if(res && res.data){ |
73 | + networkMonitorList.value = res.data; | ||
46 | } | 74 | } |
47 | }) | 75 | }) |
48 | } | 76 | } |
49 | 77 | ||
50 | - /** | ||
51 | - * 获取所有链路的状态信息 | ||
52 | - * <p> | ||
53 | - * 作者: Wang | ||
54 | - * 时间:2021/12/27 14:58 | ||
55 | - */ | ||
56 | - let getNetLinkState = () => { | ||
57 | - let params={ | ||
58 | - faultNo:props.faultNo | ||
59 | - } | ||
60 | - proxy.$http.get('/api-web/fault/result/findNetLinkResult',params,function (res){ | ||
61 | - if(res && res.map){ | ||
62 | - linkMaps.value = res.data; | ||
63 | - } | ||
64 | - }) | ||
65 | - } | ||
66 | return { | 78 | return { |
67 | - getNetLinkState, | ||
68 | - linkMaps, | 79 | + getNetLinkList, |
80 | + networkMonitorList, | ||
69 | } | 81 | } |
70 | 82 | ||
71 | } | 83 | } |
-
Please register or login to post a comment