Browse Source

fix:调试模式新增指令

master
guoapeng 3 months ago
parent
commit
3818f694a2
  1. 25
      src/layouts/default.vue
  2. 15
      src/stores/systemStore.ts
  3. 3
      src/types/debug.d.ts
  4. 1
      src/types/system.d.ts
  5. 41
      src/views/container/liquidItem.vue
  6. 201
      src/views/debug/index.vue
  7. 54
      src/views/home/index.vue

25
src/layouts/default.vue

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import logoutIcon from 'assets/images/logout.svg'
import Check from 'components/check/index.vue' import Check from 'components/check/index.vue'
import Exit from 'components/exit/index.vue'
import Stop from 'components/home/Stop/index.vue' import Stop from 'components/home/Stop/index.vue'
import { useActivateDebug } from 'hooks/useActivateDebug' import { useActivateDebug } from 'hooks/useActivateDebug'
import { isClose } from 'libs/socket' import { isClose } from 'libs/socket'
@ -16,7 +16,7 @@ const systemStore = useSystemStore()
const router = useRouter() const router = useRouter()
const currentTime = ref(formatDateTime()) const currentTime = ref(formatDateTime())
const exitModalRef = ref<Exit.ExitModal | null>(null)
const timeInterval = setInterval(() => { const timeInterval = setInterval(() => {
currentTime.value = formatDateTime() currentTime.value = formatDateTime()
}, 1000) }, 1000)
@ -31,12 +31,6 @@ onUnmounted(() => {
clearInterval(timeInterval) clearInterval(timeInterval)
}) })
const onExitHandle = () => {
if (exitModalRef.value) {
exitModalRef.value.openModal()
}
}
const isCheck = ref(false) const isCheck = ref(false)
</script> </script>
@ -57,12 +51,22 @@ const isCheck = ref(false)
{{ currentTime }} {{ currentTime }}
</div> </div>
<div class="user"> <div class="user">
<div class="user-dropdown">
<div class="user-dropdown-item" @click="onExitHandle">
<el-dropdown class="user-dropdown" trigger="click">
<div class="user-dropdown-item">
<img src="../assets/images/user.svg" alt=""> <img src="../assets/images/user.svg" alt="">
<span>{{ systemStore.systemUser.username }}</span> <span>{{ systemStore.systemUser.username }}</span>
</div> </div>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="systemStore.logout()">
<div class="logout">
<img :src="logoutIcon" alt="">
<span>退出登录</span>
</div> </div>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</div> </div>
</div> </div>
</el-header> </el-header>
@ -105,7 +109,6 @@ const isCheck = ref(false)
</el-row> </el-row>
</el-footer> </el-footer>
<FtStream :visible="systemStore.streamVisible" /> <FtStream :visible="systemStore.streamVisible" />
<Exit ref="exitModalRef" />
<Check v-if="isCheck" @close="isCheck = false" /> <Check v-if="isCheck" @close="isCheck = false" />
<Stop v-if="systemStore.systemStatus.emergencyStop" /> <Stop v-if="systemStore.systemStatus.emergencyStop" />
</el-container> </el-container>

15
src/stores/systemStore.ts

@ -1,3 +1,6 @@
import router from '@/router'
import { logout } from 'apis/login'
import { delToken } from 'libs/token'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
export const useSystemStore = defineStore('system', { export const useSystemStore = defineStore('system', {
@ -81,6 +84,7 @@ export const useSystemStore = defineStore('system', {
trayUp: 1, trayUp: 1,
trayStatus: 1, trayStatus: 1,
heating: false, heating: false,
fanOpen: false,
capExist: false, capExist: false,
temperature: 0, temperature: 0,
targetTemperature: 0, targetTemperature: 0,
@ -90,6 +94,7 @@ export const useSystemStore = defineStore('system', {
trayUp: 1, trayUp: 1,
trayStatus: 1, trayStatus: 1,
heating: false, heating: false,
fanOpen: false,
capExist: false, capExist: false,
temperature: 100, temperature: 100,
targetTemperature: 0, targetTemperature: 0,
@ -99,6 +104,7 @@ export const useSystemStore = defineStore('system', {
trayUp: 0, trayUp: 0,
trayStatus: 0, trayStatus: 0,
heating: true, heating: true,
fanOpen: true,
capExist: false, capExist: false,
temperature: 130, temperature: 130,
targetTemperature: 0, targetTemperature: 0,
@ -108,6 +114,7 @@ export const useSystemStore = defineStore('system', {
trayUp: 1, trayUp: 1,
trayStatus: 1, trayStatus: 1,
heating: false, heating: false,
fanOpen: false,
capExist: false, capExist: false,
temperature: 0, temperature: 0,
targetTemperature: 0, targetTemperature: 0,
@ -117,6 +124,7 @@ export const useSystemStore = defineStore('system', {
trayUp: 1, trayUp: 1,
trayStatus: 1, trayStatus: 1,
heating: false, heating: false,
fanOpen: false,
capExist: false, capExist: false,
temperature: 0, temperature: 0,
targetTemperature: 0, targetTemperature: 0,
@ -126,6 +134,7 @@ export const useSystemStore = defineStore('system', {
trayUp: 1, trayUp: 1,
trayStatus: 0, trayStatus: 0,
heating: false, heating: false,
fanOpen: false,
capExist: false, capExist: false,
temperature: 0, temperature: 0,
targetTemperature: 0, targetTemperature: 0,
@ -218,6 +227,12 @@ export const useSystemStore = defineStore('system', {
pushSystemList(text: any) { pushSystemList(text: any) {
this.systemList.push(text) this.systemList.push(text)
}, },
logout() {
logout().then(() => {
delToken()
router.push('/login').then(() => {})
})
},
}, },
persist: false, persist: false,
}) })

3
src/types/debug.d.ts

@ -53,6 +53,7 @@ declare namespace Debug {
xDimVelocity: number | undefined xDimVelocity: number | undefined
times: number | undefined times: number | undefined
direction: 'forward' | 'backward' direction: 'forward' | 'backward'
position: number | undefined
} }
interface YMotorData { interface YMotorData {
@ -60,6 +61,7 @@ declare namespace Debug {
yDimVelocity: number | undefined yDimVelocity: number | undefined
times: number | undefined times: number | undefined
direction: 'forward' | 'backward' direction: 'forward' | 'backward'
position: number | undefined
} }
interface ZMotorData { interface ZMotorData {
@ -67,6 +69,7 @@ declare namespace Debug {
zDimVelocity: number | undefined zDimVelocity: number | undefined
times: number | undefined times: number | undefined
direction: 'forward' | 'backward' direction: 'forward' | 'backward'
position: number | undefined
} }
interface JawData { interface JawData {

1
src/types/system.d.ts

@ -53,6 +53,7 @@ declare namespace System {
trayUp: 0 | 1 trayUp: 0 | 1
trayStatus: 0 | 1 trayStatus: 0 | 1
heating: boolean heating: boolean
fanOpen: boolean
capExist: boolean capExist: boolean
temperature: number temperature: number
targetTemperature: number targetTemperature: number

41
src/views/container/liquidItem.vue

@ -117,14 +117,14 @@ const onSubmitSolution = () => {
<div class="footer-content"> <div class="footer-content">
<span>{{ solutionInfo.capacityTotal }}ml</span> <span>{{ solutionInfo.capacityTotal }}ml</span>
</div> </div>
<div class="footer-edit">
<span>预充</span>
<el-input v-model.number="solutionInfo.filled" type="number" size="small" @blur="onInputBlur">
<template #append>
ml
</template>
</el-input>
</div>
<!-- <div class="footer-edit"> -->
<!-- <span>预充</span> -->
<!-- <el-input v-model.number="solutionInfo.filled" type="number" size="small" @blur="onInputBlur"> -->
<!-- <template #append> -->
<!-- ml -->
<!-- </template> -->
<!-- </el-input> -->
<!-- </div> -->
<div class="footer-edit"> <div class="footer-edit">
<span>剩余</span> <span>剩余</span>
<el-input v-model.number="solutionInfo.capacityUsed" type="number" size="small" @blur="onInputBlur"> <el-input v-model.number="solutionInfo.capacityUsed" type="number" size="small" @blur="onInputBlur">
@ -163,10 +163,6 @@ const onSubmitSolution = () => {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.liquied-main {
position: relative;
margin-top: 1.5rem;
}
.content{ .content{
position: relative; position: relative;
display: flex; display: flex;
@ -179,31 +175,19 @@ const onSubmitSolution = () => {
filter:hue-rotate(217deg) saturate(36); filter:hue-rotate(217deg) saturate(36);
position: absolute; position: absolute;
} }
.liquied-ml{
height: 38%;
position: absolute;
width: 52%;
margin-left: 24%;
margin-top: 20px;
background: #00ff9a;
border-radius: 10px;
bottom: 18px;
}
.header { .header {
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
background: rgba(25, 137, 250, 0.1216);;
background: rgba(25, 137, 250, 0.1216);
justify-content: center; justify-content: center;
border-radius: 1rem 1rem 0 0;
height:2.5rem;
border-radius: 10px 10px 0 0;
padding:10px;
width: 100%;
} }
.content-img{ .content-img{
height: 100px; height: 100px;
margin: 10px; margin: 10px;
} }
.footer {
}
.footer-content{ .footer-content{
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -211,6 +195,7 @@ const onSubmitSolution = () => {
.footer-edit { .footer-edit {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center;
padding: 10px 0; padding: 10px 0;
.el-input { .el-input {
margin-left: 10px; margin-left: 10px;

201
src/views/debug/index.vue

@ -395,6 +395,18 @@ const debug_transportation_arm_stop = async (motor: 'x' | 'y' | 'z') => {
await debugStore.sendControl(params) await debugStore.sendControl(params)
} }
const debug_gantry_position = async (motor: 'x' | 'y' | 'z') => {
currentCommandId = Date.now().toString()
const params = {
commandId: currentCommandId,
command: `debug_gantry_${motor}_position`,
params: {
position: debugStore.formData.transferModule[`${motor}MotorData`].position,
},
}
await debugStore.sendControl(params)
}
const debug_holding_jaw_open = async () => { const debug_holding_jaw_open = async () => {
currentCommandId = Date.now().toString() currentCommandId = Date.now().toString()
const params = { const params = {
@ -483,6 +495,30 @@ const debug_move_tray_to_heat_area = async () => {
await debugStore.sendControl(params) await debugStore.sendControl(params)
} }
const debug_gantry_to_heat_area_cap = async () => {
currentCommandId = Date.now().toString()
const params = {
commandId: currentCommandId,
command: 'debug_gantry_to_heat_area_cap',
params: {
heatId: debugStore.formData.heatArea.index,
},
}
await debugStore.sendControl(params)
}
const debug_gantry_to_heat_area_tray = async () => {
currentCommandId = Date.now().toString()
const params = {
commandId: currentCommandId,
command: 'debug_gantry_to_heat_area_tray',
params: {
heatId: debugStore.formData.heatArea.index,
},
}
await debugStore.sendControl(params)
}
const debug_cap_in_heat_area = async () => { const debug_cap_in_heat_area = async () => {
currentCommandId = Date.now().toString() currentCommandId = Date.now().toString()
const params = { const params = {
@ -634,17 +670,19 @@ const debug_stop_all_motor = async () => {
</ft-button> </ft-button>
</el-form-item> </el-form-item>
<el-form-item label="指定位置"> <el-form-item label="指定位置">
<el-input v-model.number="debugStore.formData.transferModule.xMotorData.times" type="number" placeholder="请输入次数">
<el-input v-model.number="debugStore.formData.transferModule.xMotorData.position" type="number" placeholder="请输入位置">
<template #append> <template #append>
mm mm
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<ft-button type="primary">
<ft-button size="small" type="primary" :click-handle="() => debug_gantry_position('x')">
移动 移动
</ft-button> </ft-button>
<ft-button>停止</ft-button>
<ft-button size="small" :click-handle="() => debug_transportation_arm_stop('x')">
停止
</ft-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -687,17 +725,19 @@ const debug_stop_all_motor = async () => {
</ft-button> </ft-button>
</el-form-item> </el-form-item>
<el-form-item label="指定位置"> <el-form-item label="指定位置">
<el-input v-model.number="debugStore.formData.transferModule.xMotorData.times" type="number" placeholder="请输入次数">
<el-input v-model.number="debugStore.formData.transferModule.xMotorData.position" type="number" placeholder="请输入位置">
<template #append> <template #append>
mm mm
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<ft-button type="primary">
<ft-button size="small" type="primary" :click-handle="() => debug_gantry_position('y')">
移动 移动
</ft-button> </ft-button>
<ft-button>停止</ft-button>
<ft-button size="small" :click-handle="() => debug_transportation_arm_stop('y')">
停止
</ft-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -740,17 +780,19 @@ const debug_stop_all_motor = async () => {
</ft-button> </ft-button>
</el-form-item> </el-form-item>
<el-form-item label="指定位置"> <el-form-item label="指定位置">
<el-input v-model.number="debugStore.formData.transferModule.xMotorData.times" type="number" placeholder="请输入次数">
<el-input v-model.number="debugStore.formData.transferModule.xMotorData.position" type="number" placeholder="请输入位置">
<template #append> <template #append>
mm mm
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<ft-button type="primary">
<ft-button size="small" type="primary" :click-handle="() => debug_gantry_position('z')">
移动 移动
</ft-button> </ft-button>
<ft-button>停止</ft-button>
<ft-button size="small" :click-handle="() => debug_transportation_arm_stop('z')">
停止
</ft-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -786,10 +828,10 @@ const debug_stop_all_motor = async () => {
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<ft-button type="primary" :click-handle="debug_holding_jaw_open">
<ft-button size="small" type="primary" :click-handle="debug_holding_jaw_open">
执行 执行
</ft-button> </ft-button>
<ft-button :click-handle="debug_holding_jaw_pause">
<ft-button size="small" :click-handle="debug_holding_jaw_pause">
停止 停止
</ft-button> </ft-button>
</el-form-item> </el-form-item>
@ -837,13 +879,13 @@ const debug_stop_all_motor = async () => {
</el-form-item> </el-form-item>
</el-form> </el-form>
<ft-button type="primary" :click-handle="debug_liquid_arm_rotation">
<ft-button size="small" type="primary" :click-handle="debug_liquid_arm_rotation">
开始 开始
</ft-button> </ft-button>
<ft-button :click-handle="debug_liquid_arm_stop">
<ft-button size="small" :click-handle="debug_liquid_arm_stop">
停止 停止
</ft-button> </ft-button>
<ft-button type="primary" :click-handle="debug_liquid_arm_reset">
<ft-button size="small" type="primary" :click-handle="debug_liquid_arm_reset">
回原点 回原点
</ft-button> </ft-button>
</div> </div>
@ -889,10 +931,10 @@ const debug_stop_all_motor = async () => {
<!-- </ft-button> --> <!-- </ft-button> -->
<!-- </el-form-item> --> <!-- </el-form-item> -->
<el-form-item> <el-form-item>
<ft-button type="primary" :click-handle="debug_liquid_pump_start">
<ft-button size="small" type="primary" :click-handle="debug_liquid_pump_start">
启动 启动
</ft-button> </ft-button>
<ft-button :click-handle="debug_liquid_pump_stop">
<ft-button size="small" :click-handle="debug_liquid_pump_stop">
停止 停止
</ft-button> </ft-button>
</el-form-item> </el-form-item>
@ -909,13 +951,13 @@ const debug_stop_all_motor = async () => {
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<ft-button type="primary" :click-handle="debug_shaker_start">
<ft-button size="small" type="primary" :click-handle="debug_shaker_start">
开始 开始
</ft-button> </ft-button>
<ft-button :click-handle="debug_shaker_stop">
<ft-button size="small" :click-handle="debug_shaker_stop">
停止 停止
</ft-button> </ft-button>
<ft-button type="primary" :click-handle="debug_shaker_reset">
<ft-button size="small" type="primary" :click-handle="debug_shaker_reset">
回原点 回原点
</ft-button> </ft-button>
</div> </div>
@ -968,15 +1010,61 @@ const debug_stop_all_motor = async () => {
</div> </div>
</template> </template>
<div class="card-box"> <div class="card-box">
<ft-button type="primary" :click-handle="debug_door_open">
<ft-button size="small" type="primary" :click-handle="debug_door_open">
开门 开门
</ft-button> </ft-button>
<ft-button type="primary" :click-handle="debug_door_close">
<ft-button size="small" type="primary" :click-handle="debug_door_close">
关门 关门
</ft-button> </ft-button>
<ft-button :click-handle="debug_door_stop">
<ft-button size="small" :click-handle="debug_door_stop">
停止
</ft-button>
</div>
</el-card>
<el-card>
<template #header>
<div class="card-header">
<span>拍子存放模组</span>
</div>
</template>
<div class="card-box">
<el-form>
<el-form-item label="速度">
<el-input v-model.number="debugStore.formData.lidData.velocity" type="number" placeholder="请输入速度">
<template #append>
rpm/min
</template>
</el-input>
</el-form-item>
<el-form-item label="距离">
<el-input v-model.number="debugStore.formData.lidData.distance" type="number" placeholder="请输入距离">
<template #append>
mm
</template>
</el-input>
</el-form-item>
<el-form-item>
<ft-button type="primary" size="small" :click-handle="debug_cover_elevator_lift_up">
抬升
</ft-button>
<ft-button type="primary" size="small" :click-handle="debug_cover_elevator_lift_down">
下降
</ft-button>
<ft-button size="small" :click-handle="debug_cover_elevator_stop">
停止 停止
</ft-button> </ft-button>
<ft-button type="primary" size="small" :click-handle="debug_cover_elevator_reset">
回原点
</ft-button>
<ft-button type="primary" :click-handle="debug_cap_up_one">
提升一个拍子高度
</ft-button>
<ft-button type="primary" :click-handle="debug_cap_down_one">
下降一个拍子高度
</ft-button>
</el-form-item>
</el-form>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
@ -1005,10 +1093,15 @@ const debug_stop_all_motor = async () => {
<ft-button size="small" type="primary" :click-handle="debug_move_tray_to_heat_area"> <ft-button size="small" type="primary" :click-handle="debug_move_tray_to_heat_area">
托盘移至加热区 托盘移至加热区
</ft-button> </ft-button>
<ft-button size="small" type="primary" :click-handle="debug_cap_out_heat_area"> <ft-button size="small" type="primary" :click-handle="debug_cap_out_heat_area">
拆卸拍子 拆卸拍子
</ft-button> </ft-button>
<ft-button size="small" type="primary" :click-handle="debug_gantry_to_heat_area_cap">
机械臂移至拍子位
</ft-button>
<ft-button size="small" type="primary" :click-handle="debug_gantry_to_heat_area_tray">
机械臂移至托盘位
</ft-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -1063,10 +1156,10 @@ const debug_stop_all_motor = async () => {
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<ft-button type="primary" :click-handle="debug_heater_start">
<ft-button size="small" type="primary" :click-handle="debug_heater_start">
开始加热 开始加热
</ft-button> </ft-button>
<ft-button :click-handle="debug_heater_stop">
<ft-button size="small" :click-handle="debug_heater_stop">
停止加热 停止加热
</ft-button> </ft-button>
</el-form-item> </el-form-item>
@ -1091,18 +1184,18 @@ const debug_stop_all_motor = async () => {
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<ft-button type="primary" :click-handle="debug_cold_trap_start_refrigeration">
<ft-button size="small" type="primary" :click-handle="debug_cold_trap_start_refrigeration">
启动制冷 启动制冷
</ft-button> </ft-button>
<ft-button :click-handle="debug_cold_trap_stop_refrigeration">
<ft-button size="small" :click-handle="debug_cold_trap_stop_refrigeration">
停止制冷 停止制冷
</ft-button> </ft-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<ft-button type="primary" :click-handle="debug_cold_trap_start_recycle">
<ft-button size="small" type="primary" :click-handle="debug_cold_trap_start_recycle">
启动循环 启动循环
</ft-button> </ft-button>
<ft-button :click-handle="debug_cold_trap_stop_recycle">
<ft-button size="small" :click-handle="debug_cold_trap_stop_recycle">
停止循环 停止循环
</ft-button> </ft-button>
</el-form-item> </el-form-item>
@ -1119,60 +1212,14 @@ const debug_stop_all_motor = async () => {
<!-- </div> --> <!-- </div> -->
<el-divider>风扇</el-divider> <el-divider>风扇</el-divider>
<div class="card-box"> <div class="card-box">
<ft-button type="primary" :click-handle="debug_fan_start">
<ft-button size="small" type="primary" :click-handle="debug_fan_start">
打开风扇 打开风扇
</ft-button> </ft-button>
<ft-button :click-handle="debug_fan_stop">
<ft-button size="small" :click-handle="debug_fan_stop">
关闭风扇 关闭风扇
</ft-button> </ft-button>
</div> </div>
</el-card> </el-card>
<el-card>
<template #header>
<div class="card-header">
<span>拍子存放模组</span>
</div>
</template>
<div class="card-box">
<el-form>
<el-form-item label="速度">
<el-input v-model.number="debugStore.formData.lidData.velocity" type="number" placeholder="请输入速度">
<template #append>
rpm/min
</template>
</el-input>
</el-form-item>
<el-form-item label="距离">
<el-input v-model.number="debugStore.formData.lidData.distance" type="number" placeholder="请输入距离">
<template #append>
mm
</template>
</el-input>
</el-form-item>
<el-form-item>
<ft-button type="primary" size="small" :click-handle="debug_cover_elevator_lift_up">
抬升
</ft-button>
<ft-button type="primary" size="small" :click-handle="debug_cover_elevator_lift_down">
下降
</ft-button>
<ft-button size="small" :click-handle="debug_cover_elevator_stop">
停止
</ft-button>
<ft-button type="primary" size="small" :click-handle="debug_cover_elevator_reset">
回原点
</ft-button>
<ft-button type="primary" :click-handle="debug_cap_up_one">
提升一个拍子高度
</ft-button>
<ft-button type="primary" :click-handle="debug_cap_down_one">
下降一个拍子高度
</ft-button>
</el-form-item>
</el-form>
</div>
</el-card>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>

54
src/views/home/index.vue

@ -260,6 +260,48 @@ const heat_stop = async () => {
await homeStore.sendControl(params) await homeStore.sendControl(params)
} }
const fan_start = async () => {
const selectedHeatAreas = homeStore.heatAreaList.filter(item => item.selected)
if (!selectedHeatAreas.length || selectedHeatAreas.length > 1) {
FtMessage.warning('请选择一个加热区')
return
}
if (systemStore.systemStatus.heatModule.find(item => item.moduleCode === selectedHeatAreas[0].value)?.fanOpen) {
FtMessage.warning('已经在散热了')
return
}
currentCommandId = Date.now().toString()
const params = {
commandId: currentCommandId,
command: 'fan_start',
params: {
heatId: selectedHeatAreas[0].value,
},
}
await homeStore.sendControl(params)
}
const fan_stop = async () => {
const selectedHeatAreas = homeStore.heatAreaList.filter(item => item.selected)
if (!selectedHeatAreas.length || selectedHeatAreas.length > 1) {
FtMessage.warning('请选择一个加热区')
return
}
if (!systemStore.systemStatus.heatModule.find(item => item.moduleCode === selectedHeatAreas[0].value)?.fanOpen) {
FtMessage.warning('加热区未散热')
return
}
currentCommandId = Date.now().toString()
const params = {
commandId: currentCommandId,
command: 'fan_stop',
params: {
heatId: selectedHeatAreas[0].value,
},
}
await homeStore.sendControl(params)
}
const tray_up = async () => { const tray_up = async () => {
const selectedHeatAreas = homeStore.heatAreaList.filter(item => item.selected) const selectedHeatAreas = homeStore.heatAreaList.filter(item => item.selected)
if (!selectedHeatAreas.length || selectedHeatAreas.length > 1) { if (!selectedHeatAreas.length || selectedHeatAreas.length > 1) {
@ -447,6 +489,18 @@ const take_photo = async () => {
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="12">
<ft-button :click-handle="fan_start">
开始散热
</ft-button>
</el-col>
<el-col :span="12">
<ft-button :click-handle="fan_stop">
停止散热
</ft-button>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<ft-button :click-handle="tray_up"> <ft-button :click-handle="tray_up">
抬起托盘 抬起托盘
</ft-button> </ft-button>

Loading…
Cancel
Save