|
|
@ -1,6 +1,5 @@ |
|
|
|
<script lang="ts" setup> |
|
|
|
import { socket } from 'libs/socket' |
|
|
|
import { sendControl } from 'libs/utils' |
|
|
|
import { useDebugStore } from 'stores/debugStore' |
|
|
|
import { useSystemStore } from 'stores/systemStore' |
|
|
|
import { onMounted, onUnmounted } from 'vue' |
|
|
@ -23,301 +22,332 @@ const receiveMessage = (data: Socket.NotificationData) => { |
|
|
|
|
|
|
|
const pallet_elevator_lift_up = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_pallet_elevator_lift_up', |
|
|
|
params: { |
|
|
|
index: debugStore.formData.heatArea.index, |
|
|
|
...debugStore.formData.heatArea.heatMotorData, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const pallet_elevator_lift_down = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_pallet_elevator_lift_down', |
|
|
|
params: { |
|
|
|
index: debugStore.formData.heatArea.index, |
|
|
|
...debugStore.formData.heatArea.heatMotorData, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const pallet_elevator_stop = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_pallet_elevator_stop', |
|
|
|
params: { |
|
|
|
index: debugStore.formData.heatArea.index, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const heater_start = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_heater_start', |
|
|
|
params: { |
|
|
|
index: debugStore.formData.heatArea.index, |
|
|
|
...debugStore.formData.heatArea.heatTemperature, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
const heater_stop = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_heater_stop', |
|
|
|
params: { |
|
|
|
index: debugStore.formData.heatArea.index, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const debug_heater_start_heat_maintaining = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_heater_start_heat_maintaining', |
|
|
|
params: { |
|
|
|
index: debugStore.formData.heatArea.index, |
|
|
|
...debugStore.formData.heatArea.heatTemperature, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const debug_heater_stop_heat_maintaining = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_heater_stop_heat_maintaining', |
|
|
|
params: { |
|
|
|
index: debugStore.formData.heatArea.index, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const debug_fan_start = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_fan_start', |
|
|
|
params: { |
|
|
|
index: debugStore.formData.heatArea.index, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const debug_fan_stop = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_fan_stop', |
|
|
|
params: { |
|
|
|
index: debugStore.formData.heatArea.index, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const debug_cover_elvator_lift_up = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_cover_elvator_lift_up', |
|
|
|
params: { |
|
|
|
...debugStore.formData.lidData, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const debug_cover_elvator_lift_down = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_cover_elvator_lift_down', |
|
|
|
params: { |
|
|
|
...debugStore.formData.lidData, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const debug_cover_elvator_reset = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_cover_elvator_reset', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const debug_cover_elvator_stop = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_cover_elvator_stop', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const liquid_arm_reset = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_liquid_arm_reset', |
|
|
|
params: { |
|
|
|
target: ['largeArm', 'smallArm'], |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const liquid_arm_rotation = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_liquid_arm_rotation', |
|
|
|
params: { |
|
|
|
...debugStore.formData.liquidArmData, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const liquid_arm_stop = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_liquid_arm_stop', |
|
|
|
params: { |
|
|
|
target: ['largeArm', 'smallArm'], |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const liquid_pump_pre_filling = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_liquid_pump_pre_filling', |
|
|
|
params: { |
|
|
|
index: debugStore.formData.liquidPumpData.index, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const liquid_pump_pre_evacuation = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_liquid_pump_pre_evacuation', |
|
|
|
params: { |
|
|
|
index: debugStore.formData.liquidPumpData.index, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const liquid_pump_start = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_liquid_pump_start', |
|
|
|
params: { |
|
|
|
...debugStore.formData.liquidPumpData, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const liquid_pump_stop = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_liquid_pump_stop', |
|
|
|
params: { |
|
|
|
index: debugStore.formData.liquidPumpData.index, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const shaker_start = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_shaker_start', |
|
|
|
params: { |
|
|
|
...debugStore.formData.shakeSpeed, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const shaker_stop = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_shaker_stop', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const debug_transportation_arm_reset = async (motor: 'x' | 'y' | 'z') => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_transportation_arm_reset', |
|
|
|
params: { |
|
|
|
dim: [motor], |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const debug_transportation_arm_move = async (motor: 'x' | 'y' | 'z') => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_transportation_arm_move', |
|
|
|
params: { |
|
|
|
...debugStore.formData.transferModule[`${motor}MotorData`], |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const debug_transportation_arm_stop = async (motor: 'x' | 'y' | 'z') => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_transportation_arm_stop', |
|
|
|
params: { |
|
|
|
dim: [motor], |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const debug_holding_jaw_open = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_holding_jaw_open', |
|
|
|
params: { |
|
|
|
...debugStore.formData.transferModule.JawData, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const debug_holding_jaw_close = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_holding_jaw_close', |
|
|
|
params: { |
|
|
|
...debugStore.formData.transferModule.JawData, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const debug_holding_jaw_pause = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_holding_jaw_pause', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const door_open = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_door_open', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const door_close = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_door_close', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const door_stop = async () => { |
|
|
|
const params = { |
|
|
|
commandId: Date.now().toString(), |
|
|
|
command: 'debug_door_stop', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
await debugStore.sendControl(params) |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|