From bf9bfd76d4d92b0a15e7a744fbd72ef674f618f7 Mon Sep 17 00:00:00 2001 From: guoapeng Date: Fri, 16 May 2025 17:36:35 +0800 Subject: [PATCH] fix:1 --- src/components/check/index.vue | 21 ++++++++++++++++++++- src/libs/utils.ts | 1 + 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/components/check/index.vue b/src/components/check/index.vue index ff8efcc..ca18026 100644 --- a/src/components/check/index.vue +++ b/src/components/check/index.vue @@ -40,6 +40,11 @@ const onStartSelfTest = () => { } } const statusMap: Record> = { + doorOrigin: { + name: '门', + value: '', + type: 'door', + }, gantryXOrigin: { name: '机械臂x轴', value: 'x', @@ -161,7 +166,10 @@ const queryContainerList = () => { } const resetOrign = (item: SelfStatus) => { - if (item.value === 'x' || item.value === 'y' || item.value === 'z') { + if (item.type === 'door') { + door_origin() + } + else if (item.value === 'x' || item.value === 'y' || item.value === 'z') { gantry_origin(item.value) } else if (item.type === 'liquid') { @@ -175,6 +183,17 @@ const resetOrign = (item: SelfStatus) => { } } +const door_origin = async () => { + currentCommandId = Date.now().toString() + + const params = { + commandId: currentCommandId, + command: `door_origin`, + params: {}, + } + await homeStore.sendControl(params) +} + // 先注释 TODO // const currentPumpId = ref() // const onPumpChange = (value: string) => { diff --git a/src/libs/utils.ts b/src/libs/utils.ts index 9fa517f..4f31685 100644 --- a/src/libs/utils.ts +++ b/src/libs/utils.ts @@ -50,6 +50,7 @@ export const cmdNameMap = { gantry_z_origin: '机械臂z轴回原点', cap_lifting_origin: '拍子电机回原点', tray_lifting_origin: '加热区托盘电机回原点', + door_origin: '门电机回原点', } export const generateColors = (count: number): string[] => {