|
|
@ -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(); |
|
|
|
|
|
|
|
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> |