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

This commit is contained in:
joylink_fanyuhong 2024-11-18 17:29:46 +08:00
parent 109a19527d
commit e2faeb2d05

View File

@ -96,12 +96,30 @@ watch(
(val) => { (val) => {
if (val.length) { if (val.length) {
centerFaultDevice(); centerFaultDevice();
const lineState = lineNetStore.connectInfo?.msgs.find(
(msg) => msg.lineId == lineId
);
// console.log(lineState, 'line');
if (lineState?.atsWarnShowCounter) {
val.forEach((info) => { val.forEach((info) => {
alarmInfoList.push(info); alarmInfoList.push(info);
}); });
faultInfo.value = true; 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;
}
}
}
); );
const lineId = Number(route.params.lineId); const lineId = Number(route.params.lineId);