From c8e147509a41dc16e80a4fbc60055a18a4de9318 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 15 八月 2023 09:01:00 +0800
Subject: [PATCH] 34
---
src/views/home/index.vue | 118 +++++++++++++++++++++++-----------------------------------
1 files changed, 47 insertions(+), 71 deletions(-)
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 8a76ba4..722ce91 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -18,16 +18,22 @@
</div>
</div>
<div style="width: 100%; height: 20%;" >
- <div style="font-size: 2rem; color: #FFFFFF;margin-left: 1rem;" >
+ <div style="font-size: 2rem; color: #FFFFFF;margin-left: 0.5rem;" >
{{timeShidaun}}
</div>
</div>
- <div style="width: 100%; height: 25%;padding-top: 0.5rem;" >
- <div style="font-size: 2.5rem; color: #FFFFFF;margin-left: 1rem;">{{ patientInfo.name }}</div>
+ <div style="width: 100%; height: 30%;" >
+ <div style="font-size: 2.5rem; color: #FFFFFF;margin-left: 0.5rem;">{{ patientInfo.name }}</div>
</div>
- <div style="width: 100%; height: 25%; padding-top: 1rem;">
- <div style="font-size: 1.5rem; color: #FFFFFF;margin-left: 1rem;">透析号:{{ patientInfo.hemoCode }}</div>
+ <div style="width: 100%; height: 20%;">
+ <div style="font-size: 1.5rem; color: #FFFFFF;margin-left: 0.5rem;">透析号:{{ patientInfo.hemoCode }}</div>
</div>
+ <div v-if="is_ce_wen" style="width: 100%; height: 20%;">
+ <div style="font-size: 1.5rem; color: #FFFFFF;margin-left: 0.5rem;">
+ 体温:<span v-if="dangqian_wendu>30">{{dangqian_wendu}}°C</span>
+ <span v-else> /</span>
+ </div>
+ </div>
</el-col>
</el-row>
<el-row style="height: 30%;background: rgba(243, 247, 243, 0.3);border-radius: 8px; margin-top: 5%; font-size: 2rem;">
@@ -150,11 +156,12 @@
</div>
</div>
<div style="height: 75%;">
- <div style="background: rgba(243, 247, 243, 0.3); height: 100%; width: 100%; font-size: 1.3rem; font-weight: 800; color: #FFFFFF;">
- <div class="textjuzhong" style="height: 25%; width: 100%;">干体重 {{patientInfo.pureWeight}} kg</div>
- <div class="textjuzhong" style="height: 25%; width: 100%;">透析器 {{patientInfo.txq}}</div>
- <div class="textjuzhong" style="height: 25%; width: 100%;">治疗模式 {{patientInfo.medMethod}}</div>
- <div class="textjuzhong" style="height: 25%; width: 100%;">灌流器 {{patientInfo.glq}}</div>
+ <div style="background: rgba(243, 247, 243, 0.3); height: 100%; width: 100%; font-size: 2.5rem; line-height: 4.5rem; font-weight: 800; color: #FFFFFF; text-align: center;padding-top: 1rem;">
+ <span style="font-size: 4rem; color:#DFB144 ; " >干体重 {{patientInfo.pureWeight}}kg</span>
+ <br>
+ <span > 透析器:{{patientInfo.txq}}</span>
+ <span > 治疗模式:{{patientInfo.medMethod}}</span>
+ <span > 灌流器:{{patientInfo.glq}}</span>
</div>
</div>
</el-col>
@@ -213,6 +220,7 @@
import { confingInfoStore } from '@/stores/StoresConfing'
import {base64toFile} from '@/samples/faceApi'
import{initPort} from '@/samples/portApi'
+import{initPort as oumulongHbp9030 } from '@/samples/deviceApi/oumulong-HBP-9030'
import { ElLoading, ElMessage } from 'element-plus'
let trackerTask: any = null;
// 标识用的画布
@@ -246,7 +254,7 @@
base64toFile(imgSrc)
}
setTimeout(() => {
- console.log(configData.value.face_push+'秒跑一次人脸识别')
+ // console.log(configData.value.face_push+'秒跑一次人脸识别')
trackerTask.run();
}, configData.value.face_push*1000);
// @ts-ignore
@@ -329,61 +337,15 @@
const patientInfo = computed(() => {
return patientInfoStore().patientInfo
})
+const dangqian_wendu=computed(()=>{
+ return sockte.wendu
+})
// 计数
const viewNumber = computed(() => {
return patientInfoStore().viewNumber
})
const settime = () => {
- // 计数倒计时
clockNum.value = patientInfoStore().viewNumber
- // 清除定时器
- clearInterval(timerNum.value)
- timer = setInterval(() => {
- if (clockNum.value > 0) {
- clockNum.value--
- }
- else {
- clearInterval(timer)
- clockNum.value = patientInfoStore().viewNumber
- patientInfoStore().setpatientInfo({
- id: 0,
- code: '',
- name: '',
- patientAvatarIcon: '',
- deviceCode: '',
- hemoCode: '',
- pureWeight: '',
- datetime: ''
- })
- sockteStore().setweightSockte({
- type: '体重秤',
- deviceName: '',
- result: '0',
- resultTime: '',
- state: 2
- })
- sockteStore().setxyjSockte({
- type: '血压计',
- deviceName: '',
- result: '',
- resultTime: '',
- state: 2
- })
- sockteStore().setfaceSockte({
- type: '人脸识别',
- deviceName: '',
- result: '',
- resultTime: '',
- state: 2
- })
- aimTSL.value = ''
- gao_ya.value = ''
- di_ya.value = ''
- mai_bu.value = ''
- }
- }, 1000)
- // 记录定时器
- timerNum.value = timer
}
//发送消除某些状态
const fuxuan=()=>{
@@ -447,8 +409,9 @@
patientCodeLsXy = ''
aimTSL.value = ''
// 定时数秒器
- settime()
+
if (patientInfo.value.id !== 0 && patientInfo.value.name !== '' && patientInfo.value.isScheduled === 1) {
+ settime()
// 人脸识别成功后 1查看是否开启测温
// console.log(`患者信息识别成功:${patientInfo.value.name}`)
ipcRenderer.invoke('logger', `患者信息识别成功:${patientInfo.value.name}`)
@@ -483,6 +446,7 @@
}
// 没有排班
else if (patientInfo.value.isScheduled === 0) {
+ settime()
ipcRenderer.invoke('logger', `患者没有排班:${patientInfo.value.name}`)
// console.log( `患者没有排班:${patientInfo.value.name}`)
//关闭人脸弹框
@@ -523,13 +487,14 @@
bloodPressure: ''
}
if (patientCodeLs !== mode.patientCode) {
+ settime()
+ // 定时数秒器
const tt = mode.weight.replace('.', '点')
speech.value?.speak({ text: `称重完成,${tt}kg` }).then(() => {
console.log("播报完成...")
})
patientCodeLs = mode.patientCode
fasongNum.value=0
- // console.log(`开始发送结果到服务器:患者:${patientInfo.value.name},体重结果:${weightInfo.value.result}`)
ipcRenderer.invoke('logger', `开始发送结果到服务器:患者:${patientInfo.value.name},体重结果:${weightInfo.value.result}`)
console.log(`开始发送结果到服务器:患者:${patientInfo.value.name},体重结果:${weightInfo.value.result}`)
sundModeTz()
@@ -578,6 +543,8 @@
fasongNum.value=0
// console.log(`开始发送结果到服务器:患者:${patientInfo.value.name},血压结果:${mode.bloodPressure}`)
ipcRenderer.invoke('logger', `开始发送结果到服务器:患者:${patientInfo.value.name},血压结果:${mode.bloodPressure}`)
+ // 定时数秒器
+ settime()
sundModeXyj()
}
} else {
@@ -593,15 +560,16 @@
weight: weightInfo.value.result,
bloodPressure: ''
}
+ if(dangqian_wendu.value>30){
+ mode.temperature=dangqian_wendu.value
+ }
fasongNum.value++
ipcRenderer.invoke('logger', `患者结果上传,第${fasongNum.value}次`)
ipcRenderer.invoke('logger', '参数:'+JSON.stringify(mode))
updatePatient(mode).then(re=>{
ElMessage.success('结果发送成功')
ipcRenderer.invoke('logger', '结果上传成功')
- setTimeout(() => {
- fuxuan()
- },configData.value.timeJg)
+ clockNum.value = Number(configData.value.timeJg/1000)
return false
}).catch(re=>{
ElMessage('结果发送失败')
@@ -622,15 +590,17 @@
weight: '',
bloodPressure: xyjInfo.value.result
}
+ if(dangqian_wendu.value>30){
+ mode.temperature=dangqian_wendu.value
+ }
fasongNum.value++
ipcRenderer.invoke('logger', `患者结果上传,第${fasongNum.value}次`)
ipcRenderer.invoke('logger', '参数:'+JSON.stringify(mode))
updatePatient(mode).then(re=>{
ElMessage.success('结果发送成功')
ipcRenderer.invoke('logger', '结果上传成功')
- setTimeout(() => {
- fuxuan()
- },configData.value.timeJg)
+ // 倒计时结果显示
+ clockNum.value = Number(configData.value.timeJg/1000)
return false
}).catch(re=>{
ElMessage('结果发送失败')
@@ -687,9 +657,6 @@
ipcRenderer.send('winClose')
}
}
-const openPort=()=>{
- initPort('com5',115200)
-}
onMounted(() => {
console.log('页面初始化', os.hostname())
setTimeout(()=>{
@@ -699,6 +666,10 @@
is_ce_wen.value=configData.value.Is_ce_wen
if(is_ce_wen.value){
initPort(configData.value.portPath,configData.value.baudRate)
+ }
+ // 是否开启血压计联机
+ if(configData.value.Is_xyj){
+ oumulongHbp9030(configData.value.xueyanjiPortPath,configData.value.xueyanjiBaudRate)
}
// 是否开启脸识别
isUseFaceRecogService.value = configData.value.isUseFaceRecogService
@@ -713,6 +684,11 @@
}
clockNum.value = patientInfoStore().viewNumber
setInterval(function () {
+ clockNum.value--
+ if(clockNum.value===0){
+
+ fuxuan()
+ }
inputRef.value.focus();
date.value=formatDate(new Date(),'YYYY-mm-dd HH:MM')
if(Number(date.value.substring(11,13))<12){
--
Gitblit v1.8.0