From f2d679a5cc548beccd5f6dcab7875080a9b96e2d Mon Sep 17 00:00:00 2001
From: chenyincheng <501753378@qq.com>
Date: 星期六, 04 二月 2023 09:15:31 +0800
Subject: [PATCH] 45
---
src/views/home/index.vue | 39 ++++++++++++++++++++++++++-------------
1 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index fca99f8..7f8437a 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -23,6 +23,7 @@
import step7 from '@/assets/mp3/chongfuchengzhong.mp3'
import login from '@/views/login/index.vue'
import { confingInfoStore } from '@/stores/StoresConfing'
+import { ElMessage } from 'element-plus'
export default {
name: 'hoem',
@@ -35,6 +36,7 @@
const sockte = sockteStore()
const inputRef = ref()
let patientCodeLs=''
+ let patientCodeLsXy=''
const isUseFaceRecogService=ref(false)
const isLink = computed(() => {
return !sockte.isLink
@@ -137,8 +139,7 @@
console.log('患者信息变化',patientInfo.value)
patientCodeLs=''
console.log(patientCodeLs,'患者codec初始化')
-
- if (patientInfo.value.id !== 0) {
+ if (patientInfo.value.id !== 0&&patientInfo.value.name!==''&&patientInfo.value.isScheduled===1) {
let str=`${patientInfo.value.name}识别成功。`
speech.value?.speak({text:str}).then(()=>{
console.log("播报完成...")
@@ -172,7 +173,7 @@
}
// 没有排班
else if(patientInfo.value.isScheduled===0){
- speech.value?.speak({text:"当前患者没有排班,不能自动签到"}).then(()=>{
+ speech.value?.speak({text:`${patientInfo.value.name}今日没有排班,不能自助签到`}).then(()=>{
console.log("播报完成...")
})
if(isUseFaceRecogService.value){
@@ -202,13 +203,16 @@
}
console.log('发送患者结果,前提是患者code 不能重复', mode)
if(patientCodeLs!==mode.patientCode){
- console.log('发送患者结果')
- speech.value?.speak({text:`称重完成,${mode.weight}kg`}).then(()=>{
+ const tt=mode.weight.replace('.','点')
+ console.log('发送患者结果',tt)
+ speech.value?.speak({text:`称重完成,${tt}kg`}).then(()=>{
console.log("播报完成...")
})
// api上传
updatePatient(mode).then(re=>{
console.log(re)
+ }).catch(()=>{
+ ElMessage.error('结果上报出错,请联系后台管理员')
})
// sendPationSet(mode)
patientCodeLs=mode.patientCode
@@ -247,18 +251,27 @@
settime()
const mode = {
patientCode: patientInfo.value.code,
- weight: weightInfo.value.result,
+ weight: '',
bloodPressure: xyjInfo.value.result
}
console.log('发送患者结果', mode)
- speech.value?.speak({text:`收缩压:${state.gao_ya},舒张压:${state.di_ya},脉搏:${state.mai_bu}`}).then(()=>{
- console.log("播报完成...")
- })
- updatePatient(mode).then(re=>{
- console.log(re)
- })
- sendPationSet(mode)
+ if(patientCodeLsXy===mode.patientCode){
+ speech.value?.speak({text:'不能重复测量血压,请重新失败患者再测量血压'}).then(()=>{
+ console.log("播报完成...")
+ })
+ console.log('如果是重复提交 就不要上传到api')
+ return false
+ }else{
+ updatePatient(mode).then(re=>{
+ speech.value?.speak({text:`收缩压:${state.gao_ya},舒张压:${state.di_ya},脉搏:${state.mai_bu}`}).then(()=>{
+ console.log("播报完成...")
+ })
+ patientCodeLsXy=mode.patientCode
+ console.log(re)
+ })
+ sendPationSet(mode)
+ }
}
} else {
state.gao_ya = ""
--
Gitblit v1.8.0