45
chenyincheng
2023-03-04 bf53bd193071d74946455800dbb2edb5fdd0bb27
src/views/home/index.vue
@@ -194,11 +194,7 @@
            console.log("播报完成...")
          })
        }
        else {
          if( Number(weightInfo.value.result)<=10){
            return false
          }
          else if (weightInfo.value.result !== "0") {
        if (weightInfo.value.result !== "0") {
            // 发送结果到sockte服务
            const mode = {
              patientCode: patientInfo.value.code,
@@ -223,18 +219,16 @@
              patientCodeLs = mode.patientCode
            }
            else {
              console.log(`patientCodeLs===${patientCodeLs} ,mode.patCode${mode.patientCode}`)
              speech.value?.speak({ text: "不能重复称重,请先刷卡然后再称重" }).then(() => {
                console.log("播报完成...")
              })
              // console.log(`patientCodeLs===${patientCodeLs} ,mode.patCode${mode.patientCode}`)
              // speech.value?.speak({ text: "不能重复称重,请先刷卡然后再称重" }).then(() => {
              //   console.log("播报完成...")
              // })
            }
            // 计算目标脱水量
            if (Number(weightInfo.value.result) > 0 && Number(patientInfo.value.pureWeight) !== 0) {
              state.aimTSL = (Number(weightInfo.value.result) - Number(patientInfo.value.pureWeight)).toFixed(2)
              state.aimTSL = (Number(weightInfo.value.result) - Number(patientInfo.value.pureWeight)- Number(patientInfo.value.clothesWeight)).toFixed(2)
            }
          }
        }
      }
    );
    watch(