|
@ -8,6 +8,8 @@ const systemStore = useSystemStore() |
|
|
|
|
|
|
|
|
const debugStore = useDebugStore() |
|
|
const debugStore = useDebugStore() |
|
|
|
|
|
|
|
|
|
|
|
let currentCommandId = '' |
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
socket.init(receiveMessage, 'notification') |
|
|
socket.init(receiveMessage, 'notification') |
|
|
}) |
|
|
}) |
|
@ -17,12 +19,13 @@ onUnmounted(() => { |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
const receiveMessage = (data: Socket.NotificationData) => { |
|
|
const receiveMessage = (data: Socket.NotificationData) => { |
|
|
systemStore.pushSystemList(data) |
|
|
|
|
|
|
|
|
data.commandId === currentCommandId && systemStore.pushSystemList(data) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const pallet_elevator_lift_up = async () => { |
|
|
const pallet_elevator_lift_up = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_pallet_elevator_lift_up', |
|
|
command: 'debug_pallet_elevator_lift_up', |
|
|
params: { |
|
|
params: { |
|
|
index: debugStore.formData.heatArea.index, |
|
|
index: debugStore.formData.heatArea.index, |
|
@ -33,8 +36,9 @@ const pallet_elevator_lift_up = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const pallet_elevator_lift_down = async () => { |
|
|
const pallet_elevator_lift_down = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_pallet_elevator_lift_down', |
|
|
command: 'debug_pallet_elevator_lift_down', |
|
|
params: { |
|
|
params: { |
|
|
index: debugStore.formData.heatArea.index, |
|
|
index: debugStore.formData.heatArea.index, |
|
@ -45,8 +49,9 @@ const pallet_elevator_lift_down = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const pallet_elevator_stop = async () => { |
|
|
const pallet_elevator_stop = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_pallet_elevator_stop', |
|
|
command: 'debug_pallet_elevator_stop', |
|
|
params: { |
|
|
params: { |
|
|
index: debugStore.formData.heatArea.index, |
|
|
index: debugStore.formData.heatArea.index, |
|
@ -56,8 +61,9 @@ const pallet_elevator_stop = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const heater_start = async () => { |
|
|
const heater_start = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_heater_start', |
|
|
command: 'debug_heater_start', |
|
|
params: { |
|
|
params: { |
|
|
index: debugStore.formData.heatArea.index, |
|
|
index: debugStore.formData.heatArea.index, |
|
@ -67,8 +73,9 @@ const heater_start = async () => { |
|
|
await debugStore.sendControl(params) |
|
|
await debugStore.sendControl(params) |
|
|
} |
|
|
} |
|
|
const heater_stop = async () => { |
|
|
const heater_stop = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_heater_stop', |
|
|
command: 'debug_heater_stop', |
|
|
params: { |
|
|
params: { |
|
|
index: debugStore.formData.heatArea.index, |
|
|
index: debugStore.formData.heatArea.index, |
|
@ -78,8 +85,9 @@ const heater_stop = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const debug_heater_start_heat_maintaining = async () => { |
|
|
const debug_heater_start_heat_maintaining = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_heater_start_heat_maintaining', |
|
|
command: 'debug_heater_start_heat_maintaining', |
|
|
params: { |
|
|
params: { |
|
|
index: debugStore.formData.heatArea.index, |
|
|
index: debugStore.formData.heatArea.index, |
|
@ -90,8 +98,9 @@ const debug_heater_start_heat_maintaining = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const debug_heater_stop_heat_maintaining = async () => { |
|
|
const debug_heater_stop_heat_maintaining = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_heater_stop_heat_maintaining', |
|
|
command: 'debug_heater_stop_heat_maintaining', |
|
|
params: { |
|
|
params: { |
|
|
index: debugStore.formData.heatArea.index, |
|
|
index: debugStore.formData.heatArea.index, |
|
@ -101,8 +110,9 @@ const debug_heater_stop_heat_maintaining = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const debug_fan_start = async () => { |
|
|
const debug_fan_start = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_fan_start', |
|
|
command: 'debug_fan_start', |
|
|
params: { |
|
|
params: { |
|
|
index: debugStore.formData.heatArea.index, |
|
|
index: debugStore.formData.heatArea.index, |
|
@ -112,8 +122,9 @@ const debug_fan_start = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const debug_fan_stop = async () => { |
|
|
const debug_fan_stop = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_fan_stop', |
|
|
command: 'debug_fan_stop', |
|
|
params: { |
|
|
params: { |
|
|
index: debugStore.formData.heatArea.index, |
|
|
index: debugStore.formData.heatArea.index, |
|
@ -123,8 +134,9 @@ const debug_fan_stop = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const debug_cover_elevator_lift_up = async () => { |
|
|
const debug_cover_elevator_lift_up = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_cover_elevator_lift_up', |
|
|
command: 'debug_cover_elevator_lift_up', |
|
|
params: { |
|
|
params: { |
|
|
...debugStore.formData.lidData, |
|
|
...debugStore.formData.lidData, |
|
@ -134,8 +146,9 @@ const debug_cover_elevator_lift_up = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const debug_cover_elevator_lift_down = async () => { |
|
|
const debug_cover_elevator_lift_down = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_cover_elevator_lift_down', |
|
|
command: 'debug_cover_elevator_lift_down', |
|
|
params: { |
|
|
params: { |
|
|
...debugStore.formData.lidData, |
|
|
...debugStore.formData.lidData, |
|
@ -145,8 +158,9 @@ const debug_cover_elevator_lift_down = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const debug_cover_elevator_reset = async () => { |
|
|
const debug_cover_elevator_reset = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_cover_elevator_reset', |
|
|
command: 'debug_cover_elevator_reset', |
|
|
params: {}, |
|
|
params: {}, |
|
|
} |
|
|
} |
|
@ -154,8 +168,9 @@ const debug_cover_elevator_reset = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const debug_cover_elevator_stop = async () => { |
|
|
const debug_cover_elevator_stop = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_cover_elevator_stop', |
|
|
command: 'debug_cover_elevator_stop', |
|
|
params: {}, |
|
|
params: {}, |
|
|
} |
|
|
} |
|
@ -163,8 +178,9 @@ const debug_cover_elevator_stop = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const liquid_arm_reset = async () => { |
|
|
const liquid_arm_reset = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_liquid_arm_reset', |
|
|
command: 'debug_liquid_arm_reset', |
|
|
params: { |
|
|
params: { |
|
|
target: ['largeArm', 'smallArm'], |
|
|
target: ['largeArm', 'smallArm'], |
|
@ -174,8 +190,9 @@ const liquid_arm_reset = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const liquid_arm_rotation = async () => { |
|
|
const liquid_arm_rotation = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_liquid_arm_rotation', |
|
|
command: 'debug_liquid_arm_rotation', |
|
|
params: { |
|
|
params: { |
|
|
...debugStore.formData.liquidArmData, |
|
|
...debugStore.formData.liquidArmData, |
|
@ -185,8 +202,9 @@ const liquid_arm_rotation = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const liquid_arm_stop = async () => { |
|
|
const liquid_arm_stop = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_liquid_arm_stop', |
|
|
command: 'debug_liquid_arm_stop', |
|
|
params: { |
|
|
params: { |
|
|
target: ['largeArm', 'smallArm'], |
|
|
target: ['largeArm', 'smallArm'], |
|
@ -196,8 +214,9 @@ const liquid_arm_stop = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const liquid_pump_pre_filling = async () => { |
|
|
const liquid_pump_pre_filling = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_liquid_pump_pre_filling', |
|
|
command: 'debug_liquid_pump_pre_filling', |
|
|
params: { |
|
|
params: { |
|
|
index: debugStore.formData.liquidPumpData.index, |
|
|
index: debugStore.formData.liquidPumpData.index, |
|
@ -207,8 +226,9 @@ const liquid_pump_pre_filling = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const liquid_pump_pre_evacuation = async () => { |
|
|
const liquid_pump_pre_evacuation = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_liquid_pump_pre_evacuation', |
|
|
command: 'debug_liquid_pump_pre_evacuation', |
|
|
params: { |
|
|
params: { |
|
|
index: debugStore.formData.liquidPumpData.index, |
|
|
index: debugStore.formData.liquidPumpData.index, |
|
@ -218,8 +238,9 @@ const liquid_pump_pre_evacuation = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const liquid_pump_start = async () => { |
|
|
const liquid_pump_start = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_liquid_pump_start', |
|
|
command: 'debug_liquid_pump_start', |
|
|
params: { |
|
|
params: { |
|
|
...debugStore.formData.liquidPumpData, |
|
|
...debugStore.formData.liquidPumpData, |
|
@ -229,8 +250,9 @@ const liquid_pump_start = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const liquid_pump_stop = async () => { |
|
|
const liquid_pump_stop = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_liquid_pump_stop', |
|
|
command: 'debug_liquid_pump_stop', |
|
|
params: { |
|
|
params: { |
|
|
index: debugStore.formData.liquidPumpData.index, |
|
|
index: debugStore.formData.liquidPumpData.index, |
|
@ -240,8 +262,9 @@ const liquid_pump_stop = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const shaker_start = async () => { |
|
|
const shaker_start = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_shaker_start', |
|
|
command: 'debug_shaker_start', |
|
|
params: { |
|
|
params: { |
|
|
...debugStore.formData.shakeSpeed, |
|
|
...debugStore.formData.shakeSpeed, |
|
@ -251,8 +274,9 @@ const shaker_start = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const shaker_stop = async () => { |
|
|
const shaker_stop = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_shaker_stop', |
|
|
command: 'debug_shaker_stop', |
|
|
params: {}, |
|
|
params: {}, |
|
|
} |
|
|
} |
|
@ -260,8 +284,9 @@ const shaker_stop = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const debug_transportation_arm_reset = async (motor: 'x' | 'y' | 'z') => { |
|
|
const debug_transportation_arm_reset = async (motor: 'x' | 'y' | 'z') => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_transportation_arm_reset', |
|
|
command: 'debug_transportation_arm_reset', |
|
|
params: { |
|
|
params: { |
|
|
dim: [motor], |
|
|
dim: [motor], |
|
@ -271,8 +296,9 @@ const debug_transportation_arm_reset = async (motor: 'x' | 'y' | 'z') => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const debug_transportation_arm_move = async (motor: 'x' | 'y' | 'z') => { |
|
|
const debug_transportation_arm_move = async (motor: 'x' | 'y' | 'z') => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_transportation_arm_move', |
|
|
command: 'debug_transportation_arm_move', |
|
|
params: { |
|
|
params: { |
|
|
...debugStore.formData.transferModule[`${motor}MotorData`], |
|
|
...debugStore.formData.transferModule[`${motor}MotorData`], |
|
@ -282,8 +308,9 @@ const debug_transportation_arm_move = async (motor: 'x' | 'y' | 'z') => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const debug_transportation_arm_stop = async (motor: 'x' | 'y' | 'z') => { |
|
|
const debug_transportation_arm_stop = async (motor: 'x' | 'y' | 'z') => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_transportation_arm_stop', |
|
|
command: 'debug_transportation_arm_stop', |
|
|
params: { |
|
|
params: { |
|
|
dim: [motor], |
|
|
dim: [motor], |
|
@ -293,8 +320,9 @@ const debug_transportation_arm_stop = async (motor: 'x' | 'y' | 'z') => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const debug_holding_jaw_open = async () => { |
|
|
const debug_holding_jaw_open = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_holding_jaw_open', |
|
|
command: 'debug_holding_jaw_open', |
|
|
params: { |
|
|
params: { |
|
|
...debugStore.formData.transferModule.JawData, |
|
|
...debugStore.formData.transferModule.JawData, |
|
@ -304,8 +332,9 @@ const debug_holding_jaw_open = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const debug_holding_jaw_close = async () => { |
|
|
const debug_holding_jaw_close = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_holding_jaw_close', |
|
|
command: 'debug_holding_jaw_close', |
|
|
params: { |
|
|
params: { |
|
|
...debugStore.formData.transferModule.JawData, |
|
|
...debugStore.formData.transferModule.JawData, |
|
@ -315,8 +344,9 @@ const debug_holding_jaw_close = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const debug_holding_jaw_pause = async () => { |
|
|
const debug_holding_jaw_pause = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_holding_jaw_pause', |
|
|
command: 'debug_holding_jaw_pause', |
|
|
params: {}, |
|
|
params: {}, |
|
|
} |
|
|
} |
|
@ -324,8 +354,9 @@ const debug_holding_jaw_pause = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const door_open = async () => { |
|
|
const door_open = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_door_open', |
|
|
command: 'debug_door_open', |
|
|
params: {}, |
|
|
params: {}, |
|
|
} |
|
|
} |
|
@ -333,8 +364,9 @@ const door_open = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const door_close = async () => { |
|
|
const door_close = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_door_close', |
|
|
command: 'debug_door_close', |
|
|
params: {}, |
|
|
params: {}, |
|
|
} |
|
|
} |
|
@ -342,8 +374,9 @@ const door_close = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const door_stop = async () => { |
|
|
const door_stop = async () => { |
|
|
|
|
|
currentCommandId = Date.now().toString() |
|
|
const params = { |
|
|
const params = { |
|
|
commandId: Date.now().toString(), |
|
|
|
|
|
|
|
|
commandId: currentCommandId, |
|
|
command: 'debug_door_stop', |
|
|
command: 'debug_door_stop', |
|
|
params: {}, |
|
|
params: {}, |
|
|
} |
|
|
} |
|
|