From a7b549d48ffccaa8c16cd41f2f4384ac29ebc72f Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期三, 26 三月 2025 17:21:22 +0800
Subject: [PATCH] gx优化

---
 src/views/deviceWindoes2.vue |  178 ++++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 114 insertions(+), 64 deletions(-)

diff --git a/src/views/deviceWindoes2.vue b/src/views/deviceWindoes2.vue
index ae19954..544f75d 100644
--- a/src/views/deviceWindoes2.vue
+++ b/src/views/deviceWindoes2.vue
@@ -76,14 +76,14 @@
                   <el-row style="height: 50%; ">
                     <div style="width: 100%; height: 100%;border-radius: 8px;">
                       <div class="item" style="background-color: #ffffff;height: 97%;">
-                          <div style="height: 30%;">
+                          <div style="height: 25%;">
                             <div class="container-cord" style="height: 100%;">
-                              <img style="width: 35px;" referrerpolicy="no-referrer" :src="tsl"
+                              <img style="width: 25px;" referrerpolicy="no-referrer" :src="tsl"
                               />
                               <span class="text-group_3">血压</span>
                             </div>
                           </div>
-                          <div style="height: 70%; text-align: center;font-weight: 600;font-size: 92px;color: #70A3DD;" class="grid-container" >
+                          <div style="height: 75%; text-align: center;font-weight: 600;font-size: 65px;color: #70A3DD;" class="grid-container" >
                             {{床旁血压计.sbp}} / {{床旁血压计.dbp}}
                           </div>
                       </div>
@@ -93,14 +93,14 @@
                   <el-row style="height: 50%;">
                     <div style="width: 100%; height: 100%;border-radius: 8px;">
                       <div class="item" style="background-color: #ffffff;height: 97%;">
-                          <div style="height: 30%;">
+                          <div style="height: 25%;">
                             <div class="container-cord" style="height: 100%;">
-                              <img style="width: 32px;" referrerpolicy="no-referrer" :src="xinlv"
+                              <img style="width: 25px;" referrerpolicy="no-referrer" :src="xinlv"
                               />
                               <span class="text-group_3">心率</span>
                             </div>
                           </div>
-                          <div style="height: 70%; text-align: center;font-weight: 600;font-size: 92px;color: #70A3DD;" class="grid-container" >
+                          <div style="height: 75%; text-align: center;font-weight: 600;font-size: 65px;color: #70A3DD;" class="grid-container" >
                             {{床旁血压计.pulseRate}}
                           </div>
                       </div>
@@ -116,42 +116,44 @@
                       <el-row style="height: 100%;" :gutter="10">
                         <el-col class="itemboy" style="height:100%" :span="7">
                           <div class="item" style="background-color: #ffffff;height: 97%;">
-                          <div style="height: 30%;">
+                          <div style="height: 25%;">
                             <div class="container-cord" style="height: 100%;">
-                              <img style="width: 32px;" referrerpolicy="no-referrer" :src="zlms"
+                              <img style="width: 25px;" referrerpolicy="no-referrer" :src="zlms"
                               />
                               <span class="text-group_3">治疗模式</span>
                             </div>
                           </div>
-                          <div style="height: 70%; text-align: center;font-weight: 600;font-size: 60px;color: #D58E56;" class="grid-container" >
-                            {{ deviceData.透析方案 }}
+                          <div style="height: 75%; text-align: center;font-weight: 600;font-size: 50px;color: #D58E56;" class="grid-container" >
+                            <div>
+                              <span style="font-size: 30px;" v-if="deviceData.透析方案 ==='HDF'"> {{deviceData?.置换方式==='前置换'?'前':'后'}}</span> {{ deviceData.透析方案 }}
+                            </div>
                           </div>
                         </div>
                         </el-col>
                         <el-col class="itemboy" style="height:100%" :span="7">
                           <div class="item" style="background-color: #ffffff;height: 97%;">
-                          <div style="height: 30%;">
+                          <div style="height: 25%;">
                             <div class="container-cord" style="height: 100%;">
-                              <img style="width: 32px;" referrerpolicy="no-referrer" :src="txztimg"
+                              <img style="width: 25px;" referrerpolicy="no-referrer" :src="txztimg"
                               />
                               <span class="text-group_3">治疗状态</span>
                             </div>
                           </div>
-                          <div style="height: 70%; text-align: center;font-weight: 600;font-size: 60px;color: #70A3DD;" class="grid-container" >
+                          <div style="height: 75%; text-align: center;font-weight: 600;font-size: 50px;color: #70A3DD;" class="grid-container" >
                           {{txztText}}
                           </div>
                         </div>
                         </el-col>
                         <el-col class="itemboy" style="height:100%" :span="10">
                           <div class="item" style="background-color: #ffffff;height: 97%;">
-                          <div style="height: 30%;">
+                          <div style="height: 25%;">
                             <div class="container-cord" style="height: 100%;">
-                              <img style="width: 32px;" referrerpolicy="no-referrer" :src="txq"
+                              <img style="width: 25px;" referrerpolicy="no-referrer" :src="txq"
                               />
                               <span class="text-group_3">人工肾</span>
                             </div>
                           </div>
-                          <div style="height: 70%; text-align: center;font-weight: 600;font-size: 50px;color: #8079CB;" class="grid-container" >
+                          <div style="height: 75%; text-align: center;font-weight: 600;font-size: 50px;color: #8079CB;" class="grid-container" >
                             {{deviceData.透析器}}
                           </div>
                         </div>
@@ -163,46 +165,51 @@
                   <!-- 签到未签到状态 -->
                   <div class="container" v-if="Number(deviceData.透析状态) < 1"  style="height: 50%; ">
                         <div class="item" style="background-color: #FFFFFF;">
-                          <div style="height: 30%;">
+                          <div style="height: 25%;">
                             <div class="container-cord" style="height: 100%;">
-                              <img style="width: 32px;" referrerpolicy="no-referrer" :src="xinlv"
+                              <img style="width: 25px;" referrerpolicy="no-referrer" :src="xinlv"
                               />
-                              <span class="text-group_3">透前血压、心率</span>
+                              <span class="text-group_3">异常指标</span>
                             </div>
                           </div>
-                          <div style="height: 70%; text-align: center;font-weight: 600;font-size: 60px;color: #333333;" class="grid-container" >
-                            <div>
+                          <div style="height: 75%; text-align: center;font-weight: 600;font-size: 50px;color: #333333; color: #CA7070;" >
+                            <el-row  style="font-size: 30px;">
+                              <el-col v-for="(row,index) in deviceData.异常检验指标" :span="8" style="font-weight: 700;" :key="index">
+                                {{getItemName(row?.项目名称)}} <b v-if="row?.结果标记==='g'" style="font-weight:bold">⬆</b> <b v-else style="font-weight:bold">⬇</b> 
+                              </el-col> 
+                            </el-row>
+                            <!-- <div>
                               <span v-if="deviceData.透前血压_伸缩压" :style="{ color: tqXygj ? 'red' : '#303133' }">{{ deviceData.透前血压_伸缩压 }}/</span >
                               <span :style="{ color: tqXygj ? 'red' : '#303133' }" style="font-weight: 800; font-size: 200%; white-space: nowrap">{{ deviceData.透前血压_舒张压 }}</span>
                               <span v-if="deviceData.透前脉搏" :style="{ color: tqMbgj ? 'red' : '#303133' }" style="font-weight: 800; font-size: 200%; white-space: nowrap">   {{ deviceData.透前脉搏 }}</span>
-                            </div>
+                            </div> -->
                           </div>
                         </div>
                         <div class="item" style="background-color: #ffffff;">
-                          <div style="height: 30%;">
+                          <div style="height: 25%;">
                             <div class="container-cord" style="height: 100%;">
-                              <img style="width: 32px;" referrerpolicy="no-referrer" :src="tsl"
+                              <img style="width: 25px;" referrerpolicy="no-referrer" :src="tsl"
                               />
                               <span class="text-group_3">处方脱水量</span>
                             </div>
                           </div>
-                          <div style="height: 70%; text-align: center;font-weight: 600;font-size: 60px;color: #8079CB;" class="grid-container" >
-                            <span v-if="deviceData.处方脱水量"></span>
-                            {{deviceData.处方脱水量}} L
+                          <div style="height: 75%; text-align: center;font-weight: 600;font-size: 50px;color: #8079CB;" class="grid-container" >
+                            <span v-if="deviceData.处方脱水量"> {{deviceData.处方脱水量}} L</span>
+                           
                           </div>
                         </div>
                   </div>
                   <!-- 透析中状态 -->
                   <div  class="container" v-else  style="height: 50%; ">
                         <div class="item" style="background-color: #FFFFFF;">
-                          <div style="height: 30%;">
+                          <div style="height: 10%;">
                             <div class="container-cord" style="height: 100%;">
-                              <img style="width: 32px;" referrerpolicy="no-referrer" :src="sjjd"
+                              <img style="width: 25px;" referrerpolicy="no-referrer" :src="sjjd"
                               />
                               <span class="text-group_3">时间进度</span>
                             </div>
                           </div>
-                          <div style="height: 70%; text-align: center;font-weight: 600;font-size: 60px;color: #333333;" class="grid-container" >
+                          <div style="height: 90%; text-align: center;font-weight: 600;font-size: 50px;color: #333333;" class="grid-container" >
                           <div>
                             <span style="color: #303133">{{
                             jgTime4(deviceData.iot_透析时间)
@@ -216,7 +223,7 @@
                           <div>
                             <el-progress
                               :text-inside="true"
-                              :stroke-width="30"
+                              :stroke-width="25"
                               :show-text="false"
                               color="#70A3DD"
                               :percentage="(Number(deviceData.iot_透析时间)/(Number(deviceData.透析处方的时长)*60))*100"
@@ -226,14 +233,14 @@
                           </div>
                         </div>
                         <div class="item" style="background-color: #ffffff;">
-                          <div style="height: 30%;">
+                          <div style="height: 10%;">
                             <div class="container-cord" style="height: 100%;">
-                              <img style="width: 32px;" referrerpolicy="no-referrer" :src="cljd"
+                              <img style="width: 25px;" referrerpolicy="no-referrer" :src="cljd"
                               />
                               <span class="text-group_3">超滤进度</span>
                             </div>
                           </div>
-                          <div style="height: 70%; text-align: center;font-weight: 600;font-size: 60px;color: #8079CB;" class="grid-container" >
+                          <div style="height: 90%; text-align: center;font-weight: 600;font-size: 50px;color: #8079CB;" class="grid-container" >
                             <div>
                               <span style="color: #303133">{{
                                   Number(deviceData.iot_当前脱水量).toFixed(1)
@@ -248,7 +255,7 @@
                             <div>
                               <el-progress
                                 :text-inside="true"
-                                :stroke-width="30"
+                                :stroke-width="25"
                                 :show-text="false"
                                 color="#70CAAE"
                                 :percentage=" Number(deviceData.iot_当前脱水量)/Number(deviceData.处方脱水量)*100"
@@ -269,66 +276,72 @@
             <div v-if="Number(deviceData.透析状态) < 1"  style="height: 70%;width: 100%;">
               <div class="container">
                 <div class="item">
-                  <div style="height: 30%;">
+                  <div style="height: 25%;">
                     <div class="container-cord" style="height: 100%;">
-                      <img style="width: 32px;" referrerpolicy="no-referrer" :src="tizhong"
+                      <img style="width: 25px;" referrerpolicy="no-referrer" :src="tizhong"
                       />
                       <span class="text-group_3">干体重</span>
                     </div>
                     
                   </div>
-                  <div style="height: 70%; text-align: center;font-weight: 600;font-size: 60px;color: #333333;" class="grid-container" >
+                  <div style="height: 75%; text-align: center;font-weight: 600;font-size: 50px;color: #333333;" class="grid-container" >
                     {{ Number(deviceData.干体重).toFixed(1) }}
                   </div>
                 </div>
                 <div class="item">
-                  <div style="height: 30%;">
+                  <div style="height: 25%;">
                     <div class="container-cord" style="height: 100%;">
-                      <img style="width: 32px;" referrerpolicy="no-referrer" :src="tizhong"
+                      <img style="width: 25px;" referrerpolicy="no-referrer" :src="tizhong"
                       />
                       <span class="text-group_3" >透前称重</span>
                     </div>
                   </div>
-                  <div style="height: 70%; text-align: center;font-weight: 600;font-size: 60px;color: #333333;" class="grid-container" >
+                  <div style="height: 75%; text-align: center;font-weight: 600;font-size: 50px;color: #333333;" class="grid-container" >
                     {{ Number(deviceData.透前称重).toFixed(1) }}
                   </div>
                 </div>
                 <div class="item">
-                  <div style="height: 30%;">
+                  <div style="height: 25%;">
                     <div class="container-cord" style="height: 100%;">
-                      <img style="width: 32px;" referrerpolicy="no-referrer" :src="tizhong"
+                      <img style="width: 25px;" referrerpolicy="no-referrer" :src="tizhong"
                       />
                       <span class="text-group_3">上次透后体重</span>
                     </div>
                   </div>
-                  <div style="height: 70%; text-align: center;font-weight: 600;font-size: 60px;color: #333333;" class="grid-container" >
+                  <div style="height: 75%; text-align: center;font-weight: 600;font-size: 50px;color: #333333;" class="grid-container" >
                     {{ Number(deviceData.上次透后称重).toFixed(1) }}
                   </div>
                 </div>
                 <div class="item">
-                  <div style="height: 30%;">
+                  <div style="height: 25%;">
                     <div class="container-cord" style="height: 100%;">
-                      <img style="width: 32px;" referrerpolicy="no-referrer" :src="tizhong"
+                      <img style="width: 25px;" referrerpolicy="no-referrer" :src="tizhong"
                       />
                       <span class="text-group_3" >体重增长</span>
                     </div>
                   </div>
-                  <div style="height: 70%; text-align: center;font-weight: 600;font-size: 60px;color: #333333;" class="grid-container" >
-                    +{{
+                  <div style="height: 75%; text-align: center;font-weight: 600;font-size: 50px;color: #333333;" class="grid-container" >
+                    <template v-if="deviceData.透前称重&&deviceData.干体重&&Number(deviceData.透前称重)>0">
+                      +{{
                         Number(deviceData.透前称重 - deviceData.干体重).toFixed(1)
                       }}
+                    </template>
+                    
                   </div>
                 </div>
                 <div class="item">
-                  <div style="height: 30%;">
+                  <div style="height: 25%;">
                     <div class="container-cord" style="height: 100%;">
-                      <img style="width: 32px;" referrerpolicy="no-referrer" :src="tizhong"
+                      <img style="width: 25px;" referrerpolicy="no-referrer" :src="tizhong"
                       />
                       <span class="text-group_3">增长率</span>
                     </div>
                   </div>
-                  <div style="height: 70%; text-align: center;font-weight: 600;font-size: 60px;color: #333333;" class="grid-container" >
-                    {{ deviceData.体重增长率 }}%
+                  <div style="height: 75%; text-align: center;font-weight: 600;font-size: 50px;color: #333333;" class="grid-container" >
+                    <template v-if="deviceData.透前称重&&deviceData.干体重">
+                      {{ deviceData.体重增长率 }}%
+                    </template>
+                    
                   </div>
                 </div>
             </div>
@@ -338,19 +351,20 @@
               <el-row style="height:100%" :gutter="20">
                 <el-col :span="6" style="height: 100%; ">
                   <div class="item" style="height: 100%;padding-bottom: 10px; gap: 10px; /* 设置所有方向的间距为10px */">
-                    <div style="height: 30%;">
+                    <div style="height: 25%;">
                       <div class="container-cord" style="height: 100%;">
-                        <img style="width: 32px;" referrerpolicy="no-referrer" :src="xinlv"
+                        <img style="width: 25px;" referrerpolicy="no-referrer" :src="xinlv"
                         />
-                        <span class="text-group_3">跨膜压/舒张压</span>
+                        <span class="text-group_3">异常指标</span>
                       </div>
                     
                     </div>
-                    <div style="height: 70%; text-align: center;font-weight: 600;font-size: 60px;color: #333333;" class="grid-container" >
-                      <div>
-                         <span @click="initTupiao" v-if="deviceData.iot_静脉压" style="color: #409eff">{{ deviceData.iot_静脉压 }}</span> /
-                        <span v-if="deviceData.iot_跨膜压" :style="{ color: deviceData.iot_跨膜压 > 200 ? 'red' : '', }" >{{ deviceData.iot_跨膜压 }}</span>
-                      </div>
+                    <div style="height: 75%; text-align: center;font-weight: 600;font-size: 50px;color: #333333;color: #CA7070;"  >
+                      <el-row style="font-size: 30px;">
+                        <el-col v-for="(row,index) in deviceData.异常检验指标" :span="8" style="font-weight: 700;" :key="index">
+                          {{getItemName(row?.项目名称)}} <b v-if="row?.结果标记==='g'" style="font-weight:bold">⬆</b> <b v-else style="font-weight:bold">⬇</b> 
+                        </el-col> 
+                      </el-row>
                     
                     </div>
                   </div>
@@ -370,7 +384,7 @@
               </el-row>
             </div>
             <!-- 消息提示一直显示最新的消息 -->
-            <div  style="height: 30%;width: 100%;background: #FEF0E1;;border-radius: 8px; font-size: 25px;">
+            <div  style="height: 30%;width: 100%;background: #FEF0E1;;border-radius: 8px; font-size: 30px;">
               <div style="height: 100%;">
                 <div class="container-cord" style="height: 100%;padding-left: 20PX;">
                   <img style="width: 25px;"
@@ -378,7 +392,7 @@
                     src="https://lanhu-oss.lanhuapp.com/SketchPng7d7c4e66d2f3fb56cb7c93cf3b359782ee05a12117f39e9b1836bff686aca428"
                   />
                   
-                  <span class="text-group_3" v-if="isinitXy" >
+                  <span class="text-group_3" v-if="isinitXy&&Number(deviceData.透析状态) >= 1" >
                     最近一次, 高压:{{床旁血压计.sbp}},低压: {{床旁血压计.dbp}}, 心率: {{床旁血压计.pulseRate}}
                   </span>
                   <span class="text-group_3" v-else>暂无通知消息哦</span>
@@ -527,6 +541,7 @@
     实时脱水量: 1.65,
     干体重: 69.5,
     年龄: 59,
+    异常检验指标:[],
     性别: "男",
     患者头像:
       "http://dhimg.leon056.com/hemodialysis/face/PAT9090070832211PyVq/face-IMG_20240413_112705.jpg-202404131127536157.jpg",
@@ -880,13 +895,15 @@
   //创建链接对象
   const creatSource = () => {
     // http://testbs.ihemodialysis.com/sse/sseEvent
+    const test='http://testbs.ihemodialysis.com/sse/sseEvent/'
+    // const test='https://backend.ihemodialysis.com/sse/sseEvent/'
           const stateArr = [
           { key: 0, value: "正在链接中" },
           { key: 1, value: "已经链接并且可以通讯" },
           { key: 2, value: "连接已关闭或者没有链接成功" },
           ];
           try {
-          source.value=  new EventSourcePolyfill(`https://backend.ihemodialysis.com/sse/sseEvent/${deviceCode.value}`,{
+          source.value=  new EventSourcePolyfill(`${test}${deviceCode.value}`,{
               heartbeatTimeout:60000
           });
           source.value.onopen = (e) => {
@@ -1404,6 +1421,39 @@
       console.log(deviceData.value);
     }
   };
+  const getItemName=(name:string)=>{
+    if(name){
+      if(name==='血红蛋白测定'){
+        return 'Hgb '
+      }
+      else if(name==='铁蛋白'){
+        return 'Fer '
+      }
+      else if(name==='白蛋白'){
+        return 'Alb '
+      }
+      else if(name==='血清铁蛋白'){
+        return 'SF '
+      }
+      else if(name==='钙'){
+        return 'Ga '
+      }
+      else if(name==='钾'){
+        return 'K '
+      }
+      else if(name==='无机磷'){
+        return 'pi '
+      }
+      else if(name==='甲状旁腺激素'){
+        return 'PTH '
+      }else{
+        return name
+      }
+ 
+    }else{
+      return ''
+    }
+  }
   </script>
 <style lang="less" scoped>
   .divice{
@@ -1524,7 +1574,7 @@
       margin-left:10px;
           font-family: PingFangSC, PingFang SC;
           font-weight: 600;
-          font-size: 26px;
+          font-size: 20px;
       }
   }
   

--
Gitblit v1.8.0