<tr ng-repeat="i in tableData" >
<td>{{i.deviceName}}</td>
<td>{{i.aStartTs}}</td>
<td>{{i.aAlarmRules}}</td>
<td>{{i.aAlarmValues}}</td>
<td>{{i.aType}}</td>
<td>{{i.aSeverity | filterSeverity:i.aSeverity}}</td>
<td>{{i.aFaultCode}}</td>
<td ng-click="dialogshow(i.aAlarmId,$index)" style="color:blue">{{i.fFaultParttern}}{{i.reasonFlag | filterReason:i.reasonFlag}}</td>
</tr>
//------“等级”字段,中英文转换
app.filter("filterSeverity", function() {return function(input, name) {
switch (name) {
case "CRITICAL":
return '危险';
break;
case "MAJOR":
return '重要';
break;
case "MINOR":
return '次要';
break;
case "WARNING":
return '警告';
break;
case "INDETERMINATE":
return '不确定';
break;
}
}
});
//--“故障原因”字段设置
app.filter("filterReason", function() {
return function(input, reasonFlag) {
if (reasonFlag == "2") {
return '(推荐)';
}
}
});