Authored by xwx

Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-v32-xwx

... ... @@ -2,13 +2,10 @@
<el-col :span="3" v-for="(itemLink,index) in networkMonitorList" class="max-width-134">
<div class="list-step flex-div-start">
<div class="list-step-top flex-div">
<div :class="['step-img-link','flex-div-center',{'isActiveG':itemLink.value==0,'isActiveY':itemLink.value==1}]" style="cursor: default">
<i class="icon-step flex-div-center"><img :src="'/vue3/src/assets/images/faultDiagnosis/netLink-icon.png'" alt=""></i>
</div>
<span v-if="index+1<networkMonitorList.length" :class="['list-line','list-line-netLink',{'isActiveG':itemLink.value==0,'isActiveY':itemLink.value==1}]"></span>
</div>
<div class="list-step-name flex-div-start">
<span class="text-overflow width-100" :title="itemLink.linkName">
... ... @@ -19,4 +16,4 @@
</div>
</el-col>
</el-row>
\ No newline at end of file
</el-row>
... ...
... ... @@ -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
}
... ...
... ... @@ -59,6 +59,7 @@
<component v-bind:is="item.components"
:targetType="item.faultType"
:faultNo="faultDetailDetailInfo.faultNo"
:itemInfo="faultDetailDetailInfo"
:colType="item.colType"
:itemName="item.itemName"
:showDetail="item.detail"/>
... ...
... ... @@ -11,6 +11,12 @@ const faultDetail = () => {
let faultDetailDetailInfo = Vue.ref({
faultNo: '',
items: [{
faultType: 'NETLINK',
faultTypeName: '网络链路',
components: 'netLinks',
color: '#409EFF',
detail:true
},{
faultType: 'DIALTEST',
faultTypeName: '拨测',
components: 'result-item',
... ... @@ -42,12 +48,6 @@ const faultDetail = () => {
itemName: '检测指标',
detail: true,
colType: 'flag'
}, {
faultType: 'NETLINK',
faultTypeName: '网络链路',
components: 'netLinks',
color: '#409EFF',
detail:true
}]
});
... ...