Authored by 王涛

Merge branch 'master-V32-LH' into 'master'

拨测功能前端开发



See merge request !377
@@ -41,6 +41,9 @@ @@ -41,6 +41,9 @@
41 <el-col :span="3"> 41 <el-col :span="3">
42 <el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==5}]" @click="apmMonitorFunc(5)" shadow="hover"><span class="card-name">APM</span></el-card> 42 <el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==5}]" @click="apmMonitorFunc(5)" shadow="hover"><span class="card-name">APM</span></el-card>
43 </el-col> 43 </el-col>
  44 + <el-col :span="3">
  45 + <el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==6}]" @click="dialtestMonitorFunc(6)" shadow="hover"><span class="card-name">拨测分析</span></el-card>
  46 + </el-col>
44 <!-- <el-col :span="3">--> 47 <!-- <el-col :span="3">-->
45 <!-- <el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==6}]" @click="logDetectionFunc(6)" shadow="hover"><span class="card-name">日志检测</span></el-card>--> 48 <!-- <el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==6}]" @click="logDetectionFunc(6)" shadow="hover"><span class="card-name">日志检测</span></el-card>-->
46 <!-- </el-col>--> 49 <!-- </el-col>-->
@@ -342,6 +345,46 @@ @@ -342,6 +345,46 @@
342 345
343 </div> 346 </div>
344 347
  348 + <!--拨测分析-->
  349 + <div class="application-monitor margin-30" v-if="dialtestMonitorHide">
  350 + <el-row>
  351 + <el-col :span="6">
  352 + <div class="title-text">
  353 + <img src="./src/assets/images/faultDiagnosis/icon-yyjc.png" class="title-img">
  354 + <span>拨测分析</span>
  355 + </div>
  356 + </el-col>
  357 + </el-row>
  358 + <el-row>
  359 + <el-col :span="24">
  360 + <div class="context-radio flex-div-start margin-30">
  361 + <span class="fault-book-input-text">状态选择</span>
  362 + <el-radio v-model="faultDialtestRadio" label="1">启用</el-radio>
  363 + <el-radio v-model="faultDialtestRadio" label="0">不启用</el-radio>
  364 + </div>
  365 + </el-col>
  366 + </el-row>
  367 + <el-row>
  368 + <el-col :span="24">
  369 + <div class="context-multiple-choice flex-div-start margin-30 flex-div-wrap overflow-scroll-y">
  370 + <div class="btn-el-btn margin-bottom-10" v-for="(item, index) in dialtestMonitorList" :key="index">
  371 + <div>
  372 + <el-button :disabled="faultDialtestRadio==0" class="multiple-choice-button" type="primary">{{item.taskName}}</el-button>
  373 + <!-- <img :id="item.id" @click="deleteItem(item.id, applicationMonitorList)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon cursorClass">-->
  374 + <img :id="item.id" v-if="faultDialtestRadio==1" @click="deleteDialtest(item)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon cursorClass">
  375 + <img src="" v-else style="width:12px;height:12px;" class="multiple-choice-icon" alt="">
  376 + </div>
  377 +
  378 + </div>
  379 + <div class="flex-div btn-el-btn margin-bottom-10" v-if="faultDialtestRadio==1">
  380 + <el-button class="multiple-choice-button color-999" @click="addDialtestMonitor()">添加拨测分析</el-button>
  381 + <img src="./src/assets/images/faultDiagnosis/icon-item-add.png" class="multiple-choice-add-icon">
  382 + </div>
  383 + </div>
  384 + </el-col>
  385 + </el-row>
  386 + </div>
  387 +
345 <!--日志检测--> 388 <!--日志检测-->
346 <div class="log-detection margin-30" v-if="logDetectionHide"> 389 <div class="log-detection margin-30" v-if="logDetectionHide">
347 <el-row> 390 <el-row>
@@ -423,12 +466,11 @@ @@ -423,12 +466,11 @@
423 <BasicEnvironmentAdd v-show="baseVisible" :isDisplay="baseVisible" :baseList="baseList" :baseCount="count" :propsData="propsData" @callbackBase="getBasicEnvironmentList"></BasicEnvironmentAdd> 466 <BasicEnvironmentAdd v-show="baseVisible" :isDisplay="baseVisible" :baseList="baseList" :baseCount="count" :propsData="propsData" @callbackBase="getBasicEnvironmentList"></BasicEnvironmentAdd>
424 <!--APM弹框--> 467 <!--APM弹框-->
425 <APM v-show="APMVisible" :isDisplay="APMVisible" :apmMonitorList="apmMonitorList" :propsData="propsData" @callbackAPM="getAPMList"></APM> 468 <APM v-show="APMVisible" :isDisplay="APMVisible" :apmMonitorList="apmMonitorList" :propsData="propsData" @callbackAPM="getAPMList"></APM>
  469 + <!--拨测分析弹框-->
  470 + <DialTest v-show="dialtestMonitorVisible" :isDisplay="dialtestMonitorVisible" :dialtestMonitorList="dialtestMonitorList" :propsData="propsData" @callbackApp="getDialtestMoniList"></DialTest>
426 <!--日志监测弹框--> 471 <!--日志监测弹框-->
427 <LogMonition v-if="logMonitionVisible" :propsData="propsData" @callbackLog="getLogMonitionList"></LogMonition> 472 <LogMonition v-if="logMonitionVisible" :propsData="propsData" @callbackLog="getLogMonitionList"></LogMonition>
428 <!--订阅人员弹框--> 473 <!--订阅人员弹框-->
429 <SubscriptionReport v-if="subscriptionReportVisible" :propsData="propsData" @callbackSub="getSubscriptionReportList"></SubscriptionReport> 474 <SubscriptionReport v-if="subscriptionReportVisible" :propsData="propsData" @callbackSub="getSubscriptionReportList"></SubscriptionReport>
430 </div> 475 </div>
431 -  
432 -  
433 -  
434 </div> 476 </div>
@@ -14,6 +14,9 @@ export default { @@ -14,6 +14,9 @@ export default {
14 'APM': Vue.defineAsyncComponent( 14 'APM': Vue.defineAsyncComponent(
15 () => myImport('views/faultDiagnosis/components/APM/index') 15 () => myImport('views/faultDiagnosis/components/APM/index')
16 ),//APM组件 16 ),//APM组件
  17 + 'DialTest': Vue.defineAsyncComponent(
  18 + () => myImport('views/faultDiagnosis/components/dialTest/index')
  19 + ),//拨测分析组件
17 'LogMonition': Vue.defineAsyncComponent( 20 'LogMonition': Vue.defineAsyncComponent(
18 () => myImport('views/faultDiagnosis/components/logMonition/index') 21 () => myImport('views/faultDiagnosis/components/logMonition/index')
19 ),//日志监测组件 22 ),//日志监测组件
@@ -35,6 +38,7 @@ export default { @@ -35,6 +38,7 @@ export default {
35 applicationMonitorHide: false, 38 applicationMonitorHide: false,
36 basicEnvironmentHide: false, 39 basicEnvironmentHide: false,
37 apmMonitorHide: false, 40 apmMonitorHide: false,
  41 + dialtestMonitorHide: false,
38 logDetectionHide: false, 42 logDetectionHide: false,
39 subscriptionReportHide: false, 43 subscriptionReportHide: false,
40 44
@@ -62,6 +66,8 @@ export default { @@ -62,6 +66,8 @@ export default {
62 applicationMonitorList: [], 66 applicationMonitorList: [],
63 //APM 67 //APM
64 apmMonitorList: [], 68 apmMonitorList: [],
  69 + //拨测分析选中项集合
  70 + dialtestMonitorList: [],
65 //日志检测 71 //日志检测
66 logDetectionList: [ 72 logDetectionList: [
67 { 73 {
@@ -128,6 +134,7 @@ export default { @@ -128,6 +134,7 @@ export default {
128 let faultStateRadio=Vue.ref('0');//状态启用不启用 134 let faultStateRadio=Vue.ref('0');//状态启用不启用
129 let faultApplicationRadio=Vue.ref('0');//应用检测 135 let faultApplicationRadio=Vue.ref('0');//应用检测
130 let faultEnvironmentRadio=Vue.ref('0');//基础环境 136 let faultEnvironmentRadio=Vue.ref('0');//基础环境
  137 + let faultDialtestRadio=Vue.ref('0');//拨测分析
131 let faultAPMRadio=Vue.ref('0');//APM 138 let faultAPMRadio=Vue.ref('0');//APM
132 let faultLogRadio=Vue.ref('0');//日志 139 let faultLogRadio=Vue.ref('0');//日志
133 //故障名称 140 //故障名称
@@ -170,6 +177,7 @@ export default { @@ -170,6 +177,7 @@ export default {
170 {type:'npm',targetId:''}, 177 {type:'npm',targetId:''},
171 {type:'base',targetId:''}, 178 {type:'base',targetId:''},
172 {type:'apm',targetId:''}, 179 {type:'apm',targetId:''},
  180 + {type:'dialtest',targetId:''},
173 {type:'log',targetId:''}, 181 {type:'log',targetId:''},
174 {type:'report',targetId:''}, 182 {type:'report',targetId:''},
175 ] 183 ]
@@ -214,6 +222,7 @@ export default { @@ -214,6 +222,7 @@ export default {
214 faultApplicationRadio, 222 faultApplicationRadio,
215 faultEnvironmentRadio, 223 faultEnvironmentRadio,
216 faultAPMRadio, 224 faultAPMRadio,
  225 + faultDialtestRadio,
217 faultLogRadio, 226 faultLogRadio,
218 addAlarmList, 227 addAlarmList,
219 alarmDataList, 228 alarmDataList,
@@ -248,6 +257,7 @@ export default { @@ -248,6 +257,7 @@ export default {
248 this.applicationMonitorHide = false; 257 this.applicationMonitorHide = false;
249 this.basicEnvironmentHide = false; 258 this.basicEnvironmentHide = false;
250 this.apmMonitorHide = false; 259 this.apmMonitorHide = false;
  260 + this.dialtestMonitorHide = false;
251 this.logDetectionHide = false; 261 this.logDetectionHide = false;
252 this.subscriptionReportHide = false; 262 this.subscriptionReportHide = false;
253 }, 263 },
@@ -350,6 +360,29 @@ export default { @@ -350,6 +360,29 @@ export default {
350 this.setDetailConfig(this.type) 360 this.setDetailConfig(this.type)
351 this.getApmListInfo(); 361 this.getApmListInfo();
352 }, 362 },
  363 + //拨测分析
  364 + dialtestMonitorFunc(index){
  365 + if(!this.isSaveModel()){
  366 + return;
  367 + }
  368 + if(this.configData){
  369 + this.configData.map(item=>{
  370 + if(item.type=='dialtest'){
  371 + this.modleId=item.id;
  372 + }
  373 + })
  374 + }
  375 +
  376 + this.hiddenAll();
  377 + this.dialtestMonitorHide = true;
  378 + this.isActiveIndex=index;
  379 + this.type='dialtest';
  380 + this.state=this.faultDialtestRadio;
  381 + this.setDetailConfig(this.type)
  382 +
  383 + this.getDialtestList();
  384 + },
  385 +
353 //日志检测 386 //日志检测
354 logDetectionFunc(index){ 387 logDetectionFunc(index){
355 if(!this.isSaveModel()){ 388 if(!this.isSaveModel()){
@@ -420,6 +453,10 @@ export default { @@ -420,6 +453,10 @@ export default {
420 //APM 453 //APM
421 this.apmMonitorList = newList; 454 this.apmMonitorList = newList;
422 break; 455 break;
  456 + case "dialtestMonitor":
  457 + //拨测分析
  458 + this.dialtestMonitorList = newList;
  459 + break;
423 case "logDetection": 460 case "logDetection":
424 //日志检测 461 //日志检测
425 this.logDetectionList = newList; 462 this.logDetectionList = newList;
@@ -480,6 +517,18 @@ export default { @@ -480,6 +517,18 @@ export default {
480 } 517 }
481 this.APMVisible=true; 518 this.APMVisible=true;
482 break; 519 break;
  520 + case "dialtest":
  521 + //拨测分析
  522 + if(this.configData){
  523 + this.configData.map((item,index)=>{
  524 + if(item.type==typeVal){
  525 + item.state='1';
  526 + }
  527 + })
  528 + }
  529 +
  530 + this.dialtestMonitorVisible=true;
  531 + break;
483 case "log": 532 case "log":
484 //日志检测 533 //日志检测
485 this.logMonitionVisible=true; 534 this.logMonitionVisible=true;
@@ -548,6 +597,10 @@ export default { @@ -548,6 +597,10 @@ export default {
548 //APM 597 //APM
549 this.faultAPMRadio=state; 598 this.faultAPMRadio=state;
550 break; 599 break;
  600 + case "dialtest":
  601 + //拨测分析
  602 + this.faultDialtestRadio=state;
  603 + break;
551 case "log": 604 case "log":
552 //日志检测 605 //日志检测
553 this.faultLogRadio=state; 606 this.faultLogRadio=state;
@@ -562,9 +615,7 @@ export default { @@ -562,9 +615,7 @@ export default {
562 //给弹框传值分类型 615 //给弹框传值分类型
563 postPropsData(typeVal,index){ 616 postPropsData(typeVal,index){
564 if(this.busTypeArr){ 617 if(this.busTypeArr){
565 - this.switchModelDialog(typeVal,index)  
566 -  
567 - 618 + this.switchModelDialog(typeVal,index)
568 this.setDetailConfig(typeVal); 619 this.setDetailConfig(typeVal);
569 // this.getTargetId(typeVal) 620 // this.getTargetId(typeVal)
570 }else{ 621 }else{
@@ -698,6 +749,38 @@ export default { @@ -698,6 +749,38 @@ export default {
698 } 749 }
699 }) 750 })
700 }, 751 },
  752 +
  753 + //点击添加拨测分析
  754 + addDialtestMonitor(){
  755 + this.postPropsData('dialtest')
  756 + },
  757 + //关闭拨测分析弹框
  758 + getDialtestMoniList(itemData){
  759 + this.applicationMonitorVisible=false;
  760 + if(itemData.faultConfId){
  761 + this.faultConfId=itemData.faultConfId;
  762 + }
  763 + this.setTargetId(itemData.targetId);
  764 +
  765 + // this.targetId=itemData;
  766 + // this.applicationMonitorList=itemData;
  767 + this.getDialtestList();
  768 + },
  769 + //获取拨测分析列表数据
  770 + getDialtestList(){
  771 + let that=this;
  772 + this.getTargetId('dialtest')
  773 + let params={
  774 + targetId:this.targetId,
  775 + bizId:this.busTypeArr
  776 + }
  777 + this.$http.get('/api-web/fault/conf/dialtest/dialtestList',params,function (res){
  778 + if(res && res.data){
  779 + that.dialtestMonitorList=res.data;
  780 + }
  781 + })
  782 + },
  783 +
701 //点击添加日志监测弹框 784 //点击添加日志监测弹框
702 addLogMonitor(){ 785 addLogMonitor(){
703 this.postPropsData('log') 786 this.postPropsData('log')
@@ -800,13 +883,16 @@ export default { @@ -800,13 +883,16 @@ export default {
800 break; 883 break;
801 case "base": 884 case "base":
802 //基础环境 885 //基础环境
803 -  
804 this.state=this.faultEnvironmentRadio; 886 this.state=this.faultEnvironmentRadio;
805 break; 887 break;
806 case "apm": 888 case "apm":
807 //APM 889 //APM
808 this.state=this.faultAPMRadio; 890 this.state=this.faultAPMRadio;
809 break; 891 break;
  892 + case "dialtest":
  893 + //拨测分析
  894 + this.state=this.faultDialtestRadio;
  895 + break;
810 case "log": 896 case "log":
811 //日志检测 897 //日志检测
812 this.state=this.faultLogRadio; 898 this.state=this.faultLogRadio;
@@ -889,6 +975,10 @@ export default { @@ -889,6 +975,10 @@ export default {
889 //APM 975 //APM
890 this.getApmListInfo(); 976 this.getApmListInfo();
891 break; 977 break;
  978 + case "dialtest":
  979 + //应用检测
  980 + this.getDialtestList();
  981 + break;
892 case "log": 982 case "log":
893 //日志检测 983 //日志检测
894 break; 984 break;
@@ -926,12 +1016,8 @@ export default { @@ -926,12 +1016,8 @@ export default {
926 that.kpiId=that.alarmList[0].kpiId; 1016 that.kpiId=that.alarmList[0].kpiId;
927 1017
928 } 1018 }
929 -  
930 } 1019 }
931 -  
932 }) 1020 })
933 -  
934 -  
935 }, 1021 },
936 //通过bizId查找bizName 1022 //通过bizId查找bizName
937 getBizName(bizId){ 1023 getBizName(bizId){
@@ -1068,6 +1154,19 @@ export default { @@ -1068,6 +1154,19 @@ export default {
1068 } 1154 }
1069 }) 1155 })
1070 }, 1156 },
  1157 + //删除拨测分析
  1158 + deleteDialtest(item){
  1159 + let that=this;
  1160 + let params={
  1161 + id:item.id
  1162 + }
  1163 + this.$http.get('/api-web/fault/conf/dialtest/deleteById',params,function (res){
  1164 + if(res){
  1165 + that.$global.showMsg('删除成功');
  1166 + that.getDialtestList();
  1167 + }
  1168 + })
  1169 + },
1071 //更改业务选择 1170 //更改业务选择
1072 changeBUsType(val){ 1171 changeBUsType(val){
1073 if(val){ 1172 if(val){
@@ -1115,6 +1214,9 @@ export default { @@ -1115,6 +1214,9 @@ export default {
1115 if(that.type=='npm'){ 1214 if(that.type=='npm'){
1116 that.getAppList(); 1215 that.getAppList();
1117 } 1216 }
  1217 + if(that.type=='dialtest'){
  1218 + that.getDialtestList();
  1219 + }
1118 }) 1220 })
1119 }, 1221 },
1120 //返回首页 1222 //返回首页
  1 +<cm-dialog :title="titleName" width="90%" :showDialogVisible="dialtestMonitorVisible" @hidedialog="closeDialog" :showFooter="false">
  2 + <template v-slot>
  3 + <el-row>
  4 + <el-col :span="24">
  5 +
  6 + <div class="set-add-div">
  7 + <el-row>
  8 + <el-col :span="24">
  9 + <div class="flex-div-start margin-top-bottom-10">
  10 + <el-input style="width:160px;" class="margin-right-10" v-model="keyWords" placeholder="输入关键字" />
  11 +
  12 + <div class="flex-div-start">
  13 + <el-button type="primary" @click="onReset()">重置</el-button>
  14 + <el-button type="primary" @click="onBtnSearch()" style="margin-left: 10px">查询</el-button>
  15 + <el-button type="primary" :disabled="isLoading" @click="saveAll()" style="margin-left: 10px">批量添加</el-button>
  16 + <el-button type="primary" :disabled="isLoading" @click="saveAlldata()" style="margin-left: 10px">全部添加</el-button>
  17 + </div>
  18 + </div>
  19 + </el-col>
  20 + </el-row>
  21 + <el-row class="margin-bottom-50">
  22 + <el-col :span="24" class="table-height">
  23 + <cm-table-page v-show="tableDataList" :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList" :multipleSelection="dialtestMonitorListChecked"
  24 + :showIndex="true" :total="count" :showSelection="true" @selectionChange="selectionChange"
  25 + :showBorder="true" :loading="false" :pageSize="pageSize"
  26 + :showPage="true" :showTools="true" :height="(height - 500)">
  27 + <template #default="{row,prop,column}">
  28 + <div v-if="prop == 'url'" class="text-overflow" :title="row.url">
  29 + <span class="">{{row.url }}</span>
  30 +
  31 + </div>
  32 + </template>
  33 + <template #tools="{scope}">
  34 + <el-button type="text" size="small" @click.prevent="addRes(scope.row,scope.$index)">
  35 + <i class="el-icon-plus"/> 添加
  36 + </el-button>
  37 + </template>
  38 + </cm-table-page>
  39 + </el-col>
  40 +
  41 + </el-row>
  42 + </div>
  43 + </el-col>
  44 + </el-row>
  45 + <div class="margin-top btn-faultDiagnosis flex-center position-bottom">
  46 + <el-button @click="cancleList">取消</el-button>
  47 + <!-- <el-button @click="saveList" type="primary">保存</el-button>-->
  48 + </div>
  49 + </template>
  50 +</cm-dialog>
  51 +
  52 +
  1 +export default {
  2 + name: 'dialTest',
  3 + template: '',
  4 + components: {},
  5 + props:['propsData','dialtestMonitorList','isDisplay'],
  6 + data () {
  7 + return {
  8 + titleName:'拨测分析配置',
  9 + // applicationMonitorVisible: true,
  10 + columns:[
  11 +
  12 + {
  13 + prop: 'taskName',
  14 + label: '链路名称',
  15 + sortable: true,
  16 + width:'260',
  17 + align: 'center',
  18 + },
  19 + {
  20 + prop: 'url',
  21 + label: 'url',
  22 + sortable: true,
  23 + align: 'center',
  24 + },
  25 + ],
  26 + }
  27 + },
  28 + setup(props){
  29 + const {proxy} = Vue.getCurrentInstance();
  30 + let id = proxy.$global.getQueryVariable('configId') ;
  31 + let config = Vue.ref(id == false ? null : id);
  32 + let count=Vue.ref(0);
  33 + let tableDataList = Vue.ref([]);
  34 + let resTypeArr = Vue.ref([]);
  35 + let kpiTypeArr = Vue.ref([]);
  36 + let busTypeArr = Vue.ref([]);
  37 + let bizId=Vue.ref();//所属业务id
  38 + let targetId=Vue.ref();//所属模块id
  39 + let keyWords= Vue.ref('');
  40 + let resTypeList = Vue.ref([]);
  41 + let kpiList = Vue.ref([]);
  42 + let busTypeList = Vue.ref([]);
  43 + let networkMonitorList=Vue.ref([]);
  44 + let isLoading=Vue.ref(false);//按钮加载中
  45 + let page=Vue.ref(1);//当前页
  46 + let pageSize=Vue.ref(10);//每页显示条数
  47 + let modleId=Vue.ref();//模块id
  48 + let faultConfId=Vue.ref();
  49 + let bizName=Vue.ref();
  50 + let name=Vue.ref();
  51 + let dialtestMonitorVisible=Vue.ref(false);
  52 +
  53 + Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{
  54 + proxy.dialtestMonitorVisible=newValue;
  55 + if(newValue){
  56 + proxy.setBizId();
  57 + proxy.getNodeList();
  58 + }
  59 +
  60 + })
  61 +
  62 + let init = () =>{
  63 + proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) {
  64 + if (res && res.data) {
  65 + proxy.kpiList = res.data;
  66 + }
  67 + })
  68 +
  69 + proxy.$http.get("/api-web/home/business/findAllBusType", {}, function(res) {
  70 + if (res && res.data) {
  71 + proxy.busTypeList = res.data;
  72 + }
  73 + })
  74 + }
  75 + let onReset = () => {
  76 + proxy.keyWords = '';
  77 + proxy.resTypeArr = [];
  78 + proxy.kpiTypeArr = [];
  79 + proxy.busTypeArr = [];
  80 + }
  81 + // 点击按钮搜索
  82 + let onBtnSearch = () => {
  83 + proxy.getNodeList();
  84 + }
  85 + //获取接收到的传值 bizid
  86 + let setBizId=()=>{
  87 + if(props.propsData){
  88 + proxy.bizId=props.propsData.bizId;
  89 + proxy.targetId=props.propsData.targetId;
  90 + proxy.busTypeArr=[props.propsData.bizId];
  91 + proxy.faultConfId=props.propsData.faultConfId;
  92 + proxy.bizName=props.propsData.bizName;
  93 + proxy.modleId=props.propsData.modleId;
  94 + proxy.name=props.propsData.name;
  95 + }
  96 + }
  97 + //添加拨测分析
  98 + let addRes=(row,index)=>{
  99 + // row.targetId=proxy.targetId;
  100 + let dialtestList=row;
  101 + dialtestList.dataScope=120;
  102 + let params={
  103 + targetId:proxy.targetId,
  104 + dialtestList:[dialtestList]
  105 + }
  106 +
  107 + proxy.$http.post('/api-web/fault/conf/dialtest/batchAddDialtest',params,function (res){
  108 + if(res && res.success){
  109 + proxy.$global.showMsg('添加成功','success');
  110 + proxy.targetId=res.str;
  111 + proxy.saveModel();
  112 + // proxy.applicationMonitorVisible=false;
  113 + }else{
  114 + proxy.$global.showMsg('添加失败','warning');
  115 + }
  116 + })
  117 + }
  118 + //全部添加
  119 + let saveAlldata=()=>{
  120 + if(proxy.count==0){
  121 + proxy.$global.showMsg('暂无配置','warning');
  122 + }else{
  123 + proxy.isLoading=true;
  124 + let params={
  125 + busId:proxy.bizId,
  126 + targetId:proxy.targetId,
  127 + }
  128 + proxy.$http.post('/api-web/fault/conf/dialtest/AddAllDialtest',params,function (res){
  129 + if(res && res.success){
  130 + if(res.count==0){
  131 + proxy.$global.showMsg(res.msg,'warning');
  132 + }else{
  133 + proxy.$global.showMsg('添加成功','success');
  134 + proxy.targetId=res.str;
  135 + proxy.saveModel();
  136 + // proxy.applicationMonitorVisible=false;
  137 + }
  138 +
  139 + }else{
  140 + proxy.$global.showMsg('添加失败','warning');
  141 + }
  142 + proxy.isLoading=false;
  143 +
  144 + },function (err){
  145 + proxy.isLoading=false;
  146 +
  147 + })
  148 +
  149 +
  150 + }
  151 +
  152 + }
  153 + //表格全选事件
  154 + let selectionChange=(val)=>{
  155 + proxy.tableDataList.map((v,i)=>{
  156 +
  157 + v.checked=false;
  158 +
  159 + })
  160 + let selectData=val;
  161 + if(selectData.length>0){
  162 + selectData.map((item,index)=>{
  163 + proxy.tableDataList.map((v,i)=>{
  164 + if(item.id==v.id){
  165 + v.checked=true;
  166 + }
  167 + })
  168 + })
  169 +
  170 + }else{
  171 + proxy.tableDataList.map((v,i)=>{
  172 + v.checked=false;
  173 + })
  174 + }
  175 + }
  176 +
  177 + //添加选中的
  178 + let saveAll=()=>{
  179 + let dialtestListSelectData=[];
  180 + proxy.tableDataList.map(item=>{
  181 + if(item.checked){
  182 + dialtestListSelectData.push(item)
  183 + }
  184 +
  185 + })
  186 +
  187 + if(dialtestListSelectData.length==0){
  188 + proxy.$global.showMsg('请选择配置','warning');
  189 + }else{
  190 + proxy.isLoading=true;
  191 +
  192 + let params={
  193 + targetId:proxy.targetId,
  194 + dialtestList:dialtestListSelectData
  195 + }
  196 +
  197 + proxy.$http.post('/api-web/fault/conf/dialtest/batchAddDialtest',params,function (res){
  198 + if(res && res.success){
  199 + proxy.$global.showMsg('添加成功','success');
  200 + proxy.targetId=res.str;
  201 + proxy.saveModel();
  202 + // proxy.applicationMonitorVisible=false;
  203 + }else{
  204 + proxy.$global.showMsg('添加失败','warning');
  205 +
  206 + }
  207 + proxy.isLoading=false;
  208 +
  209 + })
  210 + }
  211 +
  212 +
  213 +
  214 +
  215 + }
  216 + //重新加载表格数据
  217 + let loadTableDataList = ({page, limit}) => {
  218 + proxy.page=page;
  219 + proxy.pageSize=limit;
  220 + proxy.getNodeList()
  221 + }
  222 + //显示已添加过的应用列表数据
  223 + let dialtestMonitorListChecked=Vue.ref([]);
  224 + let setListData=()=>{
  225 + if(props.dialtestMonitorList){
  226 + props.dialtestMonitorList.map((item,index)=>{
  227 + proxy.tableDataList.map(v=>{
  228 + if(item.id==v.id){
  229 + proxy.dialtestMonitorListChecked.push(v)
  230 +
  231 + }
  232 + })
  233 +
  234 + })
  235 + }
  236 +
  237 + }
  238 +
  239 + //获取拨测分析配置列表数据
  240 + let getNodeList=()=>{
  241 + proxy.$http.get(`/api-web/fault/conf/dialtestBase/list`, proxy.getParams(), function (res) {
  242 + if (res && res.success) {
  243 + proxy.count = res.count;
  244 + tableDataList.value = res.data;
  245 +
  246 + proxy.setListData();
  247 + }
  248 + });
  249 + }
  250 + //关闭弹框
  251 + let closeDialog=()=>{
  252 + proxy.restData();
  253 + let obj={
  254 + targetId:proxy.targetId,
  255 + faultConfId:proxy.faultConfId,
  256 +
  257 + }
  258 + proxy.$emit('callbackApp',obj);
  259 + }
  260 + //清除数据
  261 + let restData=()=>{
  262 + proxy.tableDataList='';
  263 + }
  264 +
  265 +
  266 + return {
  267 + closeDialog,
  268 + restData,
  269 + getNodeList,
  270 + faultConfId,
  271 + bizName,
  272 + name,
  273 + dialtestMonitorVisible,
  274 + dialtestMonitorListChecked,
  275 + setListData,
  276 + loadTableDataList,
  277 + modleId,
  278 + saveAlldata,
  279 + page,
  280 + pageSize,
  281 + selectionChange,
  282 + isLoading,
  283 + saveAll,
  284 + networkMonitorList,
  285 + setBizId,
  286 + addRes,
  287 + config,
  288 + count,
  289 + tableDataList,
  290 + kpiList,
  291 + busTypeList,
  292 + keyWords,
  293 + resTypeArr,
  294 + kpiTypeArr,
  295 + busTypeArr,
  296 + resTypeList,
  297 + bizId,
  298 + targetId,
  299 + init,
  300 + onReset,
  301 + onBtnSearch
  302 + }
  303 +
  304 + },
  305 + methods: {
  306 +
  307 + //取消拨测列表配置
  308 + cancleList(){
  309 + this.dialtestMonitorVisible=false;
  310 +
  311 + },
  312 + //保存拨测添加配置
  313 + saveList(){
  314 + this.dialtestMonitorVisible=false;
  315 + },
  316 +
  317 +
  318 + //配置参数
  319 + getParams(){
  320 + return {
  321 + keyWords: this.keyWords,
  322 + // resType: this.resTypeArr.join(','),
  323 + // kpiId: this.kpiTypeArr.join(','),
  324 + // busId: this.busTypeArr.join(','),
  325 + bizId: this.bizId,
  326 + // configId: this.config,
  327 + page: this.page,
  328 + pageSize: this.pageSize
  329 + }
  330 + },
  331 +
  332 + //保存模块
  333 + saveModel(){
  334 + let that=this;
  335 + let params={
  336 + type:'dialtest',
  337 + targetId:this.targetId,
  338 + state:'1',
  339 + id:this.modleId,
  340 + faultConfig:{
  341 + id:this.faultConfId,
  342 + name:this.name,
  343 + bizId: this.bizId,
  344 + bizName:this.bizName,
  345 + createBy:localStorage.getItem("lgn")
  346 + }
  347 + }
  348 + this.$http.post('/api-web/fault/conf/detail/saveConfigDetail',params,function (res){
  349 + if(res && res.success){
  350 + that.targetId=res.map.configDetail.targetId;
  351 + that.faultConfId=res.map.configDetail.faultConfig.id;
  352 +
  353 + // that.$global.showMsg('保存成功','success')
  354 + // that.switchModel();
  355 + that.dialtestMonitorVisible=false;
  356 +
  357 + }else{
  358 + that.$global.showMsg('模块保存失败','warning')
  359 +
  360 + }
  361 +
  362 + })
  363 + }
  364 +
  365 +
  366 + },
  367 + mounted () {
  368 + // this.init();
  369 +
  370 + /* this.setBizId();
  371 + this.getNodeList();*/
  372 + },
  373 + unmounted () {}
  374 +
  375 +}
@@ -48,7 +48,7 @@ export default { @@ -48,7 +48,7 @@ export default {
48 const getListData=()=>{ 48 const getListData=()=>{
49 let params={ 49 let params={
50 page:1, 50 page:1,
51 - pageSize:10, 51 + pageSize:50,
52 name:proxy.name 52 name:proxy.name
53 53
54 } 54 }