chenyincheng
2023-03-22 ce6654370d9e29859f1bd2b0c689c0eb13396026
src/views/home/index.vue
@@ -168,9 +168,9 @@
        }
        // 没有找到患者
        else if (patientInfo.value.name === '') {
          speech.value?.speak({ text: "没有找到患者,请重新刷卡" }).then(() => {
            console.log("播报完成...")
          })
          // speech.value?.speak({ text: "没有找到患者,请重新刷卡" }).then(() => {
          //   console.log("播报完成...")
          // })
          if (isUseFaceRecogService.value) {
            state.dialogVisible = true
          }
@@ -205,7 +205,6 @@
              bloodPressure: ''
            }
            console.log('发送患者结果,前提是患者code 不能重复', mode)
            if (patientCodeLs !== mode.patientCode) {
              const tt = mode.weight.replace('.', '点')
              console.log('发送患者结果', tt)
@@ -222,11 +221,15 @@
              patientCodeLs = mode.patientCode
            }
            else {
              // console.log(`patientCodeLs===${patientCodeLs} ,mode.patCode${mode.patientCode}`)
              // speech.value?.speak({ text: "不能重复称重,请先刷卡然后再称重" }).then(() => {
              //   console.log("播报完成...")
              // })
            }
               // api上传
               updatePatient(mode).then(re => {
                  console.log(re)
                }).catch(() => {
                  ElMessage.error('结果上报出错,请联系后台管理员')
                })
                // sendPationSet(mode)
                patientCodeLs = mode.patientCode
              }
            // 计算目标脱水量
            if (Number(weightInfo.value.result) > 0 && Number(patientInfo.value.pureWeight) !== 0) {
              state.aimTSL = (Number(weightInfo.value.result) - Number(patientInfo.value.pureWeight)- Number(patientInfo.value.clothesWeight)).toFixed(2)