From 608b8c5f7e43c3a3f43ffffaa8287c8434adbdc9 Mon Sep 17 00:00:00 2001
From: chenyincheng <501753378@qq.com>
Date: 星期三, 22 三月 2023 20:14:43 +0800
Subject: [PATCH] 45

---
 src/views/home/index.vue |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index b04fdec..f570f20 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -192,11 +192,11 @@
       () => 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 = {
@@ -205,13 +205,13 @@
               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)
@@ -222,11 +222,9 @@
               patientCodeLs = mode.patientCode
             }
             else {
-              // console.log(`patientCodeLs===${patientCodeLs} ,mode.patCode${mode.patientCode}`)
-              // speech.value?.speak({ text: "不能重复称重,请先刷卡然后再称重" }).then(() => {
-              //   console.log("播报完成...")
-              // })
-            }
+                console.log(22222)
+                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)

--
Gitblit v1.8.0