5 changed files with 122 additions and 97 deletions
-
1src/src/main/java/com/my/graphiteDigesterBg/move/MoveHeatPlateSlotHeating.java
-
99src/web/src/pages/main/contents/Operation.vue
-
75src/web/src/pages/main/contents/OperationTubeRackHeating.vue
-
5src/web/src/pages/main/contents/OperationTubeRackTemperature.vue
-
39src/web/src/pages/main/contents/OperationTubeRacks.vue
@ -0,0 +1,75 @@ |
|||
<template> |
|||
<a-button class="ml-1" |
|||
style="background: transparent;border: solid 1px #becfe7;color: #7c92b1;" |
|||
@click="actionModalShow" |
|||
><FireOutlined /></a-button> |
|||
|
|||
<!-- 加热 --> |
|||
<a-modal v-if="enable" v-model:visible="enable" title="加热"> |
|||
<a-form :label-col="{span:4}" :wrapper-col="{span:20}" label-align="left" class="py-5"> |
|||
<a-form-item label="温度"> |
|||
<a-input-number class="w-full" v-model:value="heating.temperature" :min="0" addon-after="℃"/> |
|||
</a-form-item> |
|||
<a-form-item label="持续时间"> |
|||
<a-input-number class="w-full" v-model:value="heating.duration" :min="0" addon-after="分钟" /> |
|||
</a-form-item> |
|||
</a-form> |
|||
|
|||
<template #footer> |
|||
<a-row> |
|||
<a-col :span="12" class="text-left"> |
|||
<a-button v-if="props.activeSlot.isHeating" danger @click="actionHeatingStop">停止</a-button> |
|||
</a-col> |
|||
<a-col :span="12"> |
|||
<a-button @click="actionHeatingCancel">取消</a-button> |
|||
<a-button type="primary" @click="actionHeatingStart">确认</a-button> |
|||
</a-col> |
|||
</a-row> |
|||
</template> |
|||
</a-modal> |
|||
</template> |
|||
<script setup> |
|||
import ApiClient from '@/utils/ApiClient'; |
|||
import { ref } from 'vue'; |
|||
/** @var {Object} */ |
|||
const props = defineProps({ |
|||
activeSlot: Object, |
|||
}); |
|||
/** @var {Boolean} */ |
|||
const enable = ref(false); |
|||
/** @var {Object} */ |
|||
const heating = ref({temperature:100,duration:1}); |
|||
|
|||
// 显示加热弹框 |
|||
function actionModalShow() { |
|||
enable.value = true; |
|||
} |
|||
|
|||
// 加热 |
|||
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 |
|||
}); |
|||
} |
|||
|
|||
// 加热取消 |
|||
function actionHeatingCancel() { |
|||
enable.value = false; |
|||
} |
|||
|
|||
// 加热停止 |
|||
async function actionHeatingStop() { |
|||
let client = ApiClient.getClient(); |
|||
let tubeRackSlots = await client.resourceDataGet('HeatingTubeRackSlot'); |
|||
|
|||
let slotIndex = props.activeSlot.index * 1; |
|||
let taskId = tubeRackSlots[slotIndex].taskUuid; |
|||
await client.taskActionExecute(taskId, 'cancel'); |
|||
|
|||
enable.value = false; |
|||
} |
|||
</script> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue