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) => {