From d0d1879fd5be10137ba76330c67c0c5495c92ec3 Mon Sep 17 00:00:00 2001 From: Matthias Heisig Date: Wed, 19 Nov 2025 07:52:26 +0100 Subject: [PATCH] Fixed PVCard mounted error --- frontend/src/components/BaseComponents/PVCard.vue | 6 ++---- .../src/components/BaseComponents/ProcessValue.vue | 10 +++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/BaseComponents/PVCard.vue b/frontend/src/components/BaseComponents/PVCard.vue index 67a7273..74ea829 100644 --- a/frontend/src/components/BaseComponents/PVCard.vue +++ b/frontend/src/components/BaseComponents/PVCard.vue @@ -42,10 +42,8 @@ return `${this.nodeId}.sUnit` }, }, - methods: { - mounted() { - this.opcuaStore.subscribe([this.valueNodeId, this.unitNodeId]) - } + mounted() { + this.opcuaStore.subscribe([this.valueNodeId, this.unitNodeId]) } } \ No newline at end of file diff --git a/frontend/src/components/BaseComponents/ProcessValue.vue b/frontend/src/components/BaseComponents/ProcessValue.vue index c8f8f1d..c523ab8 100644 --- a/frontend/src/components/BaseComponents/ProcessValue.vue +++ b/frontend/src/components/BaseComponents/ProcessValue.vue @@ -11,14 +11,14 @@ export default { computed: { ...mapStores(useOpcuaStore), formattedString() { - const value = Number(this.opcuaStore.values[this.pvValueNodeId]).toFixed(this.numDecimals) - const unit = this.opcuaStore.values[this.pvUnitNModeId] + const value = Number(this.opcuaStore.values[this.valueNodeId]).toFixed(this.numDecimals) + const unit = this.opcuaStore.values[this.unitNodeId] return `${value} ${unit}` }, - pvValueNodeId() { + valueNodeId() { return `${this.nodeId}.rValue` }, - pvUnitNodeId() { + unitNodeId() { return `${this.nodeId}.sUnit` }, }, @@ -33,7 +33,7 @@ export default { }, }, mounted() { - this.opcuaStore.subscribe([this.pvValueNodeId, this.pvUnitNodeId]) + this.opcuaStore.subscribe([this.valueNodeId, this.unitNodeId]) }, // unmounted() { // console.log("Unsubscribed");