Authored by wangtao

指标下探

... ... @@ -245,7 +245,7 @@ const faultEvent = () => {
resId: '',
kpiId: '',
flag: '',
resClass:''
resClass: ''
}, params);
}
... ... @@ -345,10 +345,10 @@ const faultEvent = () => {
// return;
// }
var title ='';
if (type=='') {
var title = '';
if (type == '') {
title = '诊断项';
}else {
} else {
title = type == 'normal' ? '诊断项(正常)' : '诊断项(异常)';
}
... ... @@ -365,16 +365,44 @@ const faultEvent = () => {
prop: 'diagnosisResult',
width: 200,
label: '诊断值',
click: (row) => {
sendEventLineDialog(emit, {
faultNo: faultNo,
targetType: targetType,
resId: row.resId,
kpiId: row.kpiId,
flag: row.flag,
resClass: ''
})
},
render: function (row) {
if (row) {
var lineClass = row.kpiIdent == 1 ? 'text-decoration: underline;' : '';
return `<span style="${lineClass}">${row.diagnosisResult}</span>`
}
return '';
}
}, {
prop: 'isAbnormal',
width: 200,
label: '诊断结果',
click: (row) => {
sendEventLineDialog(emit, {
faultNo: faultNo,
targetType: targetType,
resId: row.resId,
kpiId: row.kpiId,
flag: row.flag,
resClass: ''
})
},
render: function (row) {
if (row) {
var lineClass = row.kpiIdent == 1 ? 'text-decoration: underline;' : '';
if (row.isAbnormal != 1 && row.isAbnormal != null) {
return `<span style="color:#00A522;">正常</span>`
return `<span style="${lineClass}color:#00A522;">正常</span>`
} else {
return `<span style="color: red ">异常</span>`
return `<span style="${lineClass}color: red ">异常</span>`
}
}
return '';
... ... @@ -388,7 +416,7 @@ const faultEvent = () => {
// 正常
if (type == 'normal') {
isAbnormal = 0;
} else if(type == 'abnormal'){
} else if (type == 'abnormal') {
isAbnormal = 1;
}
... ... @@ -415,10 +443,10 @@ const faultEvent = () => {
* @param targetType 诊断类型
* @param columns 数组,表格列对象
*/
const sendEventDiagnoseBusinessScenarios = (emit, faultNo, targetType, columns, resClass,title) => {
const sendEventDiagnoseBusinessScenarios = (emit, faultNo, targetType, columns, resClass, title) => {
var obj = {
title:title,
title: title,
columns: columns,
data: []
}
... ... @@ -449,7 +477,7 @@ const faultEvent = () => {
const sendEventDiagnoseKpiList = (emit, faultNo, targetType) => {
var obj = {
title:'诊断指标',
title: '诊断指标',
columns: [{
prop: 'kpiId',
label: "指标ID",
... ...