Authored by 王涛

Merge branch 'master-v32-xwx' into 'master'

故障诊断基础资源调整



See merge request !801
  1 +<script src="resItem/index.js"></script>
1 <div> 2 <div>
2 <div class="d-flex"> 3 <div class="d-flex">
3 <img src="../src/style/img/fault/base.gif" style="object-fit: contain"> 4 <img src="../src/style/img/fault/base.gif" style="object-fit: contain">
@@ -19,7 +20,7 @@ @@ -19,7 +20,7 @@
19 </div> 20 </div>
20 <el-divider/> 21 <el-divider/>
21 <div class="d-flex" v-model="dialTest"> 22 <div class="d-flex" v-model="dialTest">
22 - <div style="width: 300px;text-align: center;color: #666666;font-size: 18px">汇总信息</div> 23 + <div style="width: 200px;text-align: center;color: #666666;font-size: 18px">汇总信息</div>
23 <div> 24 <div>
24 <div class="d-flex align-left"> 25 <div class="d-flex align-left">
25 <div style="width: 230px;margin-left: 20px;display: flex;align-self: center;color: #666666;font-size: 16px"> 26 <div style="width: 230px;margin-left: 20px;display: flex;align-self: center;color: #666666;font-size: 16px">
@@ -81,10 +81,10 @@ export default { @@ -81,10 +81,10 @@ export default {
81 prop: 'os', 81 prop: 'os',
82 label: '操作系统', 82 label: '操作系统',
83 },{ 83 },{
84 - prop: 'createBy',  
85 - label: '创建用户', 84 + prop: 'adminName',
  85 + label: '资源负责人',
86 }] 86 }]
87 - service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo, props.targetType.toLocaleLowerCase(), param); 87 + service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo, props.targetType.toLocaleLowerCase(), param,'','诊断资源');
88 } 88 }
89 //诊断指标 89 //诊断指标
90 const openKpiList = () => { 90 const openKpiList = () => {
@@ -101,10 +101,17 @@ @@ -101,10 +101,17 @@
101 </el-col> 101 </el-col>
102 </el-row> 102 </el-row>
103 103
104 - <el-row style="height: 70px;padding: 10px 30px;" v-if="item.resClass=='system'"> 104 + <el-row style="height: 70px;padding: 10px 30px;display:flex;align-items:center;" v-if="item.resClass=='system'">
105 <el-col :span="4" class="align-center" style="margin: auto;"> 105 <el-col :span="4" class="align-center" style="margin: auto;">
106 - <img v-if="item.linkState =='连接成功'" src="../src/style/img/fault/base/linkSucccess.png" >  
107 - <img v-else src="../src/style/img/fault/base/linkError.png" > 106 + <el-tooltip
  107 + effect="light"
  108 + placement="top-start">
  109 + <template #content>
  110 + {{item.kpiName}}: {{item.linkState}}
  111 + </template>
  112 + <img src="../src/style/img/fault/base/linkSucccess.png" v-if="item.linkState =='连接成功'">
  113 + <img src="../src/style/img/fault/base/linkError.png" v-else>
  114 + </el-tooltip>
108 </el-col> 115 </el-col>
109 <el-col :span="1" style="line-height: 36px;color: gainsboro;"> 116 <el-col :span="1" style="line-height: 36px;color: gainsboro;">
110 | 117 |
@@ -126,14 +133,28 @@ @@ -126,14 +133,28 @@
126 {{item.collTime}} 133 {{item.collTime}}
127 </el-col> 134 </el-col>
128 </el-row> 135 </el-row>
129 - <el-row style="height: 70px;padding: 10px 30px;" v-if="item.resClass!='system'"> 136 + <el-row style="height: 70px;padding: 10px 30px;display:flex;align-items:center;" v-if="item.resClass!='system'">
130 <el-col :span="3" class="align-center" v-if="item.resClass!='middleware'" > 137 <el-col :span="3" class="align-center" v-if="item.resClass!='middleware'" >
  138 + <el-tooltip
  139 + effect="light"
  140 + placement="top-start">
  141 + <template #content>
  142 + {{item.kpiName}}: {{item.linkState}}
  143 + </template>
131 <img src="../src/style/img/fault/base/linkSucccess.png" v-if="item.linkState=='连接成功'"> 144 <img src="../src/style/img/fault/base/linkSucccess.png" v-if="item.linkState=='连接成功'">
132 <img src="../src/style/img/fault/base/linkError.png" v-else> 145 <img src="../src/style/img/fault/base/linkError.png" v-else>
  146 + </el-tooltip>
133 </el-col> 147 </el-col>
134 <el-col :span="3" class="align-center" v-else > 148 <el-col :span="3" class="align-center" v-else >
135 - <img src="../src/style/img/fault/base/linkSucccess.png">  
136 - <img src="../src/style/img/fault/base/linkError.png"> 149 + <el-tooltip
  150 + effect="light"
  151 + placement="top-start">
  152 + <template #content>
  153 + {{item.kpiName}}: {{item.linkState}}
  154 + </template>
  155 + <img src="../src/style/img/fault/base/middleSuccess.png" v-if="item.linkState=='连接成功'">
  156 + <img src="../src/style/img/fault/base/middleError.png" v-else>
  157 + </el-tooltip>
137 </el-col> 158 </el-col>
138 <el-col :span="2" class="align-center" style="color: gainsboro;"> 159 <el-col :span="2" class="align-center" style="color: gainsboro;">
139 | 160 |
@@ -54,27 +54,29 @@ export default { @@ -54,27 +54,29 @@ export default {
54 let resItem={ 54 let resItem={
55 resName:'', 55 resName:'',
56 ipAddr:'', 56 ipAddr:'',
57 - linkState:'', 57 + linkState:'连接失败',
58 cpu:'', 58 cpu:'',
59 men:'', 59 men:'',
60 alarm:'', 60 alarm:'',
61 resClass:'', 61 resClass:'',
62 collTime:'', 62 collTime:'',
63 - health:'' 63 + health:'',
  64 + kpiName:'监控连接状态'
64 } 65 }
65 for (let j = 0; j < data[i].length; j++) { 66 for (let j = 0; j < data[i].length; j++) {
66 - resItem.resName=data[i][j].resName  
67 - resItem.ipAddr=data[i][j].ipAddr  
68 - resItem.alarm=data[i][j].alarmNum  
69 - resItem.collTime=data[i][j].collTimeRecent  
70 - resItem.resClass=data[i][j].resClass  
71 - resItem.health=data[i][j].health 67 + resItem.resName=data[i][j].resName;
  68 + resItem.ipAddr=data[i][j].ipAddr;
  69 + resItem.alarm=data[i][j].alarmNum;
  70 + resItem.collTime=data[i][j].collTimeRecent;
  71 + resItem.resClass=data[i][j].resClass;
  72 + resItem.health=data[i][j].health;
72 if (data[i][j].kpiId=='KPI31CB8D97'){ 73 if (data[i][j].kpiId=='KPI31CB8D97'){
73 resItem.men=data[i][j].diagnosisResult 74 resItem.men=data[i][j].diagnosisResult
74 }else if (data[i][j].kpiId=='KPI7054BC34'){ 75 }else if (data[i][j].kpiId=='KPI7054BC34'){
75 resItem.cpu=data[i][j].diagnosisResult 76 resItem.cpu=data[i][j].diagnosisResult
76 - }else if (data[i][j].kpiId=='KPIE13DD9A3'){  
77 - resItem.linkState=data[i][j].diagnosisResult 77 + }else if (data[i][j].kpiId=='KPIE13DD9A3'||data[i][j].kpiId=='KPI4DA976AF'){
  78 + resItem.linkState=data[i][j].diagnosisResult;
  79 + resItem.kpiName=data[i][j].kpiName;
78 } 80 }
79 81
80 } 82 }
@@ -120,10 +122,10 @@ export default { @@ -120,10 +122,10 @@ export default {
120 prop: 'os', 122 prop: 'os',
121 label: '操作系统', 123 label: '操作系统',
122 },{ 124 },{
123 - prop: 'createBy',  
124 - label: '创建用户', 125 + prop: 'adminName',
  126 + label: '资源负责人',
125 }] 127 }]
126 - service.sendEventDiagnoseBusinessScenarios(props.parentEmit, faultNo,targetType,param,resClass); 128 + service.sendEventDiagnoseBusinessScenarios(props.parentEmit, faultNo,targetType,param,resClass,'诊断资源');
127 } 129 }
128 //诊断指标 130 //诊断指标
129 const openKpiList = () => { 131 const openKpiList = () => {
@@ -296,7 +296,6 @@ const faultEvent = () => { @@ -296,7 +296,6 @@ const faultEvent = () => {
296 title: title, 296 title: title,
297 columns: [{ 297 columns: [{
298 prop: 'taskName', 298 prop: 'taskName',
299 - width: 220,  
300 label: '名称', 299 label: '名称',
301 }], 300 }],
302 data: [] 301 data: []
@@ -325,7 +324,7 @@ const faultEvent = () => { @@ -325,7 +324,7 @@ const faultEvent = () => {
325 } 324 }
326 325
327 dataItem[kpiId] = val; 326 dataItem[kpiId] = val;
328 - dataItem['taskName'] = listItem.shortName; 327 + dataItem['taskName'] = listItem.name;
329 328
330 }); 329 });
331 obj.data.push(dataItem); 330 obj.data.push(dataItem);
@@ -372,10 +371,10 @@ const faultEvent = () => { @@ -372,10 +371,10 @@ const faultEvent = () => {
372 label: '诊断结果', 371 label: '诊断结果',
373 render: function (row) { 372 render: function (row) {
374 if (row) { 373 if (row) {
375 - if (row.isAbnormal === 1) {  
376 - return `<span style="color: red;">异常</span>` 374 + if (row.isAbnormal != 1 && row.isAbnormal != null) {
  375 + return `<span style="color:#00A522;">正常</span>`
377 } else { 376 } else {
378 - return `<span style="color: blue;"></span>` 377 + return `<span style="color: red "></span>`
379 } 378 }
380 } 379 }
381 return ''; 380 return '';
@@ -416,10 +415,10 @@ const faultEvent = () => { @@ -416,10 +415,10 @@ const faultEvent = () => {
416 * @param targetType 诊断类型 415 * @param targetType 诊断类型
417 * @param columns 数组,表格列对象 416 * @param columns 数组,表格列对象
418 */ 417 */
419 - const sendEventDiagnoseBusinessScenarios = (emit, faultNo, targetType, columns, resClass) => { 418 + const sendEventDiagnoseBusinessScenarios = (emit, faultNo, targetType, columns, resClass,title) => {
420 419
421 var obj = { 420 var obj = {
422 - title:'诊断业务场景', 421 + title:title,
423 columns: columns, 422 columns: columns,
424 data: [] 423 data: []
425 } 424 }