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");