From 0878950e171bcaeb0cf8064c72d6f5a330eea4da Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期三, 07 二月 2024 16:41:59 +0800
Subject: [PATCH] g更新设备号和干体重开关

---
 src/views/home/index.vue           |   10 ++++------
 src/stores/StoresConfing.ts        |    5 +++++
 src/samples/deviceApi/XK3190A12.ts |    6 +++---
 3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/samples/deviceApi/XK3190A12.ts b/src/samples/deviceApi/XK3190A12.ts
index 9bd9318..f270234 100644
--- a/src/samples/deviceApi/XK3190A12.ts
+++ b/src/samples/deviceApi/XK3190A12.ts
@@ -45,7 +45,7 @@
         console.log(value.toString())
         const str=value.toString()
         // 截取结果
-        const list=str.substring(2,9) 
+        const list=str.substring(2,10) 
         if(Number(list)>20){
             // 判断是否相等 相等加一
             if(list===lisijieguo){
@@ -55,7 +55,7 @@
                 duibinum=0
             }
             // 对比4次结果都一致
-            if(duibinum>=yanjiancishu&&sfqingling){
+            if(duibinum>=yanjiancishu){
                 // 数据发送  体重没有清零  下次就不播报不发送
                 sfqingling=false
                 const res=Number(list)
@@ -72,7 +72,7 @@
                 duibinum=0
                 lisijieguo=''
             }else{
-                
+                // sfqingling=false
             }
 
             
diff --git a/src/stores/StoresConfing.ts b/src/stores/StoresConfing.ts
index 23190e9..a929c66 100644
--- a/src/stores/StoresConfing.ts
+++ b/src/stores/StoresConfing.ts
@@ -14,6 +14,8 @@
         BobaoJg:4,
         beginWorkTime:5,
 	    endWorkTime:22,
+        // 默认显示床号 开启就显示干体重
+        gantiziShow:false,
         Is_ce_wen:false,
         portPath:'COM5',
         baudRate:115200,
@@ -36,6 +38,9 @@
      * @param roleText 配置文件设置 
      */
     function setconfingInfo(info:any){
+        if(info.gantiziShow===undefined){
+            info.gantiziShow=false
+        }
         confingInfo.value=info
         // 给默认值
         if(info.BobaoJg===undefined){
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 12bf9b3..d656ad0 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -77,25 +77,23 @@
                         <el-col :span="8">
                             <div class="textwenben" style="height: 28%; font-size: 25px;background-color: #DFB144; border-radius: 12px 0 0 0;">
                               <template v-if="configData.deviceType==='体重秤'">
-                                <template v-if="patientInfo.isAfterMed===0">
+                                <template v-if="patientInfo.isAfterMed===0&&!configData.gantiziShow">
                                   机号/床位号
                                 </template>
                                 <template v-else>干体重(kg)</template>
                                   
                               </template>
                               <template v-else>
-                                <template v-if="patientInfo.isAfterMed===0">
+                                <template v-if="!configData.gantiziShow">
                                   机号/床位号
                                 </template>
-                                <template v-else>
-                                  机号/床位号
-                                </template>
+                                <template v-else>干体重(kg)</template>
                                 
                               </template>
                             </div>
                             <div class="textwenben" style="height: 70%; font-size: 80px; color: #DFB144;">
                               <template v-if="configData.deviceType==='体重秤'">
-                                  <template v-if="patientInfo.isAfterMed===0">
+                                  <template v-if="patientInfo.isAfterMed===0&&!configData.gantiziShow">
                                     {{ patientInfo.deviceNo }}
                                   </template>
                                   <template v-else>{{patientInfo.pureWeight}}</template>

--
Gitblit v1.8.0