| | |
| | | } |
| | | // 没有找到患者 |
| | | else if (patientInfo.value.name === '') { |
| | | timer=new Date() |
| | | ipcRenderer.invoke('logger', '接收到的患者为空') |
| | | console.log('接收到的患者为空') |
| | | if (isUseFaceRecogService.value) { |
| | |
| | | () => weightInfo.value.resultTime, |
| | | async () => { |
| | | const X= jgTime(timer,new Date()) |
| | | // console.log(X,'收到体重',configData.value.BobaoJg) |
| | | console.log(X,'收到体重',configData.value.BobaoJg) |
| | | // 体重不能0 |
| | | if (weightInfo.value.result !== "0"&&patientInfo.value.code!=='') { |
| | | ipcRenderer.invoke('logger', `体重变化了:${weightInfo.value.result}`) |
| | |
| | | }else if(Number(patientInfo.value.pureWeight) !== 0&&patientInfo.value.isAfterMed===1 && patientInfo.value.preWeight>10){ |
| | | aimTSL.value = (Number(patientInfo.value.preWeight)- Number(patientInfo.value.pureWeight) - Number(patientInfo.value.clothesWeight)).toFixed(2) |
| | | } |
| | | }// 要过4秒才能重复播报这个消息 |
| | | else if(patientInfo.value.code===''&&weightInfo.value.result !== "0"&&X>configData.value.BobaoJg){ |
| | | timer=new Date() |
| | | speech.value?.speak({ text: "没有识别的患者,请先验证患者" }).then(() => { |
| | | }) |
| | | }// 要过设置的10秒才能重复播报这个消息 |
| | | else if(patientInfo.value.code===''&&weightInfo.value.result !== "0"){ |
| | | //10后才执行 |
| | | if(播报是否完成.value){ |
| | | 播报是否完成.value=false |
| | | setTimeout(bobaoyuy, configData.value.BobaoJg*1000); |
| | | }else{ |
| | | console.log('上一次播报还没完成,放弃这次播报',播报是否完成.value) |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | ); |
| | | // 默认播报完成 |
| | | const 播报是否完成=ref(true) |
| | | const bobaoyuy=()=>{ |
| | | |
| | | if(patientInfo.value.name===''){ |
| | | speech.value?.speak({ text: "没有识别的患者,请先验证患者",onend:()=>{ |
| | | console.log('播报完成') |
| | | |
| | | 播报是否完成.value=true |
| | | console.log('播报完成111111',播报是否完成.value) |
| | | } |
| | | }) |
| | | 播报是否完成.value=true |
| | | } |
| | | |
| | | } |
| | | // 血压发送了变化 |
| | | watch( |
| | | () => xyjInfo.value.resultTime, |