|
|
@ -1,4 +1,5 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
import { pauseCraft, resumeCraft, stopCraft } from 'apis/crafts' |
|
|
|
import errorIcon from 'assets/images/error.svg' |
|
|
|
import ingIcon from 'assets/images/ing.svg' |
|
|
|
import successIcon from 'assets/images/success.svg' |
|
|
@ -54,6 +55,24 @@ const setTemperature = () => { |
|
|
|
emits('setTemperature', props.data.moduleCode) |
|
|
|
} |
|
|
|
|
|
|
|
const pauseCraftHandle = async () => { |
|
|
|
await pauseCraft({ |
|
|
|
heatId: props.data.moduleCode, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const resumeCraftHandle = async () => { |
|
|
|
await resumeCraft({ |
|
|
|
heatId: props.data.moduleCode, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const stopCraftHandle = async () => { |
|
|
|
await stopCraft({ |
|
|
|
heatId: props.data.moduleCode, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
defineExpose({ |
|
|
|
activeTubeBox, |
|
|
|
}) |
|
|
@ -80,6 +99,17 @@ defineExpose({ |
|
|
|
<span v-if="craft?.state === 'READY'" class="status-text">工艺等待执行</span> |
|
|
|
<span v-if="craft?.state === 'ERROR'" class="status-text">工艺执行错误</span> |
|
|
|
<span v-if="craft?.state === 'FINISHED'" class="status-text">工艺执行成功</span> |
|
|
|
<div class="status-operation"> |
|
|
|
<ft-button v-if="craft?.state === 'RUNNING'" type="primary" size="small" :click-handle="pauseCraftHandle"> |
|
|
|
暂停 |
|
|
|
</ft-button> |
|
|
|
<ft-button v-if="craft?.state === 'PAUSED'" type="primary" size="small" :click-handle="resumeCraftHandle"> |
|
|
|
继续 |
|
|
|
</ft-button> |
|
|
|
<ft-button v-if="craft?.state === 'RUNNING'" size="small" :click-handle="stopCraftHandle"> |
|
|
|
停止 |
|
|
|
</ft-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="header"> |
|
|
|
<span>{{ hearInfo?.label }}</span> |
|
|
@ -159,6 +189,16 @@ defineExpose({ |
|
|
|
font-size: 16px; |
|
|
|
font-weight: 700; |
|
|
|
} |
|
|
|
.status-operation { |
|
|
|
width: 100%; |
|
|
|
margin-top: auto; |
|
|
|
margin-bottom: 10px; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
.ft-button { |
|
|
|
margin-right: 5px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.status-wait { |
|
|
|
background: rgba(242,235,231, 0.9); |
|
|
@ -173,8 +213,8 @@ defineExpose({ |
|
|
|
} |
|
|
|
.status-ing { |
|
|
|
background: rgba(205,223,255, 0.9); |
|
|
|
border: 1px solid #3E3A39; |
|
|
|
color: #3E3A39; |
|
|
|
border: 1px solid #0256FF; |
|
|
|
color: #0256FF; |
|
|
|
} |
|
|
|
.header { |
|
|
|
display: flex; |
|
|
|