Authored by xwx

Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-v32-xwx

1 <div > 1 <div >
2 <!-- 表格--> 2 <!-- 表格-->
3 - <el-table :border="showBorder" v-loading="loading" @selection-change="handleSelectionChange" :data="dataList" stripe header-row-class-name="tbl-header-class" :height="height" 3 + <el-table :border="showBorder" v-loading="loading" :size="size" @selection-change="handleSelectionChange" :data="dataList" stripe header-row-class-name="tbl-header-class" :height="height"
4 style="width: 100%;margin: 0px 0px;"> 4 style="width: 100%;margin: 0px 0px;">
5 <el-table-column v-if="showSelection && columns.length > 0" type="selection" width="55" /> 5 <el-table-column v-if="showSelection && columns.length > 0" type="selection" width="55" />
6 <el-table-column v-if="showIndex && columns.length > 0" type="index" :label="indexLabel" align="center" width="50"/> 6 <el-table-column v-if="showIndex && columns.length > 0" type="index" :label="indexLabel" align="center" width="50"/>
@@ -75,7 +75,12 @@ export default { @@ -75,7 +75,12 @@ export default {
75 showTools:{ 75 showTools:{
76 type: Boolean, 76 type: Boolean,
77 default: false 77 default: false
78 - } 78 + },
  79 + // medium / small / mini
  80 + size:{
  81 + type: String,
  82 + default: 'small'
  83 + },
79 }, 84 },
80 data() { 85 data() {
81 return {} 86 return {}
@@ -16,7 +16,8 @@ @@ -16,7 +16,8 @@
16 :showPage="false" 16 :showPage="false"
17 :showTools="showDetail" 17 :showTools="showDetail"
18 :maxWidth="width" 18 :maxWidth="width"
19 - :height="200"> 19 + size="mini"
  20 + :height="300">
20 <template #tools="{scope}"> 21 <template #tools="{scope}">
21 <el-button type="text" size="small" @click.prevent="handleClick(scope.row,scope.$index)"> 22 <el-button type="text" size="small" @click.prevent="handleClick(scope.row,scope.$index)">
22 明细 23 明细
@@ -180,7 +180,7 @@ const colTypes = (props, list,openLine,openAlarmDialog) => { @@ -180,7 +180,7 @@ const colTypes = (props, list,openLine,openAlarmDialog) => {
180 let col = [{ 180 let col = [{
181 prop: 'resName', 181 prop: 'resName',
182 label: props.itemName, 182 label: props.itemName,
183 - width: 100 183 + width: 150
184 }]; 184 }];
185 185
186 let index = 0; 186 let index = 0;
@@ -194,7 +194,7 @@ const colTypes = (props, list,openLine,openAlarmDialog) => { @@ -194,7 +194,7 @@ const colTypes = (props, list,openLine,openAlarmDialog) => {
194 let colInfo = { 194 let colInfo = {
195 prop: v.kpiId, 195 prop: v.kpiId,
196 label: v.kpiName, 196 label: v.kpiName,
197 - width: 80 197 + width: 50
198 }; 198 };
199 199
200 if (lineKpiIds.indexOf(v.kpiId) != -1) { 200 if (lineKpiIds.indexOf(v.kpiId) != -1) {
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
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 <el-button type="primary" @click="saveAll()" style="margin-left: 10px">添加选中</el-button>
34 - <el-button type="primary" @click="saveAlldata()" style="margin-left: 10px">全部添加</el-button> 34 + <el-button type="primary" @click="saveAllData()" style="margin-left: 10px">全部添加</el-button>
35 </div> 35 </div>
36 36
37 </div> 37 </div>
@@ -136,7 +136,7 @@ export default { @@ -136,7 +136,7 @@ export default {
136 } 136 }
137 137
138 proxy.$http.post('/api-web/fault/conf/apm/saveOrUpdate',params,function (res){ 138 proxy.$http.post('/api-web/fault/conf/apm/saveOrUpdate',params,function (res){
139 - if(res && res.object){ 139 + if(res && res.success){
140 proxy.$global.showMsg('添加成功','success'); 140 proxy.$global.showMsg('添加成功','success');
141 proxy.targetId=res.src; 141 proxy.targetId=res.src;
142 proxy.APMVisible=false; 142 proxy.APMVisible=false;
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 <cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList" 37 <cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
38 :showIndex="true" :total="count" 38 :showIndex="true" :total="count"
39 :showBorder="true" :loading="false" 39 :showBorder="true" :loading="false"
40 - :showPage="true" :showTools="true" :height="(height - 500)"> 40 + :showPage="true" :showTools="isDetail" :height="(height - 500)">
41 <!-- <template #default="{row,prop,column}"> 41 <!-- <template #default="{row,prop,column}">
42 <div v-if="prop == 'kpiName'" class="list-data"> 42 <div v-if="prop == 'kpiName'" class="list-data">
43 <span class="list-data-text">{{row.kpiName }}</span> 43 <span class="list-data-text">{{row.kpiName }}</span>
@@ -87,6 +87,8 @@ export default { @@ -87,6 +87,8 @@ export default {
87 let busTypeList = Vue.ref([]); 87 let busTypeList = Vue.ref([]);
88 let bizId=Vue.ref();//所属业务id 88 let bizId=Vue.ref();//所属业务id
89 let targetId=Vue.ref();//所属模块id 89 let targetId=Vue.ref();//所属模块id
  90 + //是否是详情页面
  91 + let isDetail=Vue.ref(false);
90 92
91 let init = () =>{ 93 let init = () =>{
92 let params={ 94 let params={
@@ -140,6 +142,7 @@ export default { @@ -140,6 +142,7 @@ export default {
140 142
141 } 143 }
142 return { 144 return {
  145 + isDetail,
143 changeRes, 146 changeRes,
144 setBizId, 147 setBizId,
145 bizId, 148 bizId,
@@ -230,12 +233,26 @@ export default { @@ -230,12 +233,26 @@ export default {
230 pageSize:5 233 pageSize:5
231 234
232 } 235 }
233 - this.$http.get('/api-web/fault/conf/base/getFaultBaseAllResInfo',params,function (res){  
234 - if(res && res.data){  
235 - that.count = res.count;  
236 - that.tableDataList=res.data;  
237 - }  
238 - }) 236 + console.log("*/*/*",this.targetId)
  237 + if(this.targetId){
  238 + //详情页面
  239 + this.isDetail=true;
  240 + this.$http.get('/api-web/fault/conf/base/getFaultBaseAllResInfo',params,function (res){
  241 + if(res && res.data){
  242 + that.count = res.count;
  243 + that.tableDataList=res.data;
  244 + }
  245 + })
  246 + }else{
  247 + this.isDetail=false;
  248 + this.$http.get('/api-web/fault/base/config/page',params,function (res){
  249 + if(res && res.data){
  250 + that.count = res.count;
  251 + that.tableDataList=res.data;
  252 + }
  253 + })
  254 + }
  255 +
239 } 256 }
240 257
241 258
@@ -704,7 +704,7 @@ export default { @@ -704,7 +704,7 @@ export default {
704 } 704 }
705 705
706 if(this.type){ 706 if(this.type){
707 - if(this.type=='base'){ 707 + if(this.type=='base' && this.faultEnvironmentRadio=='1'){
708 this.saveBase(); 708 this.saveBase();
709 }else{ 709 }else{
710 this.saveConfigDetailOther(); 710 this.saveConfigDetailOther();
@@ -777,7 +777,7 @@ export default { @@ -777,7 +777,7 @@ export default {
777 that.switchModel(); 777 that.switchModel();
778 778
779 }else{ 779 }else{
780 - that.$global.showMsg('保存失败','warning') 780 + that.$global.showMsg('模块保存失败','warning')
781 781
782 } 782 }
783 that.isLoading=false; 783 that.isLoading=false;
@@ -904,11 +904,11 @@ export default { @@ -904,11 +904,11 @@ export default {
904 if(res && res.success){ 904 if(res && res.success){
905 that.targetId=res.str; 905 that.targetId=res.str;
906 that.setTargetId(that.targetId) 906 that.setTargetId(that.targetId)
907 - that.$global.showMsg('保存成功') 907 + that.$global.showMsg(res.msg)
908 // that.alarmList=res.data; 908 // that.alarmList=res.data;
909 that.saveConfigDetailOther(); 909 that.saveConfigDetailOther();
910 }else{ 910 }else{
911 - that.$global.showMsg('保存失败','warning') 911 + that.$global.showMsg('基础环境保存失败','warning')
912 912
913 } 913 }
914 that.isLoading=false; 914 that.isLoading=false;
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 </el-row> 10 </el-row>
11 <el-row class="margin-all-30"> 11 <el-row class="margin-all-30">
12 <el-col :span="3" v-for="(item,index) in diagnosisData"> 12 <el-col :span="3" v-for="(item,index) in diagnosisData">
13 - <div class="doc-list flex-clum" @click="detailDiagnosisDoc(item)"> 13 + <div class="doc-list flex-clum margin-bottom-10" @click="detailDiagnosisDoc(item)">
14 <img src="./src/assets/images/faultDiagnosis/icon-doc.png" alt=""> 14 <img src="./src/assets/images/faultDiagnosis/icon-doc.png" alt="">
15 <span class="doc-name">{{item.name}}</span> 15 <span class="doc-name">{{item.name}}</span>
16 </div> 16 </div>
@@ -62,8 +62,8 @@ @@ -62,8 +62,8 @@
62 <i class="icon-step flex-div-center"><img :src="'/src/style/img/restypeimg/'+itemNode[0].resType+'.png'" alt=""></i> 62 <i class="icon-step flex-div-center"><img :src="'/src/style/img/restypeimg/'+itemNode[0].resType+'.png'" alt=""></i>
63 </div> 63 </div>
64 </el-tooltip> 64 </el-tooltip>
65 - <!-- <span :class="['list-line',{'isActive':item.nodeName && index<nodeData.length}]"></span>-->  
66 <span @click="addTableList(false)" v-if="index+1<nodeData.length && itemNode.length<=1" :class="['list-line','cursorClass',{'isActive':itemNode.length>1}]"></span> 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>-->
67 67
68 <el-tooltip 68 <el-tooltip
69 class="item" 69 class="item"
@@ -172,11 +172,13 @@ export default { @@ -172,11 +172,13 @@ export default {
172 bNetNodeList.map((item,index)=>{ 172 bNetNodeList.map((item,index)=>{
173 item.sort=index; 173 item.sort=index;
174 }) 174 })
175 - if(proxy.linkId){  
176 - // bNetNodeList.linkId=proxy.linkId; 175 + let linkId='';
  176 + if(proxy.isClickNet!=-1){
  177 + linkId=proxy.linkId;
177 } 178 }
178 let params={ 179 let params={
179 bNetLink:{ 180 bNetLink:{
  181 + id:linkId,
180 linkName:proxy.linkName, 182 linkName:proxy.linkName,
181 bizId:proxy.bizId, 183 bizId:proxy.bizId,
182 targetId:proxy.targetId, 184 targetId:proxy.targetId,
@@ -15,33 +15,33 @@ const faultDetail = () => { @@ -15,33 +15,33 @@ const faultDetail = () => {
15 faultTypeName: '拨测', 15 faultTypeName: '拨测',
16 components: 'result-item', 16 components: 'result-item',
17 color: '#67C23A', 17 color: '#67C23A',
18 - itemName:'场景名称',  
19 - detail:false,  
20 - colType:'kpi'  
21 - },{ 18 + itemName: '场景名称',
  19 + detail: false,
  20 + colType: 'kpi'
  21 + }, {
22 faultType: 'NPM', 22 faultType: 'NPM',
23 faultTypeName: 'NPM', 23 faultTypeName: 'NPM',
24 components: 'result-item', 24 components: 'result-item',
25 color: '#E6A23C', 25 color: '#E6A23C',
26 - itemName:'链路(流名称)',  
27 - detail:false,  
28 - colType:'kpi'  
29 - },{ 26 + itemName: '链路(流名称)',
  27 + detail: false,
  28 + colType: 'kpi'
  29 + }, {
30 faultType: 'BASE', 30 faultType: 'BASE',
31 faultTypeName: '基础', 31 faultTypeName: '基础',
32 components: 'result-item', 32 components: 'result-item',
33 color: '#67C23A', 33 color: '#67C23A',
34 - itemName:'检测指标',  
35 - detail:true,  
36 - colType:'flag'  
37 - }, { 34 + itemName: '检测指标',
  35 + detail: true,
  36 + colType: 'flag'
  37 + }, {
38 faultType: 'APM', 38 faultType: 'APM',
39 faultTypeName: 'APM', 39 faultTypeName: 'APM',
40 components: 'result-item', 40 components: 'result-item',
41 color: '#F56C6C', 41 color: '#F56C6C',
42 - itemName:'检测指标',  
43 - detail:true,  
44 - colType:'flag' 42 + itemName: '检测指标',
  43 + detail: true,
  44 + colType: 'flag'
45 }/*, { 45 }/*, {
46 faultType: 'NETLINK', 46 faultType: 'NETLINK',
47 faultTypeName: '网络链路', 47 faultTypeName: '网络链路',
@@ -162,11 +162,11 @@ const handleInfo = () => { @@ -162,11 +162,11 @@ const handleInfo = () => {
162 * 作者: Wang 162 * 作者: Wang
163 * 时间:2021/12/14 23:05 163 * 时间:2021/12/14 23:05
164 */ 164 */
165 - let saveHandleInfo = (key,callback) => { 165 + let saveHandleInfo = (key, callback) => {
166 proxy.$refs[key].validate((valid) => { 166 proxy.$refs[key].validate((valid) => {
167 if (valid) { 167 if (valid) {
168 - proxy.$http.post('/api-web/fault/solve',handleInfoForm.value,function (res){  
169 - if(res && res.success){ 168 + proxy.$http.post('/api-web/fault/solve', handleInfoForm.value, function (res) {
  169 + if (res && res.success) {
170 proxy.$global.showMsg("处理成功!"); 170 proxy.$global.showMsg("处理成功!");
171 showHandleInfoDialog(false); 171 showHandleInfoDialog(false);
172 } else { 172 } else {
@@ -234,42 +234,56 @@ export default { @@ -234,42 +234,56 @@ export default {
234 columns: [{ 234 columns: [{
235 prop: 'faultBody', 235 prop: 'faultBody',
236 label: '故障主体', 236 label: '故障主体',
  237 + width: 150,
237 click: function (row) { 238 click: function (row) {
238 // 展示弹框 239 // 展示弹框
239 closeFaultDetailDialog(true); 240 closeFaultDetailDialog(true);
240 // 设置相信信息 241 // 设置相信信息
241 settingDetail(row); 242 settingDetail(row);
  243 + },
  244 + render: function (row) {
  245 + return `<span style="text-decoration: underline;color: blue;">${row.faultBody}</span>`
242 } 246 }
243 }, { 247 }, {
244 prop: 'faulttype', 248 prop: 'faulttype',
  249 + width: 80,
245 label: '故障分类' 250 label: '故障分类'
246 }, { 251 }, {
247 prop: 'createTime', 252 prop: 'createTime',
248 - label: '发生时间' 253 + label: '发生时间',
  254 + width: 120,
249 }, { 255 }, {
250 prop: 'faultState', 256 prop: 'faultState',
251 - label: '故障状态' 257 + label: '故障状态',
  258 + width: 80,
252 }, { 259 }, {
253 prop: 'solveway', 260 prop: 'solveway',
254 - label: '处理方式' 261 + label: '处理方式',
  262 + width: 70,
255 }, { 263 }, {
256 prop: 'solveTime', 264 prop: 'solveTime',
257 - label: '处理时间' 265 + label: '处理时间',
  266 + width: 120,
258 }, { 267 }, {
259 prop: 'solveby', 268 prop: 'solveby',
260 - label: '处理人' 269 + label: '处理人',
  270 + width: 80,
261 }, { 271 }, {
262 prop: 'duration', 272 prop: 'duration',
263 - label: '持续时长' 273 + label: '持续时长',
  274 + width: 80,
264 }, { 275 }, {
265 prop: 'reason', 276 prop: 'reason',
266 - label: '原因分析' 277 + label: '原因分析',
  278 + width: 220,
267 }, { 279 }, {
268 prop: 'solution', 280 prop: 'solution',
269 - label: '处理方案' 281 + label: '处理方案',
  282 + width: 150,
270 }, { 283 }, {
271 prop: 'influenceScope', 284 prop: 'influenceScope',
272 - label: '影响范围' 285 + label: '影响范围',
  286 + width: 220,
273 }], 287 }],
274 dataList: [], 288 dataList: [],
275 total: 0 289 total: 0