|
|
@ -1,5 +1,10 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
import errorIcon from 'assets/images/error.svg' |
|
|
|
import ingIcon from 'assets/images/ing.svg' |
|
|
|
import successIcon from 'assets/images/success.svg' |
|
|
|
import waitIcon from 'assets/images/wait.svg' |
|
|
|
import { useHomeStore } from 'stores/homeStore' |
|
|
|
import { useSystemStore } from 'stores/systemStore' |
|
|
|
import { computed, ref } from 'vue' |
|
|
|
|
|
|
|
const props = withDefaults(defineProps<{ data: System.HeatArea }>(), { |
|
|
@ -7,14 +12,16 @@ const props = withDefaults(defineProps<{ data: System.HeatArea }>(), { |
|
|
|
moduleCode: 'heat_module_01', |
|
|
|
trayStatus: 0, |
|
|
|
heating: false, |
|
|
|
capStatus: false, |
|
|
|
capExist: false, |
|
|
|
temperature: 0, |
|
|
|
targetTemperature: 0, |
|
|
|
}), |
|
|
|
}) |
|
|
|
|
|
|
|
const emits = defineEmits(['selectChange', 'setTemperature']) |
|
|
|
|
|
|
|
const homeStore = useHomeStore() |
|
|
|
const systemStore = useSystemStore() |
|
|
|
const mousedownHandle = (e: Event) => { |
|
|
|
let event |
|
|
|
if ('touches' in e) { |
|
|
@ -39,6 +46,10 @@ const hearInfo = computed(() => { |
|
|
|
return homeStore.heatAreaList.find(item => item.value === props.data.moduleCode) |
|
|
|
}) |
|
|
|
|
|
|
|
const craft = computed(() => { |
|
|
|
return systemStore.systemStatus.tray.find(item => item.heatModuleId === props.data.moduleCode)?.crafts |
|
|
|
}) |
|
|
|
|
|
|
|
const setTemperature = () => { |
|
|
|
emits('setTemperature', props.data.moduleCode) |
|
|
|
} |
|
|
@ -50,12 +61,26 @@ defineExpose({ |
|
|
|
|
|
|
|
<template> |
|
|
|
<div class="tube" :class="{ 'tube-active': hearInfo?.selected, 'tube-shadow': data.trayStatus === 2 }"> |
|
|
|
<!-- <div --> |
|
|
|
<!-- class="status" :class="{ 'status-success': false, 'status-wait': false, 'status-error': false, 'status-ing': false, --> |
|
|
|
<!-- }" --> |
|
|
|
<!-- > --> |
|
|
|
<!-- <span>工艺执行中</span> --> |
|
|
|
<!-- </div> --> |
|
|
|
<div |
|
|
|
v-if="data.trayStatus !== 0 && craft?.state" |
|
|
|
class="status" :class="{ |
|
|
|
'status-success': false, |
|
|
|
'status-wait': craft?.state === 'READY', |
|
|
|
'status-error': craft?.state === 'ERROR', |
|
|
|
'status-ing': craft?.state === 'RUNNING', |
|
|
|
}" |
|
|
|
> |
|
|
|
<img v-if="craft?.state === 'FINISHED'" :src="successIcon" alt=""> |
|
|
|
<img v-if="craft?.state === 'RUNNING'" :src="ingIcon" alt=""> |
|
|
|
<img v-if="craft?.state === 'READY'" :src="waitIcon" alt=""> |
|
|
|
<img v-if="craft?.state === 'ERROR'" :src="errorIcon" alt=""> |
|
|
|
|
|
|
|
<span class="status-name">{{ craft?.craft?.name || ' ' }}</span> |
|
|
|
<span v-if="craft?.state === 'RUNNING'" class="status-text">工艺执行中</span> |
|
|
|
<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> |
|
|
|
<div class="header"> |
|
|
|
<span>{{ hearInfo?.label }}</span> |
|
|
|
<span v-show="data.trayStatus === 0">空置</span> |
|
|
@ -117,6 +142,39 @@ defineExpose({ |
|
|
|
height: 100%; |
|
|
|
background: rgba(255,255,255,0.9); |
|
|
|
z-index: 1; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
justify-content: flex-start; |
|
|
|
align-items: center; |
|
|
|
border-radius: 10px; |
|
|
|
img { |
|
|
|
width: 50px; |
|
|
|
margin: 30px 0 10px; |
|
|
|
} |
|
|
|
.status-name { |
|
|
|
font-size: 14px; |
|
|
|
margin: 10px 0 10px; |
|
|
|
} |
|
|
|
.status-text { |
|
|
|
font-size: 16px; |
|
|
|
font-weight: 700; |
|
|
|
} |
|
|
|
} |
|
|
|
.status-wait { |
|
|
|
background: rgba(242,235,231, 0.9); |
|
|
|
border: 1px solid #EE8223; |
|
|
|
color: #EE8223; |
|
|
|
|
|
|
|
} |
|
|
|
.status-error { |
|
|
|
background: rgba(232,212,222, 0.9); |
|
|
|
border: 1px solid #DF1515; |
|
|
|
color: #DF1515; |
|
|
|
} |
|
|
|
.status-ing { |
|
|
|
background: rgba(205,223,255, 0.9); |
|
|
|
border: 1px solid #3E3A39; |
|
|
|
color: #3E3A39; |
|
|
|
} |
|
|
|
.header { |
|
|
|
display: flex; |
|
|
|