Authored by 鲁尚清

故障联调 应用配置及网络配置模块风格统一,保存配置时保存模块

1 -<el-dialog v-model="applicationMonitorVisible" :title="titleName" width="90%" @close="closeDialog" top="3vh"> 1 +<cm-dialog :title="titleName" width="90%" :showDialogVisible="applicationMonitorVisible" @hidedialog="closeDialog" :showFooter="false">
  2 + <template v-slot>
2 <el-row> 3 <el-row>
3 <el-col :span="24"> 4 <el-col :span="24">
4 5
@@ -37,7 +38,7 @@ @@ -37,7 +38,7 @@
37 </el-row> 38 </el-row>
38 <el-row class="margin-bottom-50"> 39 <el-row class="margin-bottom-50">
39 <el-col :span="24" class="table-height"> 40 <el-col :span="24" class="table-height">
40 - <cm-table-page v-if="tableDataList" :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList" :multipleSelection="applicationMonitorListChecked" 41 + <cm-table-page v-show="tableDataList" :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList" :multipleSelection="applicationMonitorListChecked"
41 :showIndex="true" :total="count" :showSelection="true" @selectionChange="selectionChange" 42 :showIndex="true" :total="count" :showSelection="true" @selectionChange="selectionChange"
42 :showBorder="true" :loading="false" :pageSize="pageSize" 43 :showBorder="true" :loading="false" :pageSize="pageSize"
43 :showPage="true" :showTools="true" :height="(height - 500)"> 44 :showPage="true" :showTools="true" :height="(height - 500)">
@@ -69,4 +70,7 @@ @@ -69,4 +70,7 @@
69 <el-button @click="cancleList">取消</el-button> 70 <el-button @click="cancleList">取消</el-button>
70 <!-- <el-button @click="saveList" type="primary">保存</el-button>--> 71 <!-- <el-button @click="saveList" type="primary">保存</el-button>-->
71 </div> 72 </div>
72 -</el-dialog> 73 + </template>
  74 +</cm-dialog>
  75 +
  76 +
@@ -2,7 +2,7 @@ export default { @@ -2,7 +2,7 @@ export default {
2 name: 'applicationMoni', 2 name: 'applicationMoni',
3 template: '', 3 template: '',
4 components: {}, 4 components: {},
5 - props:['propsData','applicationMonitorList'], 5 + props:['propsData','applicationMonitorList','isDisplay'],
6 data () { 6 data () {
7 return { 7 return {
8 titleName:'应用配置', 8 titleName:'应用配置',
@@ -36,7 +36,6 @@ export default { @@ -36,7 +36,6 @@ export default {
36 ], 36 ],
37 } 37 }
38 }, 38 },
39 - computed: {},  
40 setup(props){ 39 setup(props){
41 const {proxy} = Vue.getCurrentInstance(); 40 const {proxy} = Vue.getCurrentInstance();
42 let id = proxy.$global.getQueryVariable('configId') ; 41 let id = proxy.$global.getQueryVariable('configId') ;
@@ -57,9 +56,21 @@ export default { @@ -57,9 +56,21 @@ export default {
57 let page=Vue.ref(1);//当前页 56 let page=Vue.ref(1);//当前页
58 let pageSize=Vue.ref(5);//每页显示条数 57 let pageSize=Vue.ref(5);//每页显示条数
59 let modleId=Vue.ref();//模块id 58 let modleId=Vue.ref();//模块id
60 - let applicationMonitorVisible=Vue.ref(true);  
61 let faultConfId=Vue.ref(); 59 let faultConfId=Vue.ref();
62 let bizName=Vue.ref(); 60 let bizName=Vue.ref();
  61 + let name=Vue.ref();
  62 + let applicationMonitorVisible=Vue.ref(false);
  63 +
  64 + Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{
  65 + console.log("010101",newValue)
  66 + proxy.applicationMonitorVisible=newValue;
  67 + if(newValue){
  68 + proxy.setBizId();
  69 + proxy.getNodeList();
  70 + }
  71 +
  72 + })
  73 +
63 let init = () =>{ 74 let init = () =>{
64 proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) { 75 proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) {
65 if (res && res.data) { 76 if (res && res.data) {
@@ -92,6 +103,7 @@ export default { @@ -92,6 +103,7 @@ export default {
92 proxy.faultConfId=props.propsData.faultConfId; 103 proxy.faultConfId=props.propsData.faultConfId;
93 proxy.bizName=props.propsData.bizName; 104 proxy.bizName=props.propsData.bizName;
94 proxy.modleId=props.propsData.modleId; 105 proxy.modleId=props.propsData.modleId;
  106 + proxy.name=props.propsData.name;
95 } 107 }
96 console.log("*",props.propsData,proxy.bizId,proxy.busTypeArr) 108 console.log("*",props.propsData,proxy.bizId,proxy.busTypeArr)
97 109
@@ -138,7 +150,6 @@ export default { @@ -138,7 +150,6 @@ export default {
138 } 150 }
139 //表格全选事件 151 //表格全选事件
140 let selectionChange=(val)=>{ 152 let selectionChange=(val)=>{
141 - console.log("selectionChange",val,val.length)  
142 let selectData=val; 153 let selectData=val;
143 if(selectData.length>0){ 154 if(selectData.length>0){
144 selectData.map((item,index)=>{ 155 selectData.map((item,index)=>{
@@ -158,7 +169,6 @@ export default { @@ -158,7 +169,6 @@ export default {
158 169
159 //添加选中的 170 //添加选中的
160 let saveAll=()=>{ 171 let saveAll=()=>{
161 - console.log("alldata",proxy.tableDataList);  
162 let npmListSelectData=[]; 172 let npmListSelectData=[];
163 proxy.tableDataList.map(item=>{ 173 proxy.tableDataList.map(item=>{
164 if(item.checked){ 174 if(item.checked){
@@ -234,12 +244,14 @@ export default { @@ -234,12 +244,14 @@ export default {
234 proxy.tableDataList=''; 244 proxy.tableDataList='';
235 } 245 }
236 246
  247 +
237 return { 248 return {
238 closeDialog, 249 closeDialog,
239 restData, 250 restData,
240 getNodeList, 251 getNodeList,
241 faultConfId, 252 faultConfId,
242 bizName, 253 bizName,
  254 + name,
243 applicationMonitorVisible, 255 applicationMonitorVisible,
244 applicationMonitorListChecked, 256 applicationMonitorListChecked,
245 setListData, 257 setListData,
@@ -337,8 +349,8 @@ export default { @@ -337,8 +349,8 @@ export default {
337 mounted () { 349 mounted () {
338 // this.init(); 350 // this.init();
339 351
340 - this.setBizId();  
341 - this.getNodeList(); 352 + /* this.setBizId();
  353 + this.getNodeList();*/
342 }, 354 },
343 unmounted () {} 355 unmounted () {}
344 356
@@ -409,9 +409,9 @@ @@ -409,9 +409,9 @@
409 409
410 <div class="network-monitor-popup popup-bg"> 410 <div class="network-monitor-popup popup-bg">
411 <!--网络检测弹窗--> 411 <!--网络检测弹窗-->
412 - <DiagnosisNet v-if="networkMonitorVisible" :propsData="propsData" @callback="getNetworkMonitorList" ></DiagnosisNet> 412 + <DiagnosisNet v-show="networkMonitorVisible" :isDisplay="networkMonitorVisible" :propsData="propsData" @callback="getNetworkMonitorList" ></DiagnosisNet>
413 <!--应用检测弹框--> 413 <!--应用检测弹框-->
414 - <ApplicationMoni v-if="applicationMonitorVisible" :applicationMonitorList="applicationMonitorList" :propsData="propsData" @callbackApp="getApplicationMoniList"></ApplicationMoni> 414 + <ApplicationMoni v-show="applicationMonitorVisible" :isDisplay="applicationMonitorVisible" :applicationMonitorList="applicationMonitorList" :propsData="propsData" @callbackApp="getApplicationMoniList"></ApplicationMoni>
415 <!--APM弹框--> 415 <!--APM弹框-->
416 <APM v-if="APMVisible" :propsData="propsData" @callbackAPM="getAPMList"></APM> 416 <APM v-if="APMVisible" :propsData="propsData" @callbackAPM="getAPMList"></APM>
417 <!--日志监测弹框--> 417 <!--日志监测弹框-->
@@ -435,10 +435,12 @@ export default { @@ -435,10 +435,12 @@ export default {
435 break; 435 break;
436 case "npm": 436 case "npm":
437 //应用检测 437 //应用检测
438 - console.log("add",this.applicationMonitorVisible); 438 + this.configData.map((item,index)=>{
  439 + if(item.type==typeVal){
  440 + item.state='1';
  441 + }
  442 + })
439 this.applicationMonitorVisible=true; 443 this.applicationMonitorVisible=true;
440 - console.log("add1",this.applicationMonitorVisible);  
441 -  
442 break; 444 break;
443 case "base": 445 case "base":
444 //基础环境 446 //基础环境
@@ -535,6 +537,7 @@ export default { @@ -535,6 +537,7 @@ export default {
535 if(this.busTypeArr){ 537 if(this.busTypeArr){
536 this.switchModelDialog(typeVal,index) 538 this.switchModelDialog(typeVal,index)
537 539
  540 +
538 this.setDetailConfig(typeVal); 541 this.setDetailConfig(typeVal);
539 // this.getTargetId(typeVal) 542 // this.getTargetId(typeVal)
540 }else{ 543 }else{
@@ -553,6 +556,9 @@ export default { @@ -553,6 +556,9 @@ export default {
553 console.log("itemdata",itemData) 556 console.log("itemdata",itemData)
554 this.networkMonitorVisible=false; 557 this.networkMonitorVisible=false;
555 this.networkMonitorList=itemData.networkMonitorList; 558 this.networkMonitorList=itemData.networkMonitorList;
  559 + if(itemData.faultConfId){
  560 + this.faultConfId=itemData.faultConfId;
  561 + }
556 this.setTargetId(itemData.targetId); 562 this.setTargetId(itemData.targetId);
557 // this.targetId=itemData.targetId; 563 // this.targetId=itemData.targetId;
558 }, 564 },
1 -<el-dialog v-model="networkMonitorVisible" :title="titleName" width="90%" @close="closeDialog" top="3vh"> 1 +<cm-dialog :title="titleName" width="90%" :showDialogVisible="networkMonitorVisible" @hidedialog="closeDialog" :showFooter="false">
  2 + <template v-slot>
2 <el-row v-if="!tableVisible" class="height-600"> 3 <el-row v-if="!tableVisible" class="height-600">
3 <el-col :span="6"> 4 <el-col :span="6">
4 <div class="grid-content bg-purple network-monitor-popup-left"> 5 <div class="grid-content bg-purple network-monitor-popup-left">
@@ -57,13 +58,13 @@ @@ -57,13 +58,13 @@
57 <li>添加节点</li> 58 <li>添加节点</li>
58 </ul> 59 </ul>
59 </template> 60 </template>
60 - <div @click="addTableList(true)" :class="['step-img','flex-div-center',{'isActive':itemNode[0].nodeName}]"> 61 + <div @click="addTableList(true,itemNode)" :class="['step-img','flex-div-center',{'isActive':itemNode[0].nodeName}]">
61 <i v-if="itemNode[0].nodeName" class="icon-delete-right" @click.stop="deleteNode(item,index)"></i> 62 <i v-if="itemNode[0].nodeName" class="icon-delete-right" @click.stop="deleteNode(item,index)"></i>
62 <i class="icon-step flex-div-center"><img :src="'/src/style/img/restypeimg/'+itemNode[0].resType+'.png'" alt=""></i> 63 <i class="icon-step flex-div-center"><img :src="'/src/style/img/restypeimg/'+itemNode[0].resType+'.png'" alt=""></i>
63 </div> 64 </div>
64 </el-tooltip> 65 </el-tooltip>
65 - <span @click="addTableList(false)" v-if="index+1<nodeData.length && itemNode.length<=1" :class="['list-line','cursorClass',{'isActive':itemNode.length>1}]"></span>  
66 -<!-- <span @click="addTableList(false)" v-if="itemNode.length<=1 && itemNode[0].nodeName" :class="['list-line','cursorClass',{'isActive':itemNode.length>1}]"></span>--> 66 + <!-- <span @click="addTableList(false)" v-if="index+1<nodeData.length && itemNode.length<=1" :class="['list-line','cursorClass',{'isActive':itemNode.length>1}]"></span>-->
  67 + <span @click="addTableList(false,itemNode)" v-if="itemNode.length<=1 && itemNode[0].nodeName" :class="['list-line','cursorClass',{'isActive':itemNode.length>1}]"></span>
67 68
68 <el-tooltip 69 <el-tooltip
69 class="item" 70 class="item"
@@ -78,7 +79,7 @@ @@ -78,7 +79,7 @@
78 <li><span>标识名称:</span>{{itemNode[1].name}}</li> 79 <li><span>标识名称:</span>{{itemNode[1].name}}</li>
79 </ul> 80 </ul>
80 </template> 81 </template>
81 - <span @click="addTableList(false)" v-if="index+1<nodeData.length" :class="['list-line','cursorClass',{'isActive':itemNode.length>1}]"></span> 82 + <span @click="addTableList(false,itemNode)" v-if="index+1<nodeData.length" :class="['list-line','cursorClass',{'isActive':itemNode.length>1}]"></span>
82 </el-tooltip> 83 </el-tooltip>
83 </div> 84 </div>
84 <div v-show="itemNode[0].nodeName" class="list-step-name flex-div-start"> 85 <div v-show="itemNode[0].nodeName" class="list-step-name flex-div-start">
@@ -96,7 +97,7 @@ @@ -96,7 +97,7 @@
96 </el-row> 97 </el-row>
97 <el-row v-if="addSetLIstVisible"> 98 <el-row v-if="addSetLIstVisible">
98 <div class="flex-div"> 99 <div class="flex-div">
99 - <img class="cursorClass" style="max-width: 100%;" @click="addTableList(true)" src="/vue3/src/assets/images/faultDiagnosis/icon-add-node.png" alt=""> 100 + <img class="cursorClass" style="max-width: 100%;" @click="addTableList(true,-1)" src="/vue3/src/assets/images/faultDiagnosis/icon-add-node.png" alt="">
100 </div> 101 </div>
101 </el-row> 102 </el-row>
102 103
@@ -140,7 +141,7 @@ @@ -140,7 +141,7 @@
140 :label="item.kpiName" :value="item.kpiId"></el-option> 141 :label="item.kpiName" :value="item.kpiId"></el-option>
141 </el-select> 142 </el-select>
142 143
143 -<!-- <el-input style="width:160px;" class="margin-right-10" v-model="keyWords" placeholder="输入关键字" />--> 144 + <!-- <el-input style="width:160px;" class="margin-right-10" v-model="keyWords" placeholder="输入关键字" />-->
144 145
145 <div class="flex-div-start"> 146 <div class="flex-div-start">
146 <el-button type="primary" @click="onReset()">重置</el-button> 147 <el-button type="primary" @click="onReset()">重置</el-button>
@@ -179,6 +180,8 @@ @@ -179,6 +180,8 @@
179 </el-row> 180 </el-row>
180 <div v-if="tableVisible" class="margin-top flex-center position-bottom"> 181 <div v-if="tableVisible" class="margin-top flex-center position-bottom">
181 <el-button @click="cancleList">取消</el-button> 182 <el-button @click="cancleList">取消</el-button>
182 -<!-- <el-button @click="saveList" type="primary">保存</el-button>--> 183 + <!-- <el-button @click="saveList" type="primary">保存</el-button>-->
183 </div> 184 </div>
184 -</el-dialog> 185 + </template>
  186 +</cm-dialog>
  187 +
@@ -2,7 +2,7 @@ export default { @@ -2,7 +2,7 @@ export default {
2 name: 'diagnosisNet', 2 name: 'diagnosisNet',
3 template: '', 3 template: '',
4 components: {}, 4 components: {},
5 - props:['propsData'], 5 + props:['propsData','isDisplay'],
6 data () { 6 data () {
7 return { 7 return {
8 titleName:'故障新增内容', 8 titleName:'故障新增内容',
@@ -10,7 +10,7 @@ export default { @@ -10,7 +10,7 @@ export default {
10 apiUrl2:'/api-web/fault/conf/netLink/getNetLinkList',//根据targetId获取链路信息列表 10 apiUrl2:'/api-web/fault/conf/netLink/getNetLinkList',//根据targetId获取链路信息列表
11 tableVisible:false,//添加配置列表是否显示 11 tableVisible:false,//添加配置列表是否显示
12 flag:true,//是否是点进入true 还是线进入false 12 flag:true,//是否是点进入true 还是线进入false
13 - networkMonitorVisible: true, 13 + // networkMonitorVisible: true,
14 isClickNet:-1,//配置链接选择 14 isClickNet:-1,//配置链接选择
15 //网络检测配置链路列表 15 //网络检测配置链路列表
16 networkMonitorList: [ 16 networkMonitorList: [
@@ -96,6 +96,21 @@ export default { @@ -96,6 +96,21 @@ export default {
96 let iconArr=Vue.ref([]); 96 let iconArr=Vue.ref([]);
97 let page=Vue.ref(1);//当前页 97 let page=Vue.ref(1);//当前页
98 let pageSize=Vue.ref(5);//每页显示条数 98 let pageSize=Vue.ref(5);//每页显示条数
  99 + let networkMonitorVisible=Vue.ref(false);
  100 + let modleId=Vue.ref();//模块id
  101 + let faultConfId=Vue.ref();
  102 + let bizName=Vue.ref();
  103 + let name=Vue.ref();
  104 +
  105 + Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{
  106 +
  107 + proxy.networkMonitorVisible=newValue;
  108 + if(newValue){
  109 + proxy.setBizId();
  110 + proxy.getNetLinkList();
  111 + }
  112 +
  113 + })
99 let init = () =>{ 114 let init = () =>{
100 //根据业务id获取资源列表 115 //根据业务id获取资源列表
101 let paramsRes={ 116 let paramsRes={
@@ -108,11 +123,11 @@ export default { @@ -108,11 +123,11 @@ export default {
108 }) 123 })
109 proxy.getResData(); 124 proxy.getResData();
110 125
111 - proxy.$http.get("/api-web/home/business/findAllBusType", {}, function(res) {  
112 - if (res && res.data) {  
113 - proxy.busTypeList = res.data;  
114 - }  
115 - }) 126 + // proxy.$http.get("/api-web/home/business/findAllBusType", {}, function(res) {
  127 + // if (res && res.data) {
  128 + // proxy.busTypeList = res.data;
  129 + // }
  130 + // })
116 131
117 } 132 }
118 let getResData=()=>{ 133 let getResData=()=>{
@@ -167,7 +182,10 @@ export default { @@ -167,7 +182,10 @@ export default {
167 let bNetNodeList=proxy.nodeData.flat(2); 182 let bNetNodeList=proxy.nodeData.flat(2);
168 console.log('aarr--',bNetNodeList) 183 console.log('aarr--',bNetNodeList)
169 // bNetNodeList.nodeName=proxy.nodeName; 184 // bNetNodeList.nodeName=proxy.nodeName;
  185 + if(bNetNodeList[bNetNodeList.length-1].isAdd){
170 bNetNodeList.splice(bNetNodeList.length-1,1); 186 bNetNodeList.splice(bNetNodeList.length-1,1);
  187 +
  188 + }
171 console.log('&&',bNetNodeList) 189 console.log('&&',bNetNodeList)
172 bNetNodeList.map((item,index)=>{ 190 bNetNodeList.map((item,index)=>{
173 item.sort=index; 191 item.sort=index;
@@ -192,6 +210,8 @@ export default { @@ -192,6 +210,8 @@ export default {
192 if(res.object){ 210 if(res.object){
193 proxy.targetId=res.object.targetId 211 proxy.targetId=res.object.targetId
194 212
  213 + proxy.saveModel();
  214 +
195 } 215 }
196 216
197 proxy.getNetLinkList(); 217 proxy.getNetLinkList();
@@ -247,20 +267,24 @@ export default { @@ -247,20 +267,24 @@ export default {
247 console.log("isadd",row.isAdd) 267 console.log("isadd",row.isAdd)
248 // if(row.isAdd){ 268 // if(row.isAdd){
249 //isAdd为true代表是添加 269 //isAdd为true代表是添加
250 - proxy.nodeData.splice(length-1,0,[row]); 270 + // proxy.nodeData.splice(length-1,0,[row]);
  271 + proxy.nodeData.splice(length-1,1,[row]);
251 // }else{ 272 // }else{
252 //isAdd为false代表是修改 273 //isAdd为false代表是修改
253 // proxy.nodeData.splice(index,1,[row]); 274 // proxy.nodeData.splice(index,1,[row]);
254 // } 275 // }
255 }else{ 276 }else{
256 //插入的是线 277 //插入的是线
257 - proxy.nodeData[length-2].push(row); 278 + // proxy.nodeData[length-2].push(row);
  279 + proxy.nodeData[length-1].push(row);
  280 + proxy.nodeData.push([{nodeName:'',id:'',isAdd:true}])
  281 +
258 } 282 }
259 283
260 284
261 }else{ 285 }else{
262 proxy.nodeData.push([row]); 286 proxy.nodeData.push([row]);
263 - proxy.nodeData.push([{nodeName:'',id:'',isAdd:true}]) 287 + // proxy.nodeData.push([{nodeName:'',id:'',isAdd:true}])
264 288
265 } 289 }
266 console.log(" proxy.nodeData", proxy.nodeData,proxy.nodeData.length) 290 console.log(" proxy.nodeData", proxy.nodeData,proxy.nodeData.length)
@@ -274,12 +298,22 @@ export default { @@ -274,12 +298,22 @@ export default {
274 proxy.bizId=props.propsData.bizId; 298 proxy.bizId=props.propsData.bizId;
275 proxy.targetId=props.propsData.targetId; 299 proxy.targetId=props.propsData.targetId;
276 proxy.busTypeArr=[props.propsData.bizId]; 300 proxy.busTypeArr=[props.propsData.bizId];
  301 + proxy.faultConfId=props.propsData.faultConfId;
  302 + proxy.bizName=props.propsData.bizName;
  303 + proxy.modleId=props.propsData.modleId;
  304 + proxy.name=props.propsData.name;
277 } 305 }
278 console.log("*",props.propsData,proxy.bizId,proxy.busTypeArr) 306 console.log("*",props.propsData,proxy.bizId,proxy.busTypeArr)
279 307
280 } 308 }
281 309
  310 +
282 return { 311 return {
  312 + faultConfId,
  313 + bizName,
  314 + modleId,
  315 + name,
  316 + networkMonitorVisible,
283 page, 317 page,
284 pageSize, 318 pageSize,
285 addRes, 319 addRes,
@@ -397,10 +431,12 @@ export default { @@ -397,10 +431,12 @@ export default {
397 let length=that.nodeData.length; 431 let length=that.nodeData.length;
398 if(that.nodeData.length>0){ 432 if(that.nodeData.length>0){
399 that.addSetLIstVisible=false; 433 that.addSetLIstVisible=false;
400 - // if(that.nodeData[length-1].length>1){ 434 + let length1=that.nodeData[length-1].length;
  435 + console.log("length1",length1)
  436 + if(length1>1){
401 that.nodeData.push([{nodeName:'',id:'',isAdd:true}]) 437 that.nodeData.push([{nodeName:'',id:'',isAdd:true}])
402 438
403 - // } 439 + }
404 440
405 }else{ 441 }else{
406 that.addSetLIstVisible=true; 442 that.addSetLIstVisible=true;
@@ -416,7 +452,12 @@ export default { @@ -416,7 +452,12 @@ export default {
416 452
417 }, 453 },
418 //点击进入添加节点页面 454 //点击进入添加节点页面
419 - addTableList(flag){ 455 + addTableList(flag,itemNode){
  456 + console.log("itemNode",itemNode)
  457 + // if(itemNode==-1 || itemNode.length>0){
  458 + // if(itemNode.length==1){
  459 + // if(itemNode[0])
  460 + // }
420 this.flag=flag; 461 this.flag=flag;
421 this.tableVisible=true; 462 this.tableVisible=true;
422 if(flag){ 463 if(flag){
@@ -426,6 +467,8 @@ export default { @@ -426,6 +467,8 @@ export default {
426 this.titleName='网络配置'; 467 this.titleName='网络配置';
427 this.init(); 468 this.init();
428 this.getNodeList(); 469 this.getNodeList();
  470 + // }
  471 +
429 }, 472 },
430 //取消节点列表配置 473 //取消节点列表配置
431 cancleList(){ 474 cancleList(){
@@ -471,7 +514,8 @@ export default { @@ -471,7 +514,8 @@ export default {
471 closeDialog(){ 514 closeDialog(){
472 let obj={ 515 let obj={
473 networkMonitorList:this.networkMonitorList, 516 networkMonitorList:this.networkMonitorList,
474 - targetId:this.targetId 517 + targetId:this.targetId,
  518 + faultConfId:this.faultConfId,
475 } 519 }
476 this.$emit('callback', obj); 520 this.$emit('callback', obj);
477 }, 521 },
@@ -490,13 +534,44 @@ export default { @@ -490,13 +534,44 @@ export default {
490 534
491 } 535 }
492 }); 536 });
  537 + },
  538 + //保存模块
  539 + saveModel(){
  540 + let that=this;
  541 + let params={
  542 + type:'npm',
  543 + targetId:this.targetId,
  544 + state:'1',
  545 + id:this.modleId,
  546 + faultConfig:{
  547 + id:this.faultConfId,
  548 + name:this.name,
  549 + bizId: this.bizId,
  550 + bizName:this.bizName,
  551 + createBy:localStorage.getItem("lgn")
  552 + }
  553 + }
  554 + this.$http.post('/api-web/fault/conf/detail/saveConfigDetail',params,function (res){
  555 + if(res && res.success){
  556 + that.targetId=res.map.configDetail.targetId;
  557 + that.faultConfId=res.map.configDetail.faultConfId;
  558 +
  559 + // that.$global.showMsg('保存成功','success')
  560 + that.networkMonitorVisible=false;
  561 +
  562 + }else{
  563 + that.$global.showMsg('模块保存失败','warning')
  564 +
  565 + }
  566 +
  567 + })
493 } 568 }
494 569
495 }, 570 },
496 mounted () { 571 mounted () {
497 // this.getAllIcon(); 572 // this.getAllIcon();
498 - this.setBizId();  
499 - this.getNetLinkList(); 573 + /* this.setBizId();
  574 + this.getNetLinkList();*/
500 // this.getNodeData(); 575 // this.getNodeData();
501 }, 576 },
502 unmounted () {} 577 unmounted () {}