...
|
...
|
@@ -132,12 +132,14 @@ export default { |
|
|
}
|
|
|
},
|
|
|
setup(props){
|
|
|
//btn加载中
|
|
|
let isLoading=Vue.ref(false);
|
|
|
//所属业务id
|
|
|
let busTypeArr = props.detailData?props.detailData.bizId:Vue.ref();
|
|
|
//诊断文档id
|
|
|
let docId= props.detailData?props.detailData.id:Vue.ref();
|
|
|
//faultConfId 故障配置id
|
|
|
let faultConfId=props.detailData?props.detailData.faultConfId:Vue.ref();
|
|
|
let faultConfId=docId?docId:Vue.ref();
|
|
|
//模块id--网络监测,应用监测...
|
|
|
let targetId=Vue.ref();
|
|
|
let propsData=Vue.ref();//向子组件传值所属业务id
|
...
|
...
|
@@ -197,6 +199,7 @@ export default { |
|
|
{type:'report',targetId:''},
|
|
|
]
|
|
|
return{
|
|
|
isLoading,
|
|
|
modelData,
|
|
|
faultDefinitionRadio,
|
|
|
faultStateRadio,
|
...
|
...
|
@@ -423,7 +426,14 @@ export default { |
|
|
this.configData.map((item,index)=>{
|
|
|
if(item.type==typeVal){
|
|
|
// that.targetId=item.targetId;
|
|
|
that.setTargetId(item.targetId);
|
|
|
|
|
|
if(that.docId){
|
|
|
that.setTargetId(item.targetId);
|
|
|
}else{
|
|
|
that.getTargetId(typeVal)
|
|
|
}
|
|
|
that.switchState(typeVal,item.state);
|
|
|
|
|
|
that.faultConfId=item.faultConfId;
|
|
|
|
|
|
}
|
...
|
...
|
@@ -437,6 +447,37 @@ export default { |
|
|
faultConfId:this.faultConfId
|
|
|
}
|
|
|
},
|
|
|
//设置state
|
|
|
switchState(typeVal,state){
|
|
|
console.log("state",typeVal,state)
|
|
|
switch (typeVal) {
|
|
|
|
|
|
case "netlink":
|
|
|
//网络检测
|
|
|
this.faultStateRadio=state;
|
|
|
break;
|
|
|
case "npm":
|
|
|
//应用检测
|
|
|
this.faultApplicationRadio=state;
|
|
|
break;
|
|
|
case "base":
|
|
|
//基础环境
|
|
|
this.faultEnvironmentRadio=state;
|
|
|
break;
|
|
|
case "apm":
|
|
|
//APM
|
|
|
this.faultAPMRadio=state;
|
|
|
break;
|
|
|
case "log":
|
|
|
//日志检测
|
|
|
this.faultLogRadio=state;
|
|
|
break;
|
|
|
case "report":
|
|
|
//订阅人员
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
},
|
|
|
|
|
|
//给弹框传值分类型
|
|
|
postPropsData(typeVal,index){
|
...
|
...
|
@@ -444,6 +485,7 @@ export default { |
|
|
this.switchModelDialog(typeVal,index)
|
|
|
|
|
|
this.setDetailConfig(typeVal);
|
|
|
// this.getTargetId(typeVal)
|
|
|
}else{
|
|
|
this.$global.showMsg('请选择所属业务','warning')
|
|
|
}
|
...
|
...
|
@@ -514,6 +556,7 @@ export default { |
|
|
// this.APMVisible=true;
|
|
|
this.postPropsData('apm')
|
|
|
|
|
|
|
|
|
},
|
|
|
//关闭APM弹框
|
|
|
getAPMList(itemData){
|
...
|
...
|
@@ -536,6 +579,8 @@ export default { |
|
|
if(res && res.data){
|
|
|
that.apmMonitorList=res.data;//.slice(0,3);
|
|
|
|
|
|
}else{
|
|
|
that.apmMonitorList=[];
|
|
|
}
|
|
|
})
|
|
|
},
|
...
|
...
|
@@ -561,7 +606,7 @@ export default { |
|
|
},
|
|
|
//基础环境指标删除回调函数
|
|
|
deleteEnvironment(obj){
|
|
|
this.deleteItem(obj.id,obj.list)
|
|
|
this.deleteItem(obj.id,obj)
|
|
|
},
|
|
|
//根据诊断文档列表的id获取配置详情
|
|
|
getDetailByid(){
|
...
|
...
|
@@ -571,7 +616,10 @@ export default { |
|
|
this.$http.get('/api-web/fault/conf/'+this.docId,params,function (res){
|
|
|
if(res && res.object){
|
|
|
that.configData=res.object.confDetailList;
|
|
|
that.faultConfId=that.configData[0].faultConfId;
|
|
|
if(that.configData && that.configData.length>0){
|
|
|
that.faultConfId=res.object.id;
|
|
|
}
|
|
|
|
|
|
that.name=res.object.name;
|
|
|
|
|
|
}
|
...
|
...
|
@@ -646,6 +694,7 @@ export default { |
|
|
createBy:localStorage.getItem("lgn")
|
|
|
}
|
|
|
}
|
|
|
this.isLoading=true;
|
|
|
this.$http.post('/api-web/fault/conf/detail/saveConfigDetail',params,function (res){
|
|
|
if(res && res.success){
|
|
|
that.targetId=res.map.configDetail.targetId;
|
...
|
...
|
@@ -658,6 +707,7 @@ export default { |
|
|
that.$global.showMsg('保存失败','warning')
|
|
|
|
|
|
}
|
|
|
that.isLoading=false;
|
|
|
|
|
|
})
|
|
|
},
|
...
|
...
|
@@ -736,6 +786,7 @@ export default { |
|
|
}
|
|
|
|
|
|
}
|
|
|
this.isLoading=true;
|
|
|
this.$http.post('/api-web/fault/conf/rule/saveOrUpdate',params,function (res){
|
|
|
if(res && res.success){
|
|
|
that.targetId=res.map.bFaultRule.targetId;
|
...
|
...
|
@@ -746,8 +797,28 @@ export default { |
|
|
that.$global.showMsg('保存失败','warning')
|
|
|
|
|
|
}
|
|
|
that.isLoading=false;
|
|
|
|
|
|
})
|
|
|
},
|
|
|
//删除网络监测
|
|
|
deleteNetLink(item) {
|
|
|
let that=this;
|
|
|
this.$global.confirm("确认删除链路及节点吗?", function () {
|
|
|
let params={
|
|
|
id:item.id,
|
|
|
}
|
|
|
this.$http.get('/api-web/fault/conf/netLink/deleteNetLinkAndNodeById',params,function (res){
|
|
|
if(res){
|
|
|
that.$global.showMsg("删除成功!");
|
|
|
that.getNetLinkList();
|
|
|
}else{
|
|
|
that.$global.showMsg("删除失败!",'warning')
|
|
|
}
|
|
|
|
|
|
})
|
|
|
})
|
|
|
|
|
|
},
|
|
|
//删除应用监测
|
|
|
deleteApp(item){
|
...
|
...
|
@@ -762,19 +833,62 @@ export default { |
|
|
}
|
|
|
})
|
|
|
},
|
|
|
//删除apm
|
|
|
deleteApm(item){
|
|
|
|
|
|
let that=this;
|
|
|
let params={
|
|
|
id:item.id
|
|
|
}
|
|
|
this.$http.get('/api-web/fault/conf/apm/deleteById',params,function (res){
|
|
|
if(res){
|
|
|
that.$global.showMsg('删除成功');
|
|
|
that.getApmListInfo();
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
//更改业务选择
|
|
|
changeBUsType(val){
|
|
|
this.propsData={
|
|
|
bizId:this.busTypeArr,
|
|
|
this.getBusList();
|
|
|
// this.propsData={
|
|
|
// bizId:this.busTypeArr,
|
|
|
//
|
|
|
// }
|
|
|
// if(this.type=='apm'){
|
|
|
// this.getApmListInfo();
|
|
|
//
|
|
|
// }
|
|
|
// if(this.type=='npm'){
|
|
|
// this.getAppList();
|
|
|
// }
|
|
|
},
|
|
|
//根据业务bizId判断故障诊断表是否存在所属业务
|
|
|
getBusList(){
|
|
|
|
|
|
let that=this;
|
|
|
let params={
|
|
|
bizId:this.busTypeArr
|
|
|
}
|
|
|
if(this.type=='apm'){
|
|
|
this.getApmListInfo();
|
|
|
|
|
|
}
|
|
|
if(this.type=='npm'){
|
|
|
this.getAppList();
|
|
|
}
|
|
|
this.$http.get('/api-web/fault/conf/isExistByBizId/'+this.busTypeArr, {},function (res){
|
|
|
if(res && res.success){
|
|
|
|
|
|
}else{
|
|
|
that.$global.showMsg(res.msg,'warning');
|
|
|
that.busTypeArr=that.detailData?that.detailData.bizId:'';
|
|
|
}
|
|
|
that.propsData={
|
|
|
bizId:that.busTypeArr,
|
|
|
|
|
|
}
|
|
|
if(that.type=='apm'){
|
|
|
that.getApmListInfo();
|
|
|
|
|
|
}
|
|
|
if(that.type=='npm'){
|
|
|
that.getAppList();
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
//返回首页
|
|
|
goBackIndex(){
|
...
|
...
|
|