Browse Source

fix: 托盘状态确认

feature/three
guoapeng 3 months ago
parent
commit
075f689751
  1. 2
      src/apis/home.ts
  2. 26
      src/views/home/index.vue

2
src/apis/home.ts

@ -1,3 +1,5 @@
import http from 'libs/http'
export const setTargetTemperature = (params: Home.SetTargetTemperatureParams): Promise<null> => http.post('/heat/target-temperature', params)
export const trayIn = (): Promise<null> => http.post('/tray/in')
export const trayOut = (): Promise<null> => http.post('/tray/out')

26
src/views/home/index.vue

@ -1,10 +1,12 @@
<script setup lang="ts">
import { startCraft } from 'apis/crafts'
import { trayIn, trayOut } from 'apis/home'
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'
import { ElMessageBox } from 'element-plus'
import { FtMessage } from 'libs/message'
import { useHomeStore } from 'stores/homeStore'
import { useSystemStore } from 'stores/systemStore'
@ -69,6 +71,18 @@ const door_open = async () => {
params: { },
}
await homeStore.sendControl(params)
await ElMessageBox.confirm(
'请确认是否取下托盘?',
'提示',
{
confirmButtonText: '确认',
cancelButtonText: '取消',
showClose: false,
closeOnClickModal: false,
type: 'warning',
},
)
await trayOut()
}
const door_close = async () => {
@ -78,6 +92,18 @@ const door_close = async () => {
params: { },
}
await homeStore.sendControl(params)
await ElMessageBox.confirm(
'请确认是否放入托盘?',
'提示',
{
confirmButtonText: '确认',
cancelButtonText: '取消',
showClose: false,
closeOnClickModal: false,
type: 'warning',
},
)
await trayIn()
}
const move_to_heat_area = async () => {

Loading…
Cancel
Save