Merge branch 'master' of http://192.168.1.136:82/monitor_v3/hg-monitor-web
Conflicts: pom.xml
Showing
10 changed files
with
597 additions
and
18 deletions
@@ -42,7 +42,7 @@ Promise.all([ | @@ -42,7 +42,7 @@ Promise.all([ | ||
42 | //所属系统 | 42 | //所属系统 |
43 | .component('cm-biz-type-tree-input', Vue.defineAsyncComponent(() => myImport('components/common/inputbiztypetree/index'))) | 43 | .component('cm-biz-type-tree-input', Vue.defineAsyncComponent(() => myImport('components/common/inputbiztypetree/index'))) |
44 | //时间范围组件 | 44 | //时间范围组件 |
45 | - .component('cm-date-range', Vue.defineAsyncComponent(() => myImport('components/common/dateRange/indexInflux'))); | 45 | + .component('cm-date-range-influx', Vue.defineAsyncComponent(() => myImport('components/common/dateRange/indexInflux'))); |
46 | 46 | ||
47 | 47 | ||
48 | // // 自定义指令 | 48 | // // 自定义指令 |
@@ -193,7 +193,7 @@ | @@ -193,7 +193,7 @@ | ||
193 | </cm-dialog> | 193 | </cm-dialog> |
194 | 194 | ||
195 | <!--关联机房配置--> | 195 | <!--关联机房配置--> |
196 | - <cm-dialog title="关联机房配置" width="60%" :showDialogVisible="machineRoomDialog" @hidedialog="showMachineRoomDialog" @okfunc="saveMachineRoomConfig"> | 196 | + <cm-dialog title="关联机房配置" width="60%" :showDialogVisible="machineRoomDialog" @hidedialog="showMachineRoomDialog" :showFooter="false"> |
197 | <template v-slot> | 197 | <template v-slot> |
198 | <cm-table-page :columns="machineRoomInfo.columns" :dataList="machineRoomInfo.dataList" :showIndex="true" | 198 | <cm-table-page :columns="machineRoomInfo.columns" :dataList="machineRoomInfo.dataList" :showIndex="true" |
199 | :showBorder="true" :loading="false" :showFooter="false" | 199 | :showBorder="true" :loading="false" :showFooter="false" |
@@ -97,6 +97,10 @@ export default { | @@ -97,6 +97,10 @@ export default { | ||
97 | //添加应用 | 97 | //添加应用 |
98 | let addRes=(row,index)=>{ | 98 | let addRes=(row,index)=>{ |
99 | // row.targetId=proxy.targetId; | 99 | // row.targetId=proxy.targetId; |
100 | + if(row.checked){ | ||
101 | + proxy.$global.showMsg('数据已存在,请勿重复添加','warning'); | ||
102 | + return; | ||
103 | + } | ||
100 | let npmList=row; | 104 | let npmList=row; |
101 | npmList.dataScope=120; | 105 | npmList.dataScope=120; |
102 | let params={ | 106 | let params={ |
@@ -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" @callbackDialtest="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 | { |
@@ -106,6 +112,8 @@ export default { | @@ -106,6 +112,8 @@ export default { | ||
106 | setup(props){ | 112 | setup(props){ |
107 | const {proxy} = Vue.getCurrentInstance(); | 113 | const {proxy} = Vue.getCurrentInstance(); |
108 | let applicationMonitorVisible=Vue.ref(false); | 114 | let applicationMonitorVisible=Vue.ref(false); |
115 | + let dialtestMonitorVisible=Vue.ref(false); | ||
116 | + | ||
109 | let baseVisible=Vue.ref(false); | 117 | let baseVisible=Vue.ref(false); |
110 | //btn加载中 | 118 | //btn加载中 |
111 | let isLoading=Vue.ref(false); | 119 | let isLoading=Vue.ref(false); |
@@ -128,6 +136,7 @@ export default { | @@ -128,6 +136,7 @@ export default { | ||
128 | let faultStateRadio=Vue.ref('0');//状态启用不启用 | 136 | let faultStateRadio=Vue.ref('0');//状态启用不启用 |
129 | let faultApplicationRadio=Vue.ref('0');//应用检测 | 137 | let faultApplicationRadio=Vue.ref('0');//应用检测 |
130 | let faultEnvironmentRadio=Vue.ref('0');//基础环境 | 138 | let faultEnvironmentRadio=Vue.ref('0');//基础环境 |
139 | + let faultDialtestRadio=Vue.ref('0');//拨测分析 | ||
131 | let faultAPMRadio=Vue.ref('0');//APM | 140 | let faultAPMRadio=Vue.ref('0');//APM |
132 | let faultLogRadio=Vue.ref('0');//日志 | 141 | let faultLogRadio=Vue.ref('0');//日志 |
133 | //故障名称 | 142 | //故障名称 |
@@ -170,6 +179,7 @@ export default { | @@ -170,6 +179,7 @@ export default { | ||
170 | {type:'npm',targetId:''}, | 179 | {type:'npm',targetId:''}, |
171 | {type:'base',targetId:''}, | 180 | {type:'base',targetId:''}, |
172 | {type:'apm',targetId:''}, | 181 | {type:'apm',targetId:''}, |
182 | + {type:'dialtest',targetId:''}, | ||
173 | {type:'log',targetId:''}, | 183 | {type:'log',targetId:''}, |
174 | {type:'report',targetId:''}, | 184 | {type:'report',targetId:''}, |
175 | ] | 185 | ] |
@@ -203,6 +213,7 @@ export default { | @@ -203,6 +213,7 @@ export default { | ||
203 | baseCount, | 213 | baseCount, |
204 | setDetail, | 214 | setDetail, |
205 | applicationMonitorVisible, | 215 | applicationMonitorVisible, |
216 | + dialtestMonitorVisible, | ||
206 | baseVisible, | 217 | baseVisible, |
207 | modleId, | 218 | modleId, |
208 | ruleId, | 219 | ruleId, |
@@ -214,6 +225,7 @@ export default { | @@ -214,6 +225,7 @@ export default { | ||
214 | faultApplicationRadio, | 225 | faultApplicationRadio, |
215 | faultEnvironmentRadio, | 226 | faultEnvironmentRadio, |
216 | faultAPMRadio, | 227 | faultAPMRadio, |
228 | + faultDialtestRadio, | ||
217 | faultLogRadio, | 229 | faultLogRadio, |
218 | addAlarmList, | 230 | addAlarmList, |
219 | alarmDataList, | 231 | alarmDataList, |
@@ -248,6 +260,7 @@ export default { | @@ -248,6 +260,7 @@ export default { | ||
248 | this.applicationMonitorHide = false; | 260 | this.applicationMonitorHide = false; |
249 | this.basicEnvironmentHide = false; | 261 | this.basicEnvironmentHide = false; |
250 | this.apmMonitorHide = false; | 262 | this.apmMonitorHide = false; |
263 | + this.dialtestMonitorHide = false; | ||
251 | this.logDetectionHide = false; | 264 | this.logDetectionHide = false; |
252 | this.subscriptionReportHide = false; | 265 | this.subscriptionReportHide = false; |
253 | }, | 266 | }, |
@@ -350,6 +363,29 @@ export default { | @@ -350,6 +363,29 @@ export default { | ||
350 | this.setDetailConfig(this.type) | 363 | this.setDetailConfig(this.type) |
351 | this.getApmListInfo(); | 364 | this.getApmListInfo(); |
352 | }, | 365 | }, |
366 | + //打开拨测分析 | ||
367 | + dialtestMonitorFunc(index){ | ||
368 | + if(!this.isSaveModel()){ | ||
369 | + return; | ||
370 | + } | ||
371 | + if(this.configData){ | ||
372 | + this.configData.map(item=>{ | ||
373 | + if(item.type=='dialtest'){ | ||
374 | + this.modleId=item.id; | ||
375 | + } | ||
376 | + }) | ||
377 | + } | ||
378 | + | ||
379 | + this.hiddenAll(); | ||
380 | + this.dialtestMonitorHide = true; | ||
381 | + this.isActiveIndex=index; | ||
382 | + this.type='dialtest'; | ||
383 | + this.state=this.faultDialtestRadio; | ||
384 | + this.setDetailConfig(this.type) | ||
385 | + | ||
386 | + this.getDialtestList(); | ||
387 | + }, | ||
388 | + | ||
353 | //日志检测 | 389 | //日志检测 |
354 | logDetectionFunc(index){ | 390 | logDetectionFunc(index){ |
355 | if(!this.isSaveModel()){ | 391 | if(!this.isSaveModel()){ |
@@ -420,6 +456,10 @@ export default { | @@ -420,6 +456,10 @@ export default { | ||
420 | //APM | 456 | //APM |
421 | this.apmMonitorList = newList; | 457 | this.apmMonitorList = newList; |
422 | break; | 458 | break; |
459 | + case "dialtestMonitor": | ||
460 | + //拨测分析 | ||
461 | + this.dialtestMonitorList = newList; | ||
462 | + break; | ||
423 | case "logDetection": | 463 | case "logDetection": |
424 | //日志检测 | 464 | //日志检测 |
425 | this.logDetectionList = newList; | 465 | this.logDetectionList = newList; |
@@ -480,6 +520,17 @@ export default { | @@ -480,6 +520,17 @@ export default { | ||
480 | } | 520 | } |
481 | this.APMVisible=true; | 521 | this.APMVisible=true; |
482 | break; | 522 | break; |
523 | + case "dialtest": | ||
524 | + //拨测分析 | ||
525 | + if(this.configData){ | ||
526 | + this.configData.map((item,index)=>{ | ||
527 | + if(item.type==typeVal){ | ||
528 | + item.state='1'; | ||
529 | + } | ||
530 | + }) | ||
531 | + } | ||
532 | + this.dialtestMonitorVisible=true; | ||
533 | + break; | ||
483 | case "log": | 534 | case "log": |
484 | //日志检测 | 535 | //日志检测 |
485 | this.logMonitionVisible=true; | 536 | this.logMonitionVisible=true; |
@@ -548,6 +599,10 @@ export default { | @@ -548,6 +599,10 @@ export default { | ||
548 | //APM | 599 | //APM |
549 | this.faultAPMRadio=state; | 600 | this.faultAPMRadio=state; |
550 | break; | 601 | break; |
602 | + case "dialtest": | ||
603 | + //拨测分析 | ||
604 | + this.faultDialtestRadio=state; | ||
605 | + break; | ||
551 | case "log": | 606 | case "log": |
552 | //日志检测 | 607 | //日志检测 |
553 | this.faultLogRadio=state; | 608 | this.faultLogRadio=state; |
@@ -562,9 +617,7 @@ export default { | @@ -562,9 +617,7 @@ export default { | ||
562 | //给弹框传值分类型 | 617 | //给弹框传值分类型 |
563 | postPropsData(typeVal,index){ | 618 | postPropsData(typeVal,index){ |
564 | if(this.busTypeArr){ | 619 | if(this.busTypeArr){ |
565 | - this.switchModelDialog(typeVal,index) | ||
566 | - | ||
567 | - | 620 | + this.switchModelDialog(typeVal,index) |
568 | this.setDetailConfig(typeVal); | 621 | this.setDetailConfig(typeVal); |
569 | // this.getTargetId(typeVal) | 622 | // this.getTargetId(typeVal) |
570 | }else{ | 623 | }else{ |
@@ -698,6 +751,38 @@ export default { | @@ -698,6 +751,38 @@ export default { | ||
698 | } | 751 | } |
699 | }) | 752 | }) |
700 | }, | 753 | }, |
754 | + | ||
755 | + //点击添加拨测分析 | ||
756 | + addDialtestMonitor(){ | ||
757 | + this.postPropsData('dialtest') | ||
758 | + }, | ||
759 | + //关闭拨测分析弹框 | ||
760 | + getDialtestMoniList(itemData){ | ||
761 | + this.dialtestMonitorVisible=false; | ||
762 | + if(itemData.faultConfId){ | ||
763 | + this.faultConfId=itemData.faultConfId; | ||
764 | + } | ||
765 | + this.setTargetId(itemData.targetId); | ||
766 | + | ||
767 | + // this.targetId=itemData; | ||
768 | + // this.applicationMonitorList=itemData; | ||
769 | + this.getDialtestList(); | ||
770 | + }, | ||
771 | + //获取拨测分析列表数据 | ||
772 | + getDialtestList(){ | ||
773 | + let that=this; | ||
774 | + this.getTargetId('dialtest') | ||
775 | + let params={ | ||
776 | + targetId:this.targetId, | ||
777 | + bizId:this.busTypeArr | ||
778 | + } | ||
779 | + this.$http.get('/api-web/fault/conf/dialtest/dialtestList',params,function (res){ | ||
780 | + if(res && res.data){ | ||
781 | + that.dialtestMonitorList=res.data; | ||
782 | + } | ||
783 | + }) | ||
784 | + }, | ||
785 | + | ||
701 | //点击添加日志监测弹框 | 786 | //点击添加日志监测弹框 |
702 | addLogMonitor(){ | 787 | addLogMonitor(){ |
703 | this.postPropsData('log') | 788 | this.postPropsData('log') |
@@ -800,13 +885,16 @@ export default { | @@ -800,13 +885,16 @@ export default { | ||
800 | break; | 885 | break; |
801 | case "base": | 886 | case "base": |
802 | //基础环境 | 887 | //基础环境 |
803 | - | ||
804 | this.state=this.faultEnvironmentRadio; | 888 | this.state=this.faultEnvironmentRadio; |
805 | break; | 889 | break; |
806 | case "apm": | 890 | case "apm": |
807 | //APM | 891 | //APM |
808 | this.state=this.faultAPMRadio; | 892 | this.state=this.faultAPMRadio; |
809 | break; | 893 | break; |
894 | + case "dialtest": | ||
895 | + //拨测分析 | ||
896 | + this.state=this.faultDialtestRadio; | ||
897 | + break; | ||
810 | case "log": | 898 | case "log": |
811 | //日志检测 | 899 | //日志检测 |
812 | this.state=this.faultLogRadio; | 900 | this.state=this.faultLogRadio; |
@@ -889,6 +977,10 @@ export default { | @@ -889,6 +977,10 @@ export default { | ||
889 | //APM | 977 | //APM |
890 | this.getApmListInfo(); | 978 | this.getApmListInfo(); |
891 | break; | 979 | break; |
980 | + case "dialtest": | ||
981 | + //应用检测 | ||
982 | + this.getDialtestList(); | ||
983 | + break; | ||
892 | case "log": | 984 | case "log": |
893 | //日志检测 | 985 | //日志检测 |
894 | break; | 986 | break; |
@@ -926,12 +1018,8 @@ export default { | @@ -926,12 +1018,8 @@ export default { | ||
926 | that.kpiId=that.alarmList[0].kpiId; | 1018 | that.kpiId=that.alarmList[0].kpiId; |
927 | 1019 | ||
928 | } | 1020 | } |
929 | - | ||
930 | } | 1021 | } |
931 | - | ||
932 | }) | 1022 | }) |
933 | - | ||
934 | - | ||
935 | }, | 1023 | }, |
936 | //通过bizId查找bizName | 1024 | //通过bizId查找bizName |
937 | getBizName(bizId){ | 1025 | getBizName(bizId){ |
@@ -1068,6 +1156,19 @@ export default { | @@ -1068,6 +1156,19 @@ export default { | ||
1068 | } | 1156 | } |
1069 | }) | 1157 | }) |
1070 | }, | 1158 | }, |
1159 | + //删除拨测分析 | ||
1160 | + deleteDialtest(item){ | ||
1161 | + let that=this; | ||
1162 | + let params={ | ||
1163 | + id:item.id | ||
1164 | + } | ||
1165 | + this.$http.get('/api-web/fault/conf/dialtest/deleteById',params,function (res){ | ||
1166 | + if(res){ | ||
1167 | + that.$global.showMsg('删除成功'); | ||
1168 | + that.getDialtestList(); | ||
1169 | + } | ||
1170 | + }) | ||
1171 | + }, | ||
1071 | //更改业务选择 | 1172 | //更改业务选择 |
1072 | changeBUsType(val){ | 1173 | changeBUsType(val){ |
1073 | if(val){ | 1174 | if(val){ |
@@ -1115,6 +1216,9 @@ export default { | @@ -1115,6 +1216,9 @@ export default { | ||
1115 | if(that.type=='npm'){ | 1216 | if(that.type=='npm'){ |
1116 | that.getAppList(); | 1217 | that.getAppList(); |
1117 | } | 1218 | } |
1219 | + if(that.type=='dialtest'){ | ||
1220 | + that.getDialtestList(); | ||
1221 | + } | ||
1118 | }) | 1222 | }) |
1119 | }, | 1223 | }, |
1120 | //返回首页 | 1224 | //返回首页 |
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 | + // dialtestMonitorVisible: 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 | + if(row.checked){ | ||
101 | + proxy.$global.showMsg('数据已存在,请勿重复添加','warning'); | ||
102 | + return; | ||
103 | + } | ||
104 | + let dialtestList=row; | ||
105 | + dialtestList.dataScope=120; | ||
106 | + let params={ | ||
107 | + targetId:proxy.targetId, | ||
108 | + dialtestList:[dialtestList] | ||
109 | + } | ||
110 | + | ||
111 | + proxy.$http.post('/api-web/fault/conf/dialtest/batchAddDialtest',params,function (res){ | ||
112 | + if(res && res.success){ | ||
113 | + proxy.$global.showMsg('添加成功','success'); | ||
114 | + proxy.targetId=res.str; | ||
115 | + proxy.saveModel(); | ||
116 | + // proxy.applicationMonitorVisible=false; | ||
117 | + }else{ | ||
118 | + proxy.$global.showMsg('添加失败','warning'); | ||
119 | + } | ||
120 | + }) | ||
121 | + } | ||
122 | + //全部添加 | ||
123 | + let saveAlldata=()=>{ | ||
124 | + if(proxy.count==0){ | ||
125 | + proxy.$global.showMsg('暂无配置','warning'); | ||
126 | + }else{ | ||
127 | + proxy.isLoading=true; | ||
128 | + let params={ | ||
129 | + busId:proxy.bizId, | ||
130 | + targetId:proxy.targetId, | ||
131 | + } | ||
132 | + proxy.$http.post('/api-web/fault/conf/dialtest/AddAllDialtest',params,function (res){ | ||
133 | + if(res && res.success){ | ||
134 | + if(res.count==0){ | ||
135 | + proxy.$global.showMsg(res.msg,'warning'); | ||
136 | + }else{ | ||
137 | + proxy.$global.showMsg('添加成功','success'); | ||
138 | + proxy.targetId=res.str; | ||
139 | + proxy.saveModel(); | ||
140 | + // proxy.applicationMonitorVisible=false; | ||
141 | + } | ||
142 | + | ||
143 | + }else{ | ||
144 | + proxy.$global.showMsg('添加失败','warning'); | ||
145 | + } | ||
146 | + proxy.isLoading=false; | ||
147 | + | ||
148 | + },function (err){ | ||
149 | + proxy.isLoading=false; | ||
150 | + | ||
151 | + }) | ||
152 | + | ||
153 | + | ||
154 | + } | ||
155 | + | ||
156 | + } | ||
157 | + //表格全选事件 | ||
158 | + let selectionChange=(val)=>{ | ||
159 | + proxy.tableDataList.map((v,i)=>{ | ||
160 | + | ||
161 | + v.checked=false; | ||
162 | + | ||
163 | + }) | ||
164 | + let selectData=val; | ||
165 | + if(selectData.length>0){ | ||
166 | + selectData.map((item,index)=>{ | ||
167 | + proxy.tableDataList.map((v,i)=>{ | ||
168 | + if(item.id==v.id){ | ||
169 | + v.checked=true; | ||
170 | + } | ||
171 | + }) | ||
172 | + }) | ||
173 | + | ||
174 | + }else{ | ||
175 | + proxy.tableDataList.map((v,i)=>{ | ||
176 | + v.checked=false; | ||
177 | + }) | ||
178 | + } | ||
179 | + } | ||
180 | + | ||
181 | + //添加选中的 | ||
182 | + let saveAll=()=>{ | ||
183 | + let dialtestListSelectData=[]; | ||
184 | + proxy.tableDataList.map(item=>{ | ||
185 | + if(item.checked){ | ||
186 | + dialtestListSelectData.push(item) | ||
187 | + } | ||
188 | + | ||
189 | + }) | ||
190 | + | ||
191 | + if(dialtestListSelectData.length==0){ | ||
192 | + proxy.$global.showMsg('请选择配置','warning'); | ||
193 | + }else{ | ||
194 | + proxy.isLoading=true; | ||
195 | + | ||
196 | + let params={ | ||
197 | + targetId:proxy.targetId, | ||
198 | + dialtestList:dialtestListSelectData | ||
199 | + } | ||
200 | + | ||
201 | + proxy.$http.post('/api-web/fault/conf/dialtest/batchAddDialtest',params,function (res){ | ||
202 | + if(res && res.success){ | ||
203 | + proxy.$global.showMsg('添加成功','success'); | ||
204 | + proxy.targetId=res.str; | ||
205 | + proxy.saveModel(); | ||
206 | + // proxy.applicationMonitorVisible=false; | ||
207 | + }else{ | ||
208 | + proxy.$global.showMsg('添加失败','warning'); | ||
209 | + | ||
210 | + } | ||
211 | + proxy.isLoading=false; | ||
212 | + | ||
213 | + }) | ||
214 | + } | ||
215 | + | ||
216 | + | ||
217 | + | ||
218 | + | ||
219 | + } | ||
220 | + //重新加载表格数据 | ||
221 | + let loadTableDataList = ({page, limit}) => { | ||
222 | + proxy.page=page; | ||
223 | + proxy.pageSize=limit; | ||
224 | + proxy.getNodeList() | ||
225 | + } | ||
226 | + //显示已添加过的应用列表数据 | ||
227 | + let dialtestMonitorListChecked=Vue.ref([]); | ||
228 | + let setListData=()=>{ | ||
229 | + if(props.dialtestMonitorList){ | ||
230 | + props.dialtestMonitorList.map((item,index)=>{ | ||
231 | + proxy.tableDataList.map(v=>{ | ||
232 | + if(item.id==v.id){ | ||
233 | + proxy.dialtestMonitorListChecked.push(v) | ||
234 | + | ||
235 | + } | ||
236 | + }) | ||
237 | + | ||
238 | + }) | ||
239 | + } | ||
240 | + | ||
241 | + } | ||
242 | + | ||
243 | + //获取拨测分析配置列表数据 | ||
244 | + let getNodeList=()=>{ | ||
245 | + proxy.$http.get(`/api-web/fault/conf/dialtestBase/list`, proxy.getParams(), function (res) { | ||
246 | + if (res && res.success) { | ||
247 | + proxy.count = res.count; | ||
248 | + tableDataList.value = res.data; | ||
249 | + | ||
250 | + proxy.setListData(); | ||
251 | + } | ||
252 | + }); | ||
253 | + } | ||
254 | + //关闭弹框 | ||
255 | + let closeDialog=()=>{ | ||
256 | + proxy.restData(); | ||
257 | + let obj={ | ||
258 | + targetId:proxy.targetId, | ||
259 | + faultConfId:proxy.faultConfId, | ||
260 | + | ||
261 | + } | ||
262 | + proxy.$emit('callbackDialtest',obj); | ||
263 | + } | ||
264 | + //清除数据 | ||
265 | + let restData=()=>{ | ||
266 | + proxy.tableDataList=''; | ||
267 | + } | ||
268 | + | ||
269 | + | ||
270 | + return { | ||
271 | + closeDialog, | ||
272 | + restData, | ||
273 | + getNodeList, | ||
274 | + faultConfId, | ||
275 | + bizName, | ||
276 | + name, | ||
277 | + dialtestMonitorVisible, | ||
278 | + dialtestMonitorListChecked, | ||
279 | + setListData, | ||
280 | + loadTableDataList, | ||
281 | + modleId, | ||
282 | + saveAlldata, | ||
283 | + page, | ||
284 | + pageSize, | ||
285 | + selectionChange, | ||
286 | + isLoading, | ||
287 | + saveAll, | ||
288 | + networkMonitorList, | ||
289 | + setBizId, | ||
290 | + addRes, | ||
291 | + config, | ||
292 | + count, | ||
293 | + tableDataList, | ||
294 | + kpiList, | ||
295 | + busTypeList, | ||
296 | + keyWords, | ||
297 | + resTypeArr, | ||
298 | + kpiTypeArr, | ||
299 | + busTypeArr, | ||
300 | + resTypeList, | ||
301 | + bizId, | ||
302 | + targetId, | ||
303 | + init, | ||
304 | + onReset, | ||
305 | + onBtnSearch | ||
306 | + } | ||
307 | + | ||
308 | + }, | ||
309 | + methods: { | ||
310 | + | ||
311 | + //取消拨测列表配置 | ||
312 | + cancleList(){ | ||
313 | + this.dialtestMonitorVisible=false; | ||
314 | + | ||
315 | + }, | ||
316 | + //保存拨测添加配置 | ||
317 | + saveList(){ | ||
318 | + this.dialtestMonitorVisible=false; | ||
319 | + }, | ||
320 | + | ||
321 | + | ||
322 | + //配置参数 | ||
323 | + getParams(){ | ||
324 | + return { | ||
325 | + keyWords: this.keyWords, | ||
326 | + // resType: this.resTypeArr.join(','), | ||
327 | + // kpiId: this.kpiTypeArr.join(','), | ||
328 | + // busId: this.busTypeArr.join(','), | ||
329 | + bizId: this.bizId, | ||
330 | + // configId: this.config, | ||
331 | + page: this.page, | ||
332 | + pageSize: this.pageSize | ||
333 | + } | ||
334 | + }, | ||
335 | + | ||
336 | + //保存模块 | ||
337 | + saveModel(){ | ||
338 | + let that=this; | ||
339 | + let params={ | ||
340 | + type:'dialtest', | ||
341 | + targetId:this.targetId, | ||
342 | + state:'1', | ||
343 | + id:this.modleId, | ||
344 | + faultConfig:{ | ||
345 | + id:this.faultConfId, | ||
346 | + name:this.name, | ||
347 | + bizId: this.bizId, | ||
348 | + bizName:this.bizName, | ||
349 | + createBy:localStorage.getItem("lgn") | ||
350 | + } | ||
351 | + } | ||
352 | + this.$http.post('/api-web/fault/conf/detail/saveConfigDetail',params,function (res){ | ||
353 | + if(res && res.success){ | ||
354 | + that.targetId=res.map.configDetail.targetId; | ||
355 | + that.faultConfId=res.map.configDetail.faultConfig.id; | ||
356 | + | ||
357 | + // that.$global.showMsg('保存成功','success') | ||
358 | + // that.switchModel(); | ||
359 | + that.dialtestMonitorVisible=false; | ||
360 | + | ||
361 | + }else{ | ||
362 | + that.$global.showMsg('模块保存失败','warning') | ||
363 | + | ||
364 | + } | ||
365 | + | ||
366 | + }) | ||
367 | + } | ||
368 | + | ||
369 | + | ||
370 | + }, | ||
371 | + mounted () { | ||
372 | + // this.init(); | ||
373 | + | ||
374 | + /* this.setBizId(); | ||
375 | + this.getNodeList();*/ | ||
376 | + }, | ||
377 | + unmounted () {} | ||
378 | + | ||
379 | +} |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | <el-col :span="8"></el-col> | 8 | <el-col :span="8"></el-col> |
9 | <el-col :span="16" class="pie-flex-end"> | 9 | <el-col :span="16" class="pie-flex-end"> |
10 | <div class="pie-date-range"> | 10 | <div class="pie-date-range"> |
11 | - <cm-date-range v-if="interval=='custom'" :keys="keys" @callbackinflux="getInfluxOption" @callbacksure="getOptionData" @callbacktime="callbacktime" @callbackrate="callbackrate"></cm-date-range> | 11 | + <cm-date-range-influx v-if="interval=='custom'" :keys="keys" @callbackinflux="getInfluxOption" @callbacksure="getOptionData" @callbacktime="callbacktime" @callbackrate="callbackrate"></cm-date-range-influx> |
12 | </div> | 12 | </div> |
13 | <div class="line-filter pie-line-filter"> | 13 | <div class="line-filter pie-line-filter"> |
14 | <div class="linechartfrequency line-filter-content"> | 14 | <div class="linechartfrequency line-filter-content"> |
@@ -155,9 +155,7 @@ export default { | @@ -155,9 +155,7 @@ export default { | ||
155 | let kpiUnitVal = ''; | 155 | let kpiUnitVal = ''; |
156 | let kpiList = res.data; | 156 | let kpiList = res.data; |
157 | Object.keys(res.map).forEach(function(key){ | 157 | Object.keys(res.map).forEach(function(key){ |
158 | - res.map[key].sort(function (a, b) { | ||
159 | - return a.dbTimeStr<b.dbTimeStr?1:-1; | ||
160 | - }).forEach(function(item){ | 158 | + res.map[key].forEach(function(item){ |
161 | names.push(item.dbTimeStr); | 159 | names.push(item.dbTimeStr); |
162 | max.push(item.maxValue); | 160 | max.push(item.maxValue); |
163 | min.push(item.minValue); | 161 | min.push(item.minValue); |
-
Please register or login to post a comment