| | |
| | | () => weightInfo.value.resultTime, |
| | | () => { |
| | | console.log("体重变化了", weightInfo.value) |
| | | if (patientInfo.value.id === 0) { |
| | | speech.value?.speak({ text: "没有识别的患者,请先验证患者" }).then(() => { |
| | | console.log("播报完成...") |
| | | }) |
| | | } |
| | | // if (patientInfo.value.id === 0) { |
| | | // speech.value?.speak({ text: "没有识别的患者,请先验证患者" }).then(() => { |
| | | // console.log("播报完成...") |
| | | // }) |
| | | // } |
| | | if (weightInfo.value.result !== "0") { |
| | | // 发送结果到sockte服务 |
| | | const mode = { |
| | |
| | | bloodPressure: '' |
| | | |
| | | } |
| | | console.log('发送患者结果,前提是患者code 不能重复', mode) |
| | | if (patientCodeLs !== mode.patientCode) { |
| | | const tt = mode.weight.replace('.', '点') |
| | | console.log('发送患者结果', tt) |
| | | speech.value?.speak({ text: `称重完成,${tt}kg` }).then(() => { |
| | | console.log("播报完成...") |
| | | }) |
| | | console.log(111111) |
| | | // api上传 |
| | | updatePatient(mode).then(re => { |
| | | console.log(re) |
| | |
| | | patientCodeLs = mode.patientCode |
| | | } |
| | | else { |
| | | // api上传 |
| | | updatePatient(mode).then(re => { |
| | | console.log(re) |
| | | }).catch(() => { |
| | | ElMessage.error('结果上报出错,请联系后台管理员') |
| | | }) |
| | | // sendPationSet(mode) |
| | | console.log(22222) |
| | | patientCodeLs = mode.patientCode |
| | | } |
| | | // 计算目标脱水量 |