Browse Source

fix: 温度判断2

master
guoapeng 3 days ago
parent
commit
0f5b16a235
  1. 12
      src/pages/Index/Index.vue
  2. 2
      src/websocket/socket.ts

12
src/pages/Index/Index.vue

@ -157,9 +157,9 @@
</template> -->
</el-dropdown>
<div style="width: 100px">
<el-tag effect="dark" type="danger" v-show="deviceStore.sensorState?.incubateBoxTemperature > incubateBoxTemperature">温度: </el-tag>
<el-tag effect="dark" type="danger" v-show="deviceStore.sensorState?.incubateBoxTemperature < incubateBoxTemperature">温度: </el-tag>
<el-tag effect="dark" type="success" v-show="deviceStore.sensorState?.incubateBoxTemperature == incubateBoxTemperature">温度: </el-tag>
<el-tag effect="dark" type="danger" v-show="deviceStore.sensorState?.incubateBoxTemperatureState === 'High'">温度: </el-tag>
<el-tag effect="dark" type="danger" v-show="deviceStore.sensorState?.incubateBoxTemperatureState === 'Low'">温度: </el-tag>
<el-tag effect="dark" type="success" v-show="deviceStore.sensorState?.incubateBoxTemperatureState === 'Ready'">温度: </el-tag>
</div>
@ -501,10 +501,6 @@ const confirmRestore = () => {
const router = useRouter()
const route = useRoute()
const incubateBoxTemperature = computed(() => {
return systemStore.systemInfo?.incubateBoxTemperature || 0
})
//
const fetchSettings = async () => {
try {
@ -1050,7 +1046,7 @@ const startTest = async () => {
return
}
try {
if (deviceStore.sensorState?.incubateBoxTemperature != incubateBoxTemperature) {
if (deviceStore.sensorState?.incubateBoxTemperatureState !== 'Ready') {
warnMessage.value = '温度异常, 禁止测试'
showWarnModal.value =true
return

2
src/websocket/socket.ts

@ -289,7 +289,9 @@ interface SensorStateMessage extends BaseMessage {
dataType: 'SensorState'
data: {
pboxTemperature: number //板夹仓温度
pboxTemperatureState: 'Ready' | 'High' | 'Low' //板夹仓温度状态
incubateBoxTemperature: number // 孵育盘温度
incubateBoxTemperatureState: 'Ready' | 'High' | 'Low' // 孵育盘温度状态
wasteBinFullFlag: boolean // 废废料仓状态
}
timestamp: number

Loading…
Cancel
Save