Browse Source

fix:1

feature/three
guoapeng 3 months ago
parent
commit
bf9bfd76d4
  1. 21
      src/components/check/index.vue
  2. 1
      src/libs/utils.ts

21
src/components/check/index.vue

@ -40,6 +40,11 @@ const onStartSelfTest = () => {
} }
} }
const statusMap: Record<string, Record<string, string>> = { const statusMap: Record<string, Record<string, string>> = {
doorOrigin: {
name: '门',
value: '',
type: 'door',
},
gantryXOrigin: { gantryXOrigin: {
name: '机械臂x轴', name: '机械臂x轴',
value: 'x', value: 'x',
@ -161,7 +166,10 @@ const queryContainerList = () => {
} }
const resetOrign = (item: SelfStatus) => { 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) gantry_origin(item.value)
} }
else if (item.type === 'liquid') { 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 // TODO
// const currentPumpId = ref() // const currentPumpId = ref()
// const onPumpChange = (value: string) => { // const onPumpChange = (value: string) => {

1
src/libs/utils.ts

@ -50,6 +50,7 @@ export const cmdNameMap = {
gantry_z_origin: '机械臂z轴回原点', gantry_z_origin: '机械臂z轴回原点',
cap_lifting_origin: '拍子电机回原点', cap_lifting_origin: '拍子电机回原点',
tray_lifting_origin: '加热区托盘电机回原点', tray_lifting_origin: '加热区托盘电机回原点',
door_origin: '门电机回原点',
} }
export const generateColors = (count: number): string[] => { export const generateColors = (count: number): string[] => {

Loading…
Cancel
Save