diff --git a/das/src/main/java/com/das/modules/node/command/HeartbeatCommand.java b/das/src/main/java/com/das/modules/node/command/HeartbeatCommand.java index b2ecf27b..4e1a3509 100644 --- a/das/src/main/java/com/das/modules/node/command/HeartbeatCommand.java +++ b/das/src/main/java/com/das/modules/node/command/HeartbeatCommand.java @@ -49,7 +49,7 @@ public class HeartbeatCommand implements BaseCommand{ JsonNode realNode = linkNode.get("real"); if (realNode != null){ boolean real = realNode.asBoolean(); - String key = String.format("link:%s:modbus", linkId); + String key = String.format("link:%s:real", linkId); ops.set(key, real, HEARTBEAT_TTL, TimeUnit.SECONDS); } JsonNode ftpNode = linkNode.get("ftp"); diff --git a/ui/dasadmin/src/views/backend/WindBlower/index.vue b/ui/dasadmin/src/views/backend/WindBlower/index.vue index 0aafa8c0..fd7af3ab 100644 --- a/ui/dasadmin/src/views/backend/WindBlower/index.vue +++ b/ui/dasadmin/src/views/backend/WindBlower/index.vue @@ -1258,14 +1258,16 @@ const getThisDayChartDataForMinute = () => { const len = val.iWindDirection.length const result: number[] = new Array(16).fill(0) val.iWindDirection.forEach((item: number) => { - item = item < 0 ? 360 + item : item > 360 ? 360 : item - if (item === 0) { - result[0] += 1 - } else { - const divisor = Math.ceil(item / 22.5) - 1 - result[divisor] += 1 + if (typeof item === 'number') { + item = item < 0 ? 360 + item : item > 360 ? 360 : item + if (item === 0) { + result[0] += 1 + } else { + const divisor = Math.ceil(item / 22.5) - 1 + result[divisor] += 1 + } } - }) + }) const percent = result.map((item) => Math.floor((item / len) * 100000) / 1000) frequencyData.value = percent resolve(true) diff --git a/ui/dasadmin/src/views/backend/logConfiguration/index.vue b/ui/dasadmin/src/views/backend/logConfiguration/index.vue index e912d57c..b51eaa61 100644 --- a/ui/dasadmin/src/views/backend/logConfiguration/index.vue +++ b/ui/dasadmin/src/views/backend/logConfiguration/index.vue @@ -6,7 +6,7 @@