Merge branch 'master-v32-lushangqing' into 'master'
故障联调 apm和网络检测 See merge request !261
Showing
6 changed files
with
74 additions
and
13 deletions
@@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
46 | padding: 0 1%; | 46 | padding: 0 1%; |
47 | 47 | ||
48 | } | 48 | } |
49 | -.fault-book-title-card-text { | 49 | +.fault-book-title-card-text,.isRelative { |
50 | position: relative; | 50 | position: relative; |
51 | } | 51 | } |
52 | .fault-book-title-card-text:after{ | 52 | .fault-book-title-card-text:after{ |
@@ -452,6 +452,11 @@ | @@ -452,6 +452,11 @@ | ||
452 | overflow: hidden; | 452 | overflow: hidden; |
453 | text-overflow: ellipsis; | 453 | text-overflow: ellipsis; |
454 | } | 454 | } |
455 | +.position-right-top{ | ||
456 | + position: absolute; | ||
457 | + right:42px; | ||
458 | + top:-4px; | ||
459 | +} | ||
455 | .position-absolute{ | 460 | .position-absolute{ |
456 | 461 | ||
457 | } | 462 | } |
@@ -138,9 +138,9 @@ export default { | @@ -138,9 +138,9 @@ export default { | ||
138 | apmList:[row] | 138 | apmList:[row] |
139 | } | 139 | } |
140 | proxy.$http.post('/fault/conf/apm/batchAddApm',params,function (res){ | 140 | proxy.$http.post('/fault/conf/apm/batchAddApm',params,function (res){ |
141 | - if(res && res.object){ | 141 | + if(res && res.str){ |
142 | proxy.$global.showMsg('添加成功','success'); | 142 | proxy.$global.showMsg('添加成功','success'); |
143 | - proxy.targetId=res.src; | 143 | + proxy.targetId=res.str; |
144 | proxy.saveModel(); | 144 | proxy.saveModel(); |
145 | // proxy.APMVisible=false; | 145 | // proxy.APMVisible=false; |
146 | } | 146 | } |
@@ -201,9 +201,9 @@ export default { | @@ -201,9 +201,9 @@ export default { | ||
201 | busId:proxy.bizId | 201 | busId:proxy.bizId |
202 | }*/ | 202 | }*/ |
203 | proxy.$http.post('/api-web/fault/conf/apm/batchAddApm',params,function (res){ | 203 | proxy.$http.post('/api-web/fault/conf/apm/batchAddApm',params,function (res){ |
204 | - if(res && res.object){ | 204 | + if(res && res.str){ |
205 | proxy.$global.showMsg('添加成功','success'); | 205 | proxy.$global.showMsg('添加成功','success'); |
206 | - proxy.targetId=res.src; | 206 | + proxy.targetId=res.str; |
207 | proxy.saveModel(); | 207 | proxy.saveModel(); |
208 | // proxy.APMVisible=false; | 208 | // proxy.APMVisible=false; |
209 | } | 209 | } |
@@ -124,11 +124,12 @@ export default { | @@ -124,11 +124,12 @@ export default { | ||
124 | } | 124 | } |
125 | }, | 125 | }, |
126 | setup(props){ | 126 | setup(props){ |
127 | + const {proxy} = Vue.getCurrentInstance(); | ||
127 | let applicationMonitorVisible=Vue.ref(false); | 128 | let applicationMonitorVisible=Vue.ref(false); |
128 | //btn加载中 | 129 | //btn加载中 |
129 | let isLoading=Vue.ref(false); | 130 | let isLoading=Vue.ref(false); |
130 | //所属业务id | 131 | //所属业务id |
131 | - let busTypeArr = props.detailData?props.detailData.bizId:Vue.ref(); | 132 | + let busTypeArr = Vue.ref(); |
132 | //诊断文档id | 133 | //诊断文档id |
133 | let docId= props.detailData?props.detailData.id:Vue.ref(); | 134 | let docId= props.detailData?props.detailData.id:Vue.ref(); |
134 | //faultConfId 故障配置id | 135 | //faultConfId 故障配置id |
@@ -197,7 +198,14 @@ export default { | @@ -197,7 +198,14 @@ export default { | ||
197 | let ruleId=Vue.ref(); | 198 | let ruleId=Vue.ref(); |
198 | //模块id | 199 | //模块id |
199 | let modleId=Vue.ref(); | 200 | let modleId=Vue.ref(); |
201 | + let setDetail=()=>{ | ||
202 | + if(props.detailData){ | ||
203 | + proxy.busTypeArr=props.detailData.bizId | ||
204 | + } | ||
205 | + | ||
206 | + } | ||
200 | return{ | 207 | return{ |
208 | + setDetail, | ||
201 | applicationMonitorVisible, | 209 | applicationMonitorVisible, |
202 | modleId, | 210 | modleId, |
203 | ruleId, | 211 | ruleId, |
@@ -1015,8 +1023,8 @@ export default { | @@ -1015,8 +1023,8 @@ export default { | ||
1015 | this.$http.get('/api-web/fault/conf/isExistByBizId/'+this.busTypeArr, {},function (res){ | 1023 | this.$http.get('/api-web/fault/conf/isExistByBizId/'+this.busTypeArr, {},function (res){ |
1016 | if(res && res.success){ | 1024 | if(res && res.success){ |
1017 | console.log('sssss',that.busTypeArr) | 1025 | console.log('sssss',that.busTypeArr) |
1026 | + that.busTypeArr=val; | ||
1018 | that.$forceUpdate(); | 1027 | that.$forceUpdate(); |
1019 | - that.$set('that','busTypeArr',val) | ||
1020 | 1028 | ||
1021 | 1029 | ||
1022 | }else{ | 1030 | }else{ |
@@ -1061,14 +1069,15 @@ export default { | @@ -1061,14 +1069,15 @@ export default { | ||
1061 | 1069 | ||
1062 | }, | 1070 | }, |
1063 | watch:{ | 1071 | watch:{ |
1064 | - applicationMonitorVisible(newValue, oldValue) { | ||
1065 | - console.log("applicationMonitorVisible1",newValue) | 1072 | + busTypeArr(newValue, oldValue) { |
1073 | + console.log("busTypeArr",newValue) | ||
1066 | 1074 | ||
1067 | } | 1075 | } |
1068 | 1076 | ||
1069 | }, | 1077 | }, |
1070 | mounted () { | 1078 | mounted () { |
1071 | this.init() | 1079 | this.init() |
1080 | + this.setDetail(); | ||
1072 | this.getQueryKpiInfo(); | 1081 | this.getQueryKpiInfo(); |
1073 | this.getDetailByid(); | 1082 | this.getDetailByid(); |
1074 | this.getRuleDetail(); | 1083 | this.getRuleDetail(); |
@@ -10,9 +10,11 @@ | @@ -10,9 +10,11 @@ | ||
10 | </el-row> | 10 | </el-row> |
11 | <el-row class="margin-all-30"> | 11 | <el-row class="margin-all-30"> |
12 | <el-col :span="3" v-for="(item,index) in diagnosisData"> | 12 | <el-col :span="3" v-for="(item,index) in diagnosisData"> |
13 | - <div class="doc-list flex-clum margin-bottom-10" @click="detailDiagnosisDoc(item)"> | 13 | + <div class="doc-list flex-clum margin-bottom-10 isRelative" @click="detailDiagnosisDoc(item)"> |
14 | <img src="./src/assets/images/faultDiagnosis/icon-doc.png" alt=""> | 14 | <img src="./src/assets/images/faultDiagnosis/icon-doc.png" alt=""> |
15 | <span class="doc-name">{{item.name}}</span> | 15 | <span class="doc-name">{{item.name}}</span> |
16 | + <img @click.stop="deleteDoc(item,index)" class="img-delete position-right-top" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" alt=""> | ||
17 | + | ||
16 | </div> | 18 | </div> |
17 | </el-col> | 19 | </el-col> |
18 | <el-col :span="3"> | 20 | <el-col :span="3"> |
@@ -31,6 +31,24 @@ export default { | @@ -31,6 +31,24 @@ export default { | ||
31 | searchList(){ | 31 | searchList(){ |
32 | this.$emit('searchList',this.name) | 32 | this.$emit('searchList',this.name) |
33 | 33 | ||
34 | + }, | ||
35 | + //删除故障 | ||
36 | + deleteDoc(item,index){ | ||
37 | + let that=this; | ||
38 | + this.$global.confirm("确认删除故障吗?", function () { | ||
39 | + let params={ | ||
40 | + id:item.id, | ||
41 | + } | ||
42 | + that.$http.get('/api-web/fault/conf/rule/deleteFaultRuleById',params,function (res){ | ||
43 | + if(res){ | ||
44 | + that.$global.showMsg("删除成功!"); | ||
45 | + that.diagnosisData.splice(index,1); | ||
46 | + }else{ | ||
47 | + that.$global.showMsg("删除失败!",'warning') | ||
48 | + } | ||
49 | + | ||
50 | + }) | ||
51 | + }) | ||
34 | } | 52 | } |
35 | }, | 53 | }, |
36 | mounted () { | 54 | mounted () { |
@@ -32,6 +32,7 @@ export default { | @@ -32,6 +32,7 @@ export default { | ||
32 | ], | 32 | ], |
33 | //网络监测配置链路节点数据 | 33 | //网络监测配置链路节点数据 |
34 | nodeData:[], | 34 | nodeData:[], |
35 | + nodeDataChecked:[], | ||
35 | columns:[ | 36 | columns:[ |
36 | { | 37 | { |
37 | prop: 'busTypeName', | 38 | prop: 'busTypeName', |
@@ -210,7 +211,7 @@ console.log("jdjdjdjdj",newValue) | @@ -210,7 +211,7 @@ console.log("jdjdjdjdj",newValue) | ||
210 | bNetNodeList:bNetNodeList | 211 | bNetNodeList:bNetNodeList |
211 | } | 212 | } |
212 | proxy.$http.post(proxy.apiUrl1,params,function (res){ | 213 | proxy.$http.post(proxy.apiUrl1,params,function (res){ |
213 | - if(res && res.success){ | 214 | + if(res && res.object){ |
214 | proxy.$global.showMsg("添加成功", "success") | 215 | proxy.$global.showMsg("添加成功", "success") |
215 | // proxy.tableVisible=false; | 216 | // proxy.tableVisible=false; |
216 | if(res.object){ | 217 | if(res.object){ |
@@ -222,7 +223,7 @@ console.log("jdjdjdjdj",newValue) | @@ -222,7 +223,7 @@ console.log("jdjdjdjdj",newValue) | ||
222 | 223 | ||
223 | proxy.getNetLinkList(); | 224 | proxy.getNetLinkList(); |
224 | }else{ | 225 | }else{ |
225 | - proxy.$global.showMsg("添加失败", "success") | 226 | + proxy.$global.showMsg("添加失败", "warning") |
226 | 227 | ||
227 | } | 228 | } |
228 | }) | 229 | }) |
@@ -233,7 +234,17 @@ console.log("jdjdjdjdj",newValue) | @@ -233,7 +234,17 @@ console.log("jdjdjdjdj",newValue) | ||
233 | } | 234 | } |
234 | //添加节点 | 235 | //添加节点 |
235 | let addRes=(row,index)=>{ | 236 | let addRes=(row,index)=>{ |
236 | - console.log("row",row,proxy.nodeData) | 237 | + console.log("row",row,proxy.nodeDataChecked) |
238 | + let checked=false; | ||
239 | + proxy.nodeDataChecked.map((item,index)=>{ | ||
240 | + if(row.id==item.id){ | ||
241 | + checked=true; | ||
242 | + } | ||
243 | + }) | ||
244 | + if(checked){ | ||
245 | + proxy.$global.showMsg('节点已存在','warning') | ||
246 | + | ||
247 | + }else{ | ||
237 | let bNetNodeList=row; | 248 | let bNetNodeList=row; |
238 | bNetNodeList.isAdd=false; | 249 | bNetNodeList.isAdd=false; |
239 | // proxy.iconArr.map((v,i)=>{ | 250 | // proxy.iconArr.map((v,i)=>{ |
@@ -259,6 +270,8 @@ console.log("jdjdjdjdj",newValue) | @@ -259,6 +270,8 @@ console.log("jdjdjdjdj",newValue) | ||
259 | bNetNodeList.nodeType='line'; | 270 | bNetNodeList.nodeType='line'; |
260 | proxy.backLink(bNetNodeList,index); | 271 | proxy.backLink(bNetNodeList,index); |
261 | } | 272 | } |
273 | + } | ||
274 | + | ||
262 | 275 | ||
263 | 276 | ||
264 | } | 277 | } |
@@ -298,6 +311,7 @@ console.log("jdjdjdjdj",newValue) | @@ -298,6 +311,7 @@ console.log("jdjdjdjdj",newValue) | ||
298 | } | 311 | } |
299 | console.log(" proxy.nodeData", proxy.nodeData,proxy.nodeData.length) | 312 | console.log(" proxy.nodeData", proxy.nodeData,proxy.nodeData.length) |
300 | 313 | ||
314 | + proxy.nodeDataChecked=proxy.nodeData.flat(2); | ||
301 | proxy.addSetLIstVisible=false; | 315 | proxy.addSetLIstVisible=false; |
302 | 316 | ||
303 | 317 | ||
@@ -371,6 +385,7 @@ console.log("jdjdjdjdj",newValue) | @@ -371,6 +385,7 @@ console.log("jdjdjdjdj",newValue) | ||
371 | // this.tableVisible=false; | 385 | // this.tableVisible=false; |
372 | this.addSetLIstVisible=true; | 386 | this.addSetLIstVisible=true; |
373 | this.nodeData=[]; | 387 | this.nodeData=[]; |
388 | + this.nodeDataChecked=[]; | ||
374 | this.isClickNet=-1; | 389 | this.isClickNet=-1; |
375 | 390 | ||
376 | }, | 391 | }, |
@@ -405,10 +420,20 @@ console.log("jdjdjdjdj",newValue) | @@ -405,10 +420,20 @@ console.log("jdjdjdjdj",newValue) | ||
405 | this.$global.confirm("确认删除节点吗?", function () { | 420 | this.$global.confirm("确认删除节点吗?", function () { |
406 | that.$global.showMsg("删除成功!") | 421 | that.$global.showMsg("删除成功!") |
407 | that.nodeData.splice(index, 1); | 422 | that.nodeData.splice(index, 1); |
423 | + | ||
424 | + | ||
425 | + that.nodeDataChecked=that.nodeData.flat(2); | ||
408 | that.nodeName=''; | 426 | that.nodeName=''; |
409 | console.log("delette",that.nodeData.length) | 427 | console.log("delette",that.nodeData.length) |
410 | if(that.nodeData.length<1){ | 428 | if(that.nodeData.length<1){ |
411 | that.addSetLIstVisible=true; | 429 | that.addSetLIstVisible=true; |
430 | + }else{ | ||
431 | + if(item.length>1){ | ||
432 | + | ||
433 | + }else{ | ||
434 | + that.nodeData.push([{nodeName:'',id:'',isAdd:true}]) | ||
435 | + | ||
436 | + } | ||
412 | } | 437 | } |
413 | 438 | ||
414 | // that.getNodeData(); | 439 | // that.getNodeData(); |
@@ -450,6 +475,7 @@ console.log("jdjdjdjdj",newValue) | @@ -450,6 +475,7 @@ console.log("jdjdjdjdj",newValue) | ||
450 | }else{ | 475 | }else{ |
451 | that.addSetLIstVisible=true; | 476 | that.addSetLIstVisible=true; |
452 | } | 477 | } |
478 | + that.nodeDataChecked=that.nodeData.flat(2); | ||
453 | } | 479 | } |
454 | }) | 480 | }) |
455 | 481 | ||
@@ -521,6 +547,7 @@ console.log("jdjdjdjdj",newValue) | @@ -521,6 +547,7 @@ console.log("jdjdjdjdj",newValue) | ||
521 | }, | 547 | }, |
522 | //关闭弹框 | 548 | //关闭弹框 |
523 | closeDialog(){ | 549 | closeDialog(){ |
550 | + this.tableVisible=false; | ||
524 | let obj={ | 551 | let obj={ |
525 | networkMonitorList:this.networkMonitorList, | 552 | networkMonitorList:this.networkMonitorList, |
526 | targetId:this.targetId, | 553 | targetId:this.targetId, |
-
Please register or login to post a comment