Browse Source

fix:自检ui;首页按钮状态

master
guoapeng 3 months ago
parent
commit
04ff671fcd
  1. 27
      src/components/check/index.vue
  2. 7
      src/views/home/index.vue

27
src/components/check/index.vue

@ -55,16 +55,16 @@ const statusMap: Record<string, Record<string, string>> = {
value: 'z',
type: 'axis',
},
dualRobotJoint1Origin: {
name: '机械臂01',
value: 'largeArm',
type: 'liquid',
},
dualRobotJoint2Origin: {
name: '机械臂02',
value: 'smallArm',
dualRobotOrigin: {
name: '加液机械臂',
value: '',
type: 'liquid',
},
// dualRobotJoint2Origin: {
// name: '02',
// value: 'smallArm',
// type: 'liquid',
// },
capLiftingOrigin: {
name: '拍子电机升降',
value: '',
@ -165,7 +165,7 @@ const resetOrign = (item: SelfStatus) => {
gantry_origin(item.value)
}
else if (item.type === 'liquid') {
dual_robot_joint_origin(item.value)
dual_robot_origin()
}
else if (item.type === 'heat') {
tray_lifting_origin(item.value)
@ -196,14 +196,12 @@ const gantry_origin = async (motor: 'x' | 'y' | 'z') => {
await homeStore.sendControl(params)
}
const dual_robot_joint_origin = async (arm: string) => {
const dual_robot_origin = async () => {
currentCommandId = Date.now().toString()
const params = {
commandId: currentCommandId,
command: 'dual_robot_joint_origin',
params: {
target: [arm],
},
command: 'dual_robot_origin',
params: {},
}
await homeStore.sendControl(params)
}
@ -311,5 +309,6 @@ const onComplete = () => {
display: grid;
grid-template-columns: 2fr 1fr 1fr;
margin-top: 5px;
height: 30px;
}
</style>

7
src/views/home/index.vue

@ -1,6 +1,5 @@
<script setup lang="ts">
import AddLiquid from 'components/home/AddLiquid/index.vue'
import SelectCraft from 'components/home/SelectCraft/index.vue'
import SetTemperature from 'components/home/SetTemperature/index.vue'
import StartExperiment from 'components/home/StartExperiment/index.vue'
import Tube from 'components/home/Tube/index.vue'
@ -362,12 +361,12 @@ const take_photo = async () => {
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<ft-button :click-handle="move_to_heat_area">
<ft-button :click-handle="move_to_heat_area" :disabled="!systemStore.systemStatus.gantryArm.idle">
移至加热
</ft-button>
</el-col>
<el-col :span="12">
<ft-button :click-handle="move_to_solution_area">
<ft-button :click-handle="move_to_solution_area" :disabled="!systemStore.systemStatus.gantryArm.idle">
移至加液
</ft-button>
</el-col>
@ -402,7 +401,7 @@ const take_photo = async () => {
</el-row>
<StartExperiment v-if="startVisible" @ok="startVisible = false" @cancel="startVisible = false" />
<SelectCraft v-if="selectCraftVisible" @ok="selectCraftVisible = false" @cancel="selectCraftVisible = false" />
<!-- <SelectCraft v-if="selectCraftVisible" @ok="selectCraftVisible = false" @cancel="selectCraftVisible = false" /> -->
<SetTemperature v-if="setTemperatureVisible" :id="currentTemperatureId" @ok="setTemperatureVisible = false" @cancel="setTemperatureVisible = false" />
<AddLiquid v-if="addLiquidVisible" @ok="addLiquidVisible = false" @cancel="addLiquidVisible = false" />
</div>

Loading…
Cancel
Save