Commit dcd40833 authored by wanghao's avatar wanghao

1 老化过程中 获取卡号,获取IOT状态调整中

parent 091e31f7
......@@ -353,22 +353,66 @@ export default {
}
},
// isDeviceError(device) {
// // 如果设备已解绑,则不视为错误
// if (!device.motherboardCode || device.calibrationUnbindStatus === '1') return false;
//
// // 原有的异常判断逻辑保持不变
// return device.deviceStatus === '0' ||
// device.deviceStatus === '5' ||
// device.deviceStatus === '-9999' ||
// (device.realTimeStatus != null && device.realTimeStatus === '0') ||
// (device.calibrationConcentrationStatus != null && device.calibrationConcentrationStatus !== '4') ||
// (device.writeTimeStatus != null && device.writeTimeStatus === '0') ||
// (device.runTimeStatus != null && device.runTimeStatus === '0') ||
// (device.relayStatus != null && device.relayStatus === 0) ||
// (device.pulseStatus != null && device.pulseStatus === 0) ||
// (device.iotStatus != null && device.iotStatus === 0) ||
// device.moduleStatus === 0 || device.simCardStatus === 0 || device.networkStatus === 0;
// },
isDeviceError(device) {
// 如果设备已解绑,则不视为错误
if (!device.motherboardCode || device.calibrationUnbindStatus === '1') return false;
// 原有的异常判断逻辑保持不变
return device.deviceStatus === '0' ||
// ------------------------------
// 1. 基础异常判断(始终检查)
// ------------------------------
const basicError =
device.deviceStatus === '0' ||
device.deviceStatus === '5' ||
device.deviceStatus === '-9999' ||
(device.realTimeStatus != null && device.realTimeStatus === '0') ||
(device.calibrationConcentrationStatus != null && device.calibrationConcentrationStatus !== '4') ||
(device.writeTimeStatus != null && device.writeTimeStatus === '0') ||
(device.runTimeStatus != null && device.runTimeStatus === '0') ||
(device.relayStatus != null && device.relayStatus === 0) ||
(device.pulseStatus != null && device.pulseStatus === 0) ||
(device.iotStatus != null && device.iotStatus === 0) ||
device.moduleStatus === 0 || device.simCardStatus === 0 || device.networkStatus === 0;
device.moduleStatus === 0;
if (basicError) return true;
// ------------------------------
// 2. 根据 readingMode 条件检查
// ------------------------------
// 继电器异常:仅在 readingMode != '2' 时检查
if (device.readingMode !== '2') {
if (device.relayStatus != null && device.relayStatus === 0) return true;
}
// 脉冲异常:仅在 readingMode != '1' 时检查
if (device.readingMode !== '1') {
if (device.pulseStatus != null && device.pulseStatus === 0) return true;
}
// ------------------------------
// 3. 根据 hasUpload 条件检查
// ------------------------------
// 网络状态 & SIM卡状态:仅在 hasUpload === '1' 时检查
if (device.hasUpload === '1') {
if (device.networkStatus != null && device.networkStatus === 0) return true;
if (device.simCardStatus != null && device.simCardStatus === 0) return true;
if (device.iotStatus != null && device.iotStatus === 0) return true;
}
return false;
},
getAllBindingData(trayId) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment