|
@@ -122,6 +122,8 @@ export const checkInfo = defineStore('checkInfo', () => {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //第二次才算mcu正在失败
|
|
|
|
|
+ const mcuErrorCount = ref(0);
|
|
|
// 通用设备检查函数
|
|
// 通用设备检查函数
|
|
|
const checkDevice = async (deviceName: string, messageType: string) => {
|
|
const checkDevice = async (deviceName: string, messageType: string) => {
|
|
|
try {
|
|
try {
|
|
@@ -155,6 +157,14 @@ export const checkInfo = defineStore('checkInfo', () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if([-1,0].includes(result.status)){
|
|
if([-1,0].includes(result.status)){
|
|
|
|
|
+ if(result.status === -1 ){
|
|
|
|
|
+ if(mcuErrorCount.value === 0){
|
|
|
|
|
+ mcuErrorCount.value++;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ mcuErrorCount.value = 0
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
devices[deviceName].status = result.status;
|
|
devices[deviceName].status = result.status;
|
|
|
devices[deviceName].msg = result.msg;
|
|
devices[deviceName].msg = result.msg;
|
|
|
}
|
|
}
|