...
|
...
|
@@ -32,6 +32,7 @@ export default { |
|
|
],
|
|
|
//网络监测配置链路节点数据
|
|
|
nodeData:[],
|
|
|
nodeDataChecked:[],
|
|
|
columns:[
|
|
|
{
|
|
|
prop: 'busTypeName',
|
...
|
...
|
@@ -210,7 +211,7 @@ console.log("jdjdjdjdj",newValue) |
|
|
bNetNodeList:bNetNodeList
|
|
|
}
|
|
|
proxy.$http.post(proxy.apiUrl1,params,function (res){
|
|
|
if(res && res.success){
|
|
|
if(res && res.object){
|
|
|
proxy.$global.showMsg("添加成功", "success")
|
|
|
// proxy.tableVisible=false;
|
|
|
if(res.object){
|
...
|
...
|
@@ -222,7 +223,7 @@ console.log("jdjdjdjdj",newValue) |
|
|
|
|
|
proxy.getNetLinkList();
|
|
|
}else{
|
|
|
proxy.$global.showMsg("添加失败", "success")
|
|
|
proxy.$global.showMsg("添加失败", "warning")
|
|
|
|
|
|
}
|
|
|
})
|
...
|
...
|
@@ -233,34 +234,46 @@ console.log("jdjdjdjdj",newValue) |
|
|
}
|
|
|
//添加节点
|
|
|
let addRes=(row,index)=>{
|
|
|
console.log("row",row,proxy.nodeData)
|
|
|
let bNetNodeList=row;
|
|
|
bNetNodeList.isAdd=false;
|
|
|
// proxy.iconArr.map((v,i)=>{
|
|
|
// if(row.resType==v.resType){
|
|
|
// row.path=v.path;
|
|
|
// }
|
|
|
// })
|
|
|
//flag表示线或点 true点 false线
|
|
|
console.log("row",row,proxy.nodeDataChecked)
|
|
|
let checked=false;
|
|
|
proxy.nodeDataChecked.map((item,index)=>{
|
|
|
if(row.id==item.id){
|
|
|
checked=true;
|
|
|
}
|
|
|
})
|
|
|
if(checked){
|
|
|
proxy.$global.showMsg('节点已存在','warning')
|
|
|
|
|
|
if(proxy.flag){
|
|
|
if(!proxy.nodeName){
|
|
|
proxy.$global.showMsg('请填写链路节点名称','warning')
|
|
|
}else{
|
|
|
console.log("2*2")
|
|
|
bNetNodeList.nodeName=proxy.nodeName;
|
|
|
bNetNodeList.type='point';
|
|
|
bNetNodeList.nodeType='point';
|
|
|
}else{
|
|
|
let bNetNodeList=row;
|
|
|
bNetNodeList.isAdd=false;
|
|
|
// proxy.iconArr.map((v,i)=>{
|
|
|
// if(row.resType==v.resType){
|
|
|
// row.path=v.path;
|
|
|
// }
|
|
|
// })
|
|
|
//flag表示线或点 true点 false线
|
|
|
|
|
|
if(proxy.flag){
|
|
|
if(!proxy.nodeName){
|
|
|
proxy.$global.showMsg('请填写链路节点名称','warning')
|
|
|
}else{
|
|
|
console.log("2*2")
|
|
|
bNetNodeList.nodeName=proxy.nodeName;
|
|
|
bNetNodeList.type='point';
|
|
|
bNetNodeList.nodeType='point';
|
|
|
|
|
|
proxy.backLink(bNetNodeList,index);
|
|
|
}
|
|
|
}else{
|
|
|
bNetNodeList.type='line';
|
|
|
bNetNodeList.nodeType='line';
|
|
|
proxy.backLink(bNetNodeList,index);
|
|
|
}
|
|
|
}else{
|
|
|
bNetNodeList.type='line';
|
|
|
bNetNodeList.nodeType='line';
|
|
|
proxy.backLink(bNetNodeList,index);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
let backLink=(row,index)=>{
|
|
|
proxy.tableVisible=false;
|
...
|
...
|
@@ -298,6 +311,7 @@ console.log("jdjdjdjdj",newValue) |
|
|
}
|
|
|
console.log(" proxy.nodeData", proxy.nodeData,proxy.nodeData.length)
|
|
|
|
|
|
proxy.nodeDataChecked=proxy.nodeData.flat(2);
|
|
|
proxy.addSetLIstVisible=false;
|
|
|
|
|
|
|
...
|
...
|
@@ -371,6 +385,7 @@ console.log("jdjdjdjdj",newValue) |
|
|
// this.tableVisible=false;
|
|
|
this.addSetLIstVisible=true;
|
|
|
this.nodeData=[];
|
|
|
this.nodeDataChecked=[];
|
|
|
this.isClickNet=-1;
|
|
|
|
|
|
},
|
...
|
...
|
@@ -405,10 +420,20 @@ console.log("jdjdjdjdj",newValue) |
|
|
this.$global.confirm("确认删除节点吗?", function () {
|
|
|
that.$global.showMsg("删除成功!")
|
|
|
that.nodeData.splice(index, 1);
|
|
|
|
|
|
|
|
|
that.nodeDataChecked=that.nodeData.flat(2);
|
|
|
that.nodeName='';
|
|
|
console.log("delette",that.nodeData.length)
|
|
|
if(that.nodeData.length<1){
|
|
|
that.addSetLIstVisible=true;
|
|
|
}else{
|
|
|
if(item.length>1){
|
|
|
|
|
|
}else{
|
|
|
that.nodeData.push([{nodeName:'',id:'',isAdd:true}])
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// that.getNodeData();
|
...
|
...
|
@@ -450,6 +475,7 @@ console.log("jdjdjdjdj",newValue) |
|
|
}else{
|
|
|
that.addSetLIstVisible=true;
|
|
|
}
|
|
|
that.nodeDataChecked=that.nodeData.flat(2);
|
|
|
}
|
|
|
})
|
|
|
|
...
|
...
|
@@ -521,6 +547,7 @@ console.log("jdjdjdjdj",newValue) |
|
|
},
|
|
|
//关闭弹框
|
|
|
closeDialog(){
|
|
|
this.tableVisible=false;
|
|
|
let obj={
|
|
|
networkMonitorList:this.networkMonitorList,
|
|
|
targetId:this.targetId,
|
...
|
...
|
|