sige 1 year ago
parent
commit
014739193e
  1. 23
      src/web/src/pages/main/contents/OperationTubeRackHeating.vue

23
src/web/src/pages/main/contents/OperationTubeRackHeating.vue

@ -31,6 +31,7 @@
<script setup>
import ApiClient from '@/utils/ApiClient';
import { ref } from 'vue';
import { Modal } from 'ant-design-vue';
/** @var {Object} */
const props = defineProps({
activeSlot: Object,
@ -49,11 +50,16 @@ function actionModalShow() {
async function actionHeatingStart() {
enable.value = false;
let client = ApiClient.getClient();
await client.taskAppend('Heating',{
slotIndex : props.activeSlot.index * 1,
temperature : heating.value.temperature * 1,
duration : heating.value.duration * 1
});
try {
await client.taskAppend('Heating',{
slotIndex : props.activeSlot.index * 1,
temperature : heating.value.temperature * 1,
duration : heating.value.duration * 1
});
} catch ( e ) {
Modal.error({title: '任务执行失败',content: e.message});
}
}
//
@ -68,8 +74,11 @@ async function actionHeatingStop() {
let slotIndex = props.activeSlot.index * 1;
let taskId = tubeRackSlots[slotIndex].taskUuid;
await client.taskActionExecute(taskId, 'cancel');
try {
await client.taskActionExecute(taskId, 'Cancel');
} catch ( e ) {
Modal.error({title: '任务执行失败',content: e.message});
}
enable.value = false;
}
</script>
Loading…
Cancel
Save