大屏后台与2d监控js

This commit is contained in:
猫猫guowen
2025-10-13 08:38:34 +08:00
parent 4d4a381b0c
commit af75c2bcb1
2 changed files with 131 additions and 1 deletions

View File

@@ -1677,7 +1677,13 @@ function applyContainerStyle(container, style) {
function buildAlarmText(alarms) {
const alarmTexts = alarms.map(alarm => {
const errorCode = alarm.code || alarm.type || '未知';
return `【${alarm.id}${alarm.name}】错误代码: ${errorCode},报警信息:${ddjSbzt(errorCode)}`;
if(alarm.name=="堆垛机"){
return `【${alarm.id}${alarm.name}】错误代码: ${errorCode},报警信息:${ddjSbzt(errorCode)}`;
}else if(alarm.name=="输送机"){
return `【${alarm.id}${alarm.name}】错误代码: ${errorCode},报警信息:${ssjSbzt(errorCode)}`;
}else {
return `【${alarm.id}${alarm.name}】错误代码: ${errorCode},报警信息:未知`;
}
});
return alarmTexts.join(ALARM_CONFIG.TEXT.SEPARATOR);
}