From 99e6271de324aa06fd1039a14599e576bfa30499 Mon Sep 17 00:00:00 2001 From: guoapeng Date: Thu, 5 Jun 2025 20:05:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A6=96=E9=A1=B5=E5=B7=A5=E8=89=BA?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/crafts.ts | 2 +- src/app.vue | 4 +- src/components/home/ExecuteCraft/index.vue | 190 +++++++++++++++++++++++++++++ src/components/home/Tube/index.vue | 4 +- src/types/home.d.ts | 2 +- src/views/home/index.vue | 36 +----- 6 files changed, 199 insertions(+), 39 deletions(-) create mode 100644 src/components/home/ExecuteCraft/index.vue diff --git a/src/apis/crafts.ts b/src/apis/crafts.ts index 55aba1b..984f590 100644 --- a/src/apis/crafts.ts +++ b/src/apis/crafts.ts @@ -16,7 +16,7 @@ export const updateCraft = (params: Craft): Promise => http.put(`/crafts`, export const delCraft = (ids: string): Promise => http.delete(`/crafts/${ids}`) // 开始执行预设 -export const startCraft = (params: { heatId: string }): Promise => http.post(`/crafts/start`, params) +export const startCraft = (params: { heatId?: string, craftId?: number, columns?: number[] }): Promise => http.post(`/crafts/start`, params) export const pauseCraft = (params: { heatId: string }): Promise => http.post(`/crafts/pause`, params) export const resumeCraft = (params: { heatId: string }): Promise => http.post(`/crafts/resume`, params) diff --git a/src/app.vue b/src/app.vue index 9f69a44..1a9b861 100644 --- a/src/app.vue +++ b/src/app.vue @@ -9,13 +9,13 @@ onMounted(async () => { const res = await getStatus() console.log(res) console.log(systemStore.systemStatus) - // systemStore.updateSystemStatus(res) + systemStore.updateSystemStatus(res) startProgress() }) socket.init((data: System.SystemStatus) => { console.log(data) - // systemStore.updateSystemStatus(data) + systemStore.updateSystemStatus(data) }, 'status') const progress = ref(0) diff --git a/src/components/home/ExecuteCraft/index.vue b/src/components/home/ExecuteCraft/index.vue new file mode 100644 index 0000000..33c544c --- /dev/null +++ b/src/components/home/ExecuteCraft/index.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/src/components/home/Tube/index.vue b/src/components/home/Tube/index.vue index e476b1d..a02b551 100644 --- a/src/components/home/Tube/index.vue +++ b/src/components/home/Tube/index.vue @@ -162,10 +162,10 @@ defineExpose({ {{ data.temperature || '--' }} - 降温中 + 降温中 加热中 烘干中 - 退火中 + 退火中