From bc96f76d7f842b229df4a7722a256b3dd90ee796 Mon Sep 17 00:00:00 2001 From: "DESKTOP-FUDKNA8\\znjsz" Date: Tue, 23 Jan 2024 10:12:39 +0800 Subject: [PATCH] update --- src/components/RealtimeTable.vue | 31 ++++++++++++++++++++++--------- src/pages/3D.vue | 15 +++++++-------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/src/components/RealtimeTable.vue b/src/components/RealtimeTable.vue index 2dd9c91..79acdff 100644 --- a/src/components/RealtimeTable.vue +++ b/src/components/RealtimeTable.vue @@ -3,8 +3,26 @@ import { ref } from "vue"; import { useWsStore } from "../store"; -const listData = ref([]); const store = useWsStore(); +const listData = ref((store.data2.lineDetailData || Array(3).fill({})).map( + (item, index) => ({ + productLine: item.productLine || "---", + mbt: item.edgingInput || "---", + mbb: item.edgingOutput || "---", + dkt: item.drillingInput || "---", + dkb: item.drillingOutput || "---", + dmt: item.coatingInput || "---", + dmb: item.coatingOutput || "---", + syt: item.silkInput || "---", + syb: item.silkOutput || "---", + ght: item.solidificationInput || "---", + ghb: item.solidificationOutput || "---", + gh1: item.temperingInput || "---", + gh2: item.temperingOutput || "---", + bzt: item.finalInput || "---", + bzb: item.finalOutput || "---", + }) +)); store.$subscribe((mutation, state) => { listData.value = (state.data2.lineDetailData || Array(3).fill({})).map( (item, index) => ({ @@ -30,13 +48,8 @@ store.$subscribe((mutation, state) => {