根据状态判断是否显示故障时间

This commit is contained in:
joylink_fanyuhong 2024-11-18 17:29:46 +08:00
parent 109a19527d
commit e2faeb2d05
1 changed files with 22 additions and 4 deletions

View File

@ -96,10 +96,28 @@ watch(
(val) => {
if (val.length) {
centerFaultDevice();
val.forEach((info) => {
alarmInfoList.push(info);
});
faultInfo.value = true;
const lineState = lineNetStore.connectInfo?.msgs.find(
(msg) => msg.lineId == lineId
);
// console.log(lineState, 'line');
if (lineState?.atsWarnShowCounter) {
val.forEach((info) => {
alarmInfoList.push(info);
});
faultInfo.value = true;
}
}
}
);
watch(
() => lineNetStore.connectInfo,
(val) => {
if (val?.msgs) {
const lineState = val.msgs.find((msg) => msg.lineId == lineId);
if (!lineState?.atsWarnShowCounter) {
faultInfo.value = false;
}
}
}
);