Authored by 鲁尚清

故障联调 apm和网络检测

... ... @@ -46,7 +46,7 @@
padding: 0 1%;
}
.fault-book-title-card-text {
.fault-book-title-card-text,.isRelative {
position: relative;
}
.fault-book-title-card-text:after{
... ... @@ -452,6 +452,11 @@
overflow: hidden;
text-overflow: ellipsis;
}
.position-right-top{
position: absolute;
right:42px;
top:-4px;
}
.position-absolute{
}
... ...
... ... @@ -138,9 +138,9 @@ export default {
apmList:[row]
}
proxy.$http.post('/fault/conf/apm/batchAddApm',params,function (res){
if(res && res.object){
if(res && res.str){
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.src;
proxy.targetId=res.str;
proxy.saveModel();
// proxy.APMVisible=false;
}
... ... @@ -201,9 +201,9 @@ export default {
busId:proxy.bizId
}*/
proxy.$http.post('/api-web/fault/conf/apm/batchAddApm',params,function (res){
if(res && res.object){
if(res && res.str){
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.src;
proxy.targetId=res.str;
proxy.saveModel();
// proxy.APMVisible=false;
}
... ...
... ... @@ -124,11 +124,12 @@ export default {
}
},
setup(props){
const {proxy} = Vue.getCurrentInstance();
let applicationMonitorVisible=Vue.ref(false);
//btn加载中
let isLoading=Vue.ref(false);
//所属业务id
let busTypeArr = props.detailData?props.detailData.bizId:Vue.ref();
let busTypeArr = Vue.ref();
//诊断文档id
let docId= props.detailData?props.detailData.id:Vue.ref();
//faultConfId 故障配置id
... ... @@ -197,7 +198,14 @@ export default {
let ruleId=Vue.ref();
//模块id
let modleId=Vue.ref();
let setDetail=()=>{
if(props.detailData){
proxy.busTypeArr=props.detailData.bizId
}
}
return{
setDetail,
applicationMonitorVisible,
modleId,
ruleId,
... ... @@ -1015,8 +1023,8 @@ export default {
this.$http.get('/api-web/fault/conf/isExistByBizId/'+this.busTypeArr, {},function (res){
if(res && res.success){
console.log('sssss',that.busTypeArr)
that.busTypeArr=val;
that.$forceUpdate();
that.$set('that','busTypeArr',val)
}else{
... ... @@ -1061,14 +1069,15 @@ export default {
},
watch:{
applicationMonitorVisible(newValue, oldValue) {
console.log("applicationMonitorVisible1",newValue)
busTypeArr(newValue, oldValue) {
console.log("busTypeArr",newValue)
}
},
mounted () {
this.init()
this.setDetail();
this.getQueryKpiInfo();
this.getDetailByid();
this.getRuleDetail();
... ...
... ... @@ -10,9 +10,11 @@
</el-row>
<el-row class="margin-all-30">
<el-col :span="3" v-for="(item,index) in diagnosisData">
<div class="doc-list flex-clum margin-bottom-10" @click="detailDiagnosisDoc(item)">
<div class="doc-list flex-clum margin-bottom-10 isRelative" @click="detailDiagnosisDoc(item)">
<img src="./src/assets/images/faultDiagnosis/icon-doc.png" alt="">
<span class="doc-name">{{item.name}}</span>
<img @click.stop="deleteDoc(item,index)" class="img-delete position-right-top" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" alt="">
</div>
</el-col>
<el-col :span="3">
... ...
... ... @@ -31,6 +31,24 @@ export default {
searchList(){
this.$emit('searchList',this.name)
},
//删除故障
deleteDoc(item,index){
let that=this;
this.$global.confirm("确认删除故障吗?", function () {
let params={
id:item.id,
}
that.$http.get('/api-web/fault/conf/rule/deleteFaultRuleById',params,function (res){
if(res){
that.$global.showMsg("删除成功!");
that.diagnosisData.splice(index,1);
}else{
that.$global.showMsg("删除失败!",'warning')
}
})
})
}
},
mounted () {
... ...
... ... @@ -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,
... ...