Authored by 王涛

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

故障诊断基础资源调整



See merge request !801
<script src="resItem/index.js"></script>
<div>
<div class="d-flex">
<img src="../src/style/img/fault/base.gif" style="object-fit: contain">
... ... @@ -19,7 +20,7 @@
</div>
<el-divider/>
<div class="d-flex" v-model="dialTest">
<div style="width: 300px;text-align: center;color: #666666;font-size: 18px">汇总信息</div>
<div style="width: 200px;text-align: center;color: #666666;font-size: 18px">汇总信息</div>
<div>
<div class="d-flex align-left">
<div style="width: 230px;margin-left: 20px;display: flex;align-self: center;color: #666666;font-size: 16px">
... ...
... ... @@ -81,10 +81,10 @@ export default {
prop: 'os',
label: '操作系统',
},{
prop: 'createBy',
label: '创建用户',
prop: 'adminName',
label: '资源负责人',
}]
service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo, props.targetType.toLocaleLowerCase(), param);
service.sendEventDiagnoseBusinessScenarios(emit, props.faultNo, props.targetType.toLocaleLowerCase(), param,'','诊断资源');
}
//诊断指标
const openKpiList = () => {
... ...
... ... @@ -101,10 +101,17 @@
</el-col>
</el-row>
<el-row style="height: 70px;padding: 10px 30px;" v-if="item.resClass=='system'">
<el-row style="height: 70px;padding: 10px 30px;display:flex;align-items:center;" v-if="item.resClass=='system'">
<el-col :span="4" class="align-center" style="margin: auto;">
<img v-if="item.linkState =='连接成功'" src="../src/style/img/fault/base/linkSucccess.png" >
<img v-else src="../src/style/img/fault/base/linkError.png" >
<el-tooltip
effect="light"
placement="top-start">
<template #content>
{{item.kpiName}}: {{item.linkState}}
</template>
<img src="../src/style/img/fault/base/linkSucccess.png" v-if="item.linkState =='连接成功'">
<img src="../src/style/img/fault/base/linkError.png" v-else>
</el-tooltip>
</el-col>
<el-col :span="1" style="line-height: 36px;color: gainsboro;">
|
... ... @@ -126,14 +133,28 @@
{{item.collTime}}
</el-col>
</el-row>
<el-row style="height: 70px;padding: 10px 30px;" v-if="item.resClass!='system'">
<el-row style="height: 70px;padding: 10px 30px;display:flex;align-items:center;" v-if="item.resClass!='system'">
<el-col :span="3" class="align-center" v-if="item.resClass!='middleware'" >
<img src="../src/style/img/fault/base/linkSucccess.png" v-if="item.linkState=='连接成功'">
<img src="../src/style/img/fault/base/linkError.png" v-else>
<el-tooltip
effect="light"
placement="top-start">
<template #content>
{{item.kpiName}}: {{item.linkState}}
</template>
<img src="../src/style/img/fault/base/linkSucccess.png" v-if="item.linkState=='连接成功'">
<img src="../src/style/img/fault/base/linkError.png" v-else>
</el-tooltip>
</el-col>
<el-col :span="3" class="align-center" v-else >
<img src="../src/style/img/fault/base/linkSucccess.png">
<img src="../src/style/img/fault/base/linkError.png">
<el-tooltip
effect="light"
placement="top-start">
<template #content>
{{item.kpiName}}: {{item.linkState}}
</template>
<img src="../src/style/img/fault/base/middleSuccess.png" v-if="item.linkState=='连接成功'">
<img src="../src/style/img/fault/base/middleError.png" v-else>
</el-tooltip>
</el-col>
<el-col :span="2" class="align-center" style="color: gainsboro;">
|
... ...
... ... @@ -54,27 +54,29 @@ export default {
let resItem={
resName:'',
ipAddr:'',
linkState:'',
linkState:'连接失败',
cpu:'',
men:'',
alarm:'',
resClass:'',
collTime:'',
health:''
health:'',
kpiName:'监控连接状态'
}
for (let j = 0; j < data[i].length; j++) {
resItem.resName=data[i][j].resName
resItem.ipAddr=data[i][j].ipAddr
resItem.alarm=data[i][j].alarmNum
resItem.collTime=data[i][j].collTimeRecent
resItem.resClass=data[i][j].resClass
resItem.health=data[i][j].health
resItem.resName=data[i][j].resName;
resItem.ipAddr=data[i][j].ipAddr;
resItem.alarm=data[i][j].alarmNum;
resItem.collTime=data[i][j].collTimeRecent;
resItem.resClass=data[i][j].resClass;
resItem.health=data[i][j].health;
if (data[i][j].kpiId=='KPI31CB8D97'){
resItem.men=data[i][j].diagnosisResult
}else if (data[i][j].kpiId=='KPI7054BC34'){
resItem.cpu=data[i][j].diagnosisResult
}else if (data[i][j].kpiId=='KPIE13DD9A3'){
resItem.linkState=data[i][j].diagnosisResult
}else if (data[i][j].kpiId=='KPIE13DD9A3'||data[i][j].kpiId=='KPI4DA976AF'){
resItem.linkState=data[i][j].diagnosisResult;
resItem.kpiName=data[i][j].kpiName;
}
}
... ... @@ -120,10 +122,10 @@ export default {
prop: 'os',
label: '操作系统',
},{
prop: 'createBy',
label: '创建用户',
prop: 'adminName',
label: '资源负责人',
}]
service.sendEventDiagnoseBusinessScenarios(props.parentEmit, faultNo,targetType,param,resClass);
service.sendEventDiagnoseBusinessScenarios(props.parentEmit, faultNo,targetType,param,resClass,'诊断资源');
}
//诊断指标
const openKpiList = () => {
... ...
... ... @@ -296,7 +296,6 @@ const faultEvent = () => {
title: title,
columns: [{
prop: 'taskName',
width: 220,
label: '名称',
}],
data: []
... ... @@ -325,7 +324,7 @@ const faultEvent = () => {
}
dataItem[kpiId] = val;
dataItem['taskName'] = listItem.shortName;
dataItem['taskName'] = listItem.name;
});
obj.data.push(dataItem);
... ... @@ -372,10 +371,10 @@ const faultEvent = () => {
label: '诊断结果',
render: function (row) {
if (row) {
if (row.isAbnormal === 1) {
return `<span style="color: red;">异常</span>`
if (row.isAbnormal != 1 && row.isAbnormal != null) {
return `<span style="color:#00A522;">正常</span>`
} else {
return `<span style="color: blue;"></span>`
return `<span style="color: red "></span>`
}
}
return '';
... ... @@ -416,10 +415,10 @@ const faultEvent = () => {
* @param targetType 诊断类型
* @param columns 数组,表格列对象
*/
const sendEventDiagnoseBusinessScenarios = (emit, faultNo, targetType, columns, resClass) => {
const sendEventDiagnoseBusinessScenarios = (emit, faultNo, targetType, columns, resClass,title) => {
var obj = {
title:'诊断业务场景',
title:title,
columns: columns,
data: []
}
... ...