Merge branch 'master-v32-lushangqing' into 'master'
故障联调接口 弹框样式及数据联调 See merge request !227
Showing
10 changed files
with
78 additions
and
26 deletions
@@ -426,6 +426,20 @@ | @@ -426,6 +426,20 @@ | ||
426 | .cursorClass{ | 426 | .cursorClass{ |
427 | cursor: pointer; | 427 | cursor: pointer; |
428 | } | 428 | } |
429 | +.table-height .el-table{ | ||
430 | + height:500px; | ||
431 | +} | ||
432 | +.table-height-45 .el-table{ | ||
433 | + height:450px; | ||
434 | +} | ||
435 | +.height-600{ | ||
436 | + height:650px; | ||
437 | +} | ||
438 | +.text-overflow{ | ||
439 | + white-space: nowrap; | ||
440 | + overflow: hidden; | ||
441 | + text-overflow: ellipsis; | ||
442 | +} | ||
429 | .position-absolute{ | 443 | .position-absolute{ |
430 | 444 | ||
431 | } | 445 | } |
1 | -<el-dialog v-model="APMVisible" :title="titleName" width="90%" @close="closeDialog"> | 1 | +<el-dialog v-model="APMVisible" :title="titleName" width="90%" @close="closeDialog" top="3vh"> |
2 | 2 | ||
3 | <el-row> | 3 | <el-row> |
4 | <el-col :span="24"> | 4 | <el-col :span="24"> |
@@ -30,12 +30,14 @@ | @@ -30,12 +30,14 @@ | ||
30 | <div class="flex-div-start"> | 30 | <div class="flex-div-start"> |
31 | <el-button type="primary" @click="onReset()">重置</el-button> | 31 | <el-button type="primary" @click="onReset()">重置</el-button> |
32 | <el-button type="primary" @click="onBtnSearch()" style="margin-left: 10px">查询</el-button> | 32 | <el-button type="primary" @click="onBtnSearch()" style="margin-left: 10px">查询</el-button> |
33 | + <el-button type="primary" @click="saveAll()" style="margin-left: 10px">全部添加</el-button> | ||
33 | </div> | 34 | </div> |
35 | + | ||
34 | </div> | 36 | </div> |
35 | </el-col> | 37 | </el-col> |
36 | </el-row> | 38 | </el-row> |
37 | <el-row class="margin-bottom-50"> | 39 | <el-row class="margin-bottom-50"> |
38 | - <el-col :span="24"> | 40 | + <el-col :span="24" class="table-height"> |
39 | <cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList" | 41 | <cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList" |
40 | :showIndex="true" :total="count" | 42 | :showIndex="true" :total="count" |
41 | :showBorder="true" :loading="false" | 43 | :showBorder="true" :loading="false" |
@@ -21,12 +21,12 @@ export default { | @@ -21,12 +21,12 @@ export default { | ||
21 | sortable: true, | 21 | sortable: true, |
22 | align: 'center', | 22 | align: 'center', |
23 | }, | 23 | }, |
24 | - { | 24 | + /* { |
25 | prop: 'ip', | 25 | prop: 'ip', |
26 | label: 'ip地址', | 26 | label: 'ip地址', |
27 | sortable: true, | 27 | sortable: true, |
28 | align: 'center', | 28 | align: 'center', |
29 | - }, | 29 | + },*/ |
30 | { | 30 | { |
31 | prop: 'kpiName', | 31 | prop: 'kpiName', |
32 | label: '指标名称', | 32 | label: '指标名称', |
@@ -111,7 +111,7 @@ export default { | @@ -111,7 +111,7 @@ export default { | ||
111 | createBy:localStorage.getItem("lgn") | 111 | createBy:localStorage.getItem("lgn") |
112 | 112 | ||
113 | } | 113 | } |
114 | - proxy.$http.post('/api-web/fault/conf/apm/saveOrUpdate',params,function (res){ | 114 | + proxy.$http.post('/api-web/fault/conf/apm/saveOrUpdate',[params],function (res){ |
115 | if(res && res.object){ | 115 | if(res && res.object){ |
116 | proxy.$global.showMsg('添加成功','success'); | 116 | proxy.$global.showMsg('添加成功','success'); |
117 | proxy.targetId=res.object.targetId | 117 | proxy.targetId=res.object.targetId |
@@ -122,12 +122,17 @@ export default { | @@ -122,12 +122,17 @@ export default { | ||
122 | 122 | ||
123 | 123 | ||
124 | } | 124 | } |
125 | + //添加所有数据 | ||
126 | + let saveAll=()=>{ | ||
127 | + | ||
128 | + } | ||
125 | //切换资源获取指标列表 | 129 | //切换资源获取指标列表 |
126 | let changeRes=(val)=>{ | 130 | let changeRes=(val)=>{ |
127 | proxy.getResData(); | 131 | proxy.getResData(); |
128 | 132 | ||
129 | } | 133 | } |
130 | return { | 134 | return { |
135 | + saveAll, | ||
131 | getResData, | 136 | getResData, |
132 | changeRes, | 137 | changeRes, |
133 | bizId, | 138 | bizId, |
@@ -30,16 +30,23 @@ | @@ -30,16 +30,23 @@ | ||
30 | <div class="flex-div-start"> | 30 | <div class="flex-div-start"> |
31 | <el-button type="primary" @click="onReset()">重置</el-button> | 31 | <el-button type="primary" @click="onReset()">重置</el-button> |
32 | <el-button type="primary" @click="onBtnSearch()" style="margin-left: 10px">查询</el-button> | 32 | <el-button type="primary" @click="onBtnSearch()" style="margin-left: 10px">查询</el-button> |
33 | + <el-button type="primary" @click="saveAll()" style="margin-left: 10px">全部添加</el-button> | ||
33 | </div> | 34 | </div> |
34 | </div> | 35 | </div> |
35 | </el-col> | 36 | </el-col> |
36 | </el-row> | 37 | </el-row> |
37 | <el-row class="margin-bottom-50"> | 38 | <el-row class="margin-bottom-50"> |
38 | - <el-col :span="24"> | 39 | + <el-col :span="24" class="table-height"> |
39 | <cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList" | 40 | <cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList" |
40 | :showIndex="true" :total="count" | 41 | :showIndex="true" :total="count" |
41 | :showBorder="true" :loading="false" | 42 | :showBorder="true" :loading="false" |
42 | :showPage="true" :showTools="true" :height="(height - 500)"> | 43 | :showPage="true" :showTools="true" :height="(height - 500)"> |
44 | + <template #default="{row,prop,column}"> | ||
45 | + <div v-if="prop == 'url'" class="text-overflow" :title="row.url"> | ||
46 | + <span class="">{{row.url }}</span> | ||
47 | + | ||
48 | + </div> | ||
49 | + </template> | ||
43 | <template #tools="{scope}"> | 50 | <template #tools="{scope}"> |
44 | <el-button type="text" size="small" @click.prevent="addRes(scope.row,scope.$index)"> | 51 | <el-button type="text" size="small" @click.prevent="addRes(scope.row,scope.$index)"> |
45 | <i class="el-icon-plus"/> 添加 | 52 | <i class="el-icon-plus"/> 添加 |
@@ -88,9 +88,11 @@ export default { | @@ -88,9 +88,11 @@ export default { | ||
88 | //添加应用 | 88 | //添加应用 |
89 | let addRes=(row,index)=>{ | 89 | let addRes=(row,index)=>{ |
90 | // row.targetId=proxy.targetId; | 90 | // row.targetId=proxy.targetId; |
91 | + let npmList=row; | ||
92 | + npmList.dataScope=120; | ||
91 | let params={ | 93 | let params={ |
92 | targetId:proxy.targetId, | 94 | targetId:proxy.targetId, |
93 | - npmList:[row] | 95 | + npmList:[npmList] |
94 | } | 96 | } |
95 | 97 | ||
96 | proxy.$http.post('/api-web/fault/conf/npm/batchAddNpm',params,function (res){ | 98 | proxy.$http.post('/api-web/fault/conf/npm/batchAddNpm',params,function (res){ |
@@ -104,7 +106,11 @@ export default { | @@ -104,7 +106,11 @@ export default { | ||
104 | 106 | ||
105 | 107 | ||
106 | } | 108 | } |
109 | + let saveAll=()=>{ | ||
110 | + | ||
111 | + } | ||
107 | return { | 112 | return { |
113 | + saveAll, | ||
108 | networkMonitorList, | 114 | networkMonitorList, |
109 | setBizId, | 115 | setBizId, |
110 | addRes, | 116 | addRes, |
@@ -47,7 +47,7 @@ | @@ -47,7 +47,7 @@ | ||
47 | </template> | 47 | </template> |
48 | <template #tools="{scope}"> | 48 | <template #tools="{scope}"> |
49 | <el-button type="text" size="small" @click.prevent="deleteItem(scope.row,scope.$index)"> | 49 | <el-button type="text" size="small" @click.prevent="deleteItem(scope.row,scope.$index)"> |
50 | - <i class="el-icon-plus"/> 删除 | 50 | + 删除 |
51 | </el-button> | 51 | </el-button> |
52 | </template> | 52 | </template> |
53 | </cm-table-page> | 53 | </cm-table-page> |
@@ -6,22 +6,21 @@ export default { | @@ -6,22 +6,21 @@ export default { | ||
6 | data () { | 6 | data () { |
7 | return { | 7 | return { |
8 | columns:[ | 8 | columns:[ |
9 | - | ||
10 | { | 9 | { |
11 | - prop: 'resName', | ||
12 | - label: '资源名称', | 10 | + prop: 'busTypeName', |
11 | + label: '资源类型', | ||
13 | sortable: true, | 12 | sortable: true, |
14 | align: 'center', | 13 | align: 'center', |
15 | }, | 14 | }, |
16 | { | 15 | { |
17 | prop: 'resName', | 16 | prop: 'resName', |
18 | - label: '资源类型', | 17 | + label: '资源名称', |
19 | sortable: true, | 18 | sortable: true, |
20 | align: 'center', | 19 | align: 'center', |
21 | }, | 20 | }, |
22 | { | 21 | { |
23 | - prop: 'resName', | ||
24 | - label: 'IP', | 22 | + prop: 'ip', |
23 | + label: 'ip地址', | ||
25 | sortable: true, | 24 | sortable: true, |
26 | align: 'center', | 25 | align: 'center', |
27 | }, | 26 | }, |
@@ -165,7 +165,7 @@ | @@ -165,7 +165,7 @@ | ||
165 | <div class="context-multiple-choice flex-div-start margin-30 flex-div-wrap overflow-scroll-y"> | 165 | <div class="context-multiple-choice flex-div-start margin-30 flex-div-wrap overflow-scroll-y"> |
166 | <div class="btn-el-btn margin-bottom-10" v-for="(item, index) in networkMonitorList" :key="index"> | 166 | <div class="btn-el-btn margin-bottom-10" v-for="(item, index) in networkMonitorList" :key="index"> |
167 | <div> | 167 | <div> |
168 | - <el-button class="multiple-choice-button" type="primary">{{item.linkName}}</el-button> | 168 | + <el-button :disabled="faultStateRadio==0" class="multiple-choice-button" type="primary">{{item.linkName}}</el-button> |
169 | <img :id="item.id" @click="deleteNetLink(item)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon cursorClass"> | 169 | <img :id="item.id" @click="deleteNetLink(item)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon cursorClass"> |
170 | </div> | 170 | </div> |
171 | </div> | 171 | </div> |
@@ -202,7 +202,7 @@ | @@ -202,7 +202,7 @@ | ||
202 | <div class="context-multiple-choice flex-div-start margin-30 flex-div-wrap overflow-scroll-y"> | 202 | <div class="context-multiple-choice flex-div-start margin-30 flex-div-wrap overflow-scroll-y"> |
203 | <div class="btn-el-btn margin-bottom-10" v-for="(item, index) in applicationMonitorList" :key="index"> | 203 | <div class="btn-el-btn margin-bottom-10" v-for="(item, index) in applicationMonitorList" :key="index"> |
204 | <div> | 204 | <div> |
205 | - <el-button class="multiple-choice-button" type="primary">{{item.streamName}}</el-button> | 205 | + <el-button :disabled="faultApplicationRadio==0" class="multiple-choice-button" type="primary">{{item.streamName}}</el-button> |
206 | <!-- <img :id="item.id" @click="deleteItem(item.id, applicationMonitorList)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon cursorClass">--> | 206 | <!-- <img :id="item.id" @click="deleteItem(item.id, applicationMonitorList)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon cursorClass">--> |
207 | <img :id="item.id" @click="deleteApp(item)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon cursorClass"> | 207 | <img :id="item.id" @click="deleteApp(item)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon cursorClass"> |
208 | </div> | 208 | </div> |
@@ -317,7 +317,7 @@ | @@ -317,7 +317,7 @@ | ||
317 | <el-col :span="24"> | 317 | <el-col :span="24"> |
318 | <div class="context-multiple-choice flex-div-start margin-30 flex-div-wrap overflow-scroll-y"> | 318 | <div class="context-multiple-choice flex-div-start margin-30 flex-div-wrap overflow-scroll-y"> |
319 | <div class="btn-el-btn margin-bottom-10" v-for="(item, index) in apmMonitorList" :key="index" > | 319 | <div class="btn-el-btn margin-bottom-10" v-for="(item, index) in apmMonitorList" :key="index" > |
320 | - <el-button class="multiple-choice-button" type="primary">{{item.resName}}</el-button> | 320 | + <el-button :disabled="faultAPMRadio==0" class="multiple-choice-button" type="primary">{{item.resName}}</el-button> |
321 | <img :id="item.id" @click="deleteApm(item)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon position-absolute cursorClass"> | 321 | <img :id="item.id" @click="deleteApm(item)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon position-absolute cursorClass"> |
322 | 322 | ||
323 | </div> | 323 | </div> |
@@ -358,7 +358,7 @@ | @@ -358,7 +358,7 @@ | ||
358 | <div class="context-multiple-choice flex-div-start margin-30 flex-div-wrap overflow-scroll-y"> | 358 | <div class="context-multiple-choice flex-div-start margin-30 flex-div-wrap overflow-scroll-y"> |
359 | <div class="btn-el-btn margin-bottom-10" v-for="(item, index) in logDetectionList" :key="index"> | 359 | <div class="btn-el-btn margin-bottom-10" v-for="(item, index) in logDetectionList" :key="index"> |
360 | <div> | 360 | <div> |
361 | - <el-button class="multiple-choice-button" type="primary">{{item.title}}</el-button> | 361 | + <el-button :disabled="faultLogRadio==0" class="multiple-choice-button" type="primary">{{item.title}}</el-button> |
362 | <img :id="item.id" @click="deleteItem(item.id, logDetectionList)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon"> | 362 | <img :id="item.id" @click="deleteItem(item.id, logDetectionList)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon"> |
363 | </div> | 363 | </div> |
364 | </div> | 364 | </div> |
@@ -129,6 +129,7 @@ export default { | @@ -129,6 +129,7 @@ export default { | ||
129 | APMVisible:false,//APM弹框 | 129 | APMVisible:false,//APM弹框 |
130 | logMonitionVisible:false,//日志监测弹框 | 130 | logMonitionVisible:false,//日志监测弹框 |
131 | subscriptionReportVisible:false,//订阅人员弹框 | 131 | subscriptionReportVisible:false,//订阅人员弹框 |
132 | + bizName:'',//业务名称 | ||
132 | } | 133 | } |
133 | }, | 134 | }, |
134 | setup(props){ | 135 | setup(props){ |
@@ -421,7 +422,7 @@ export default { | @@ -421,7 +422,7 @@ export default { | ||
421 | //详情页设置targetid | 422 | //详情页设置targetid |
422 | setDetailConfig(typeVal){ | 423 | setDetailConfig(typeVal){ |
423 | let that=this; | 424 | let that=this; |
424 | - if(this.configData){ | 425 | + if(this.configData && this.configData.length>0){ |
425 | console.log("configData",this.configData,typeVal) | 426 | console.log("configData",this.configData,typeVal) |
426 | this.configData.map((item,index)=>{ | 427 | this.configData.map((item,index)=>{ |
427 | if(item.type==typeVal){ | 428 | if(item.type==typeVal){ |
@@ -438,6 +439,8 @@ export default { | @@ -438,6 +439,8 @@ export default { | ||
438 | 439 | ||
439 | } | 440 | } |
440 | }) | 441 | }) |
442 | + }else{ | ||
443 | + that.getTargetId(typeVal) | ||
441 | } | 444 | } |
442 | 445 | ||
443 | this.propsData={ | 446 | this.propsData={ |
@@ -512,6 +515,7 @@ export default { | @@ -512,6 +515,7 @@ export default { | ||
512 | item.targetId=val; | 515 | item.targetId=val; |
513 | } | 516 | } |
514 | }) | 517 | }) |
518 | + console.log("modeldata",this.modelData); | ||
515 | }, | 519 | }, |
516 | //获取模块对应的targetId | 520 | //获取模块对应的targetId |
517 | getTargetId(type){ | 521 | getTargetId(type){ |
@@ -687,7 +691,8 @@ export default { | @@ -687,7 +691,8 @@ export default { | ||
687 | saveConfigDetailOther(){ | 691 | saveConfigDetailOther(){ |
688 | console.log("save",this.state) | 692 | console.log("save",this.state) |
689 | this.setState(); | 693 | this.setState(); |
690 | - this.getTargetId(this.type) | 694 | + this.getTargetId(this.type); |
695 | + this.getBizName(this.busTypeArr); | ||
691 | let that=this; | 696 | let that=this; |
692 | let params={ | 697 | let params={ |
693 | type:this.type, | 698 | type:this.type, |
@@ -697,6 +702,7 @@ export default { | @@ -697,6 +702,7 @@ export default { | ||
697 | id:this.faultConfId, | 702 | id:this.faultConfId, |
698 | name:this.name, | 703 | name:this.name, |
699 | bizId: this.busTypeArr, | 704 | bizId: this.busTypeArr, |
705 | + bizName:this.bizName, | ||
700 | createBy:localStorage.getItem("lgn") | 706 | createBy:localStorage.getItem("lgn") |
701 | } | 707 | } |
702 | } | 708 | } |
@@ -780,11 +786,22 @@ export default { | @@ -780,11 +786,22 @@ export default { | ||
780 | 786 | ||
781 | 787 | ||
782 | }, | 788 | }, |
789 | + //通过bizId查找bizName | ||
790 | + getBizName(bizId){ | ||
791 | + let that=this; | ||
792 | + this.busTypeList.map(item=>{ | ||
793 | + if(bizId==item.busId){ | ||
794 | + that.bizName=item.busTypeName | ||
795 | + } | ||
796 | + }) | ||
797 | + }, | ||
783 | //故障定义模块保存 新增故障定义 | 798 | //故障定义模块保存 新增故障定义 |
784 | saveFaultDefine(){ | 799 | saveFaultDefine(){ |
785 | let that=this; | 800 | let that=this; |
801 | + this.getBizName(this.busTypeArr); | ||
786 | let params= { | 802 | let params= { |
787 | // state: this.state, | 803 | // state: this.state, |
804 | + type:'alarm', | ||
788 | triggerValue: this.triggerValue, | 805 | triggerValue: this.triggerValue, |
789 | kpiId: this.kpiId, | 806 | kpiId: this.kpiId, |
790 | 807 | ||
@@ -792,6 +809,7 @@ export default { | @@ -792,6 +809,7 @@ export default { | ||
792 | id: this.faultConfId, | 809 | id: this.faultConfId, |
793 | name: this.name, | 810 | name: this.name, |
794 | bizId: this.busTypeArr, | 811 | bizId: this.busTypeArr, |
812 | + bizName:this.bizName, | ||
795 | createBy: localStorage.getItem("lgn"), | 813 | createBy: localStorage.getItem("lgn"), |
796 | } | 814 | } |
797 | 815 | ||
@@ -816,13 +834,14 @@ export default { | @@ -816,13 +834,14 @@ export default { | ||
816 | let that=this; | 834 | let that=this; |
817 | this.getTargetId('base') | 835 | this.getTargetId('base') |
818 | let params={ | 836 | let params={ |
819 | - targetId:this.targetId | 837 | + targetId:this.targetId, |
838 | + bizId:this.busTypeArr | ||
820 | } | 839 | } |
821 | this.$http.post('/api-web/fault/conf/base/saveOrUpdate',params,function (res){ | 840 | this.$http.post('/api-web/fault/conf/base/saveOrUpdate',params,function (res){ |
822 | if(res && res.success){ | 841 | if(res && res.success){ |
823 | - that.targetId=res.str; | 842 | + that.targetId=res.object.targetId; |
824 | that.setTargetId(that.targetId) | 843 | that.setTargetId(that.targetId) |
825 | - that.$global.showMsg('保存成功') | 844 | + // that.$global.showMsg('保存成功') |
826 | // that.alarmList=res.data; | 845 | // that.alarmList=res.data; |
827 | that.saveConfigDetailOther(); | 846 | that.saveConfigDetailOther(); |
828 | }else{ | 847 | }else{ |
1 | -<el-dialog v-model="networkMonitorVisible" :title="titleName" width="90%" @close="closeDialog"> | ||
2 | - <el-row v-if="!tableVisible"> | 1 | +<el-dialog v-model="networkMonitorVisible" :title="titleName" width="90%" @close="closeDialog" top="3vh"> |
2 | + <el-row v-if="!tableVisible" class="height-600"> | ||
3 | <el-col :span="6"> | 3 | <el-col :span="6"> |
4 | <div class="grid-content bg-purple network-monitor-popup-left"> | 4 | <div class="grid-content bg-purple network-monitor-popup-left"> |
5 | <div> | 5 | <div> |
@@ -150,7 +150,7 @@ | @@ -150,7 +150,7 @@ | ||
150 | <el-input style="flex:1;margin-left:10px;" class="margin-right-10" v-model="nodeName" placeholder="输入节点名称" /> | 150 | <el-input style="flex:1;margin-left:10px;" class="margin-right-10" v-model="nodeName" placeholder="输入节点名称" /> |
151 | </el-row> | 151 | </el-row> |
152 | <el-row class="margin-bottom-50"> | 152 | <el-row class="margin-bottom-50"> |
153 | - <el-col :span="24"> | 153 | + <el-col :span="24" :class="[{'table-height':!flag},{'table-height-45':flag}]"> |
154 | <cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList" | 154 | <cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList" |
155 | :showIndex="true" :total="count" | 155 | :showIndex="true" :total="count" |
156 | :showBorder="true" :loading="false" | 156 | :showBorder="true" :loading="false" |
-
Please register or login to post a comment