From 22d317d72b111b71a1830f2b01af293fb0af3060 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期五, 24 一月 2025 18:23:58 +0800
Subject: [PATCH] 34

---
 src/views/Home.vue |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/views/Home.vue b/src/views/Home.vue
index cfede1b..e5e0526 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -574,7 +574,7 @@
   血压高值列表: "152,133,116",
   设备分区类型: 0,
   设备号: "23",
-  设备名称: "23",
+  设备名称: "",
   设备序列号: "B97AP002",
   设备状态列表: [
     {
@@ -864,6 +864,7 @@
 });
 const saveSet=()=>{
   if(deviceCode.value){
+    centerDialogVisible.value=false
     Local.set('devcieCode',deviceCode.value)
     sourceInit()
   }else{
@@ -883,13 +884,14 @@
 );
 //创建链接对象
 const creatSource = () => {
+  // http://testbs.ihemodialysis.com/sse/sseEvent
         const stateArr = [
         { key: 0, value: "正在链接中" },
         { key: 1, value: "已经链接并且可以通讯" },
         { key: 2, value: "连接已关闭或者没有链接成功" },
         ];
         try {
-        source.value=  new EventSourcePolyfill(`http://testbs.ihemodialysis.com/sse/sseEvent/${deviceCode.value}`,{
+        source.value=  new EventSourcePolyfill(`https://backend.ihemodialysis.com/sse/sseEvent/${deviceCode.value}`,{
             heartbeatTimeout:60000
         });
         source.value.onopen = (e) => {
@@ -926,7 +928,12 @@
                     }
                   }else if(dataBody.推送类型==='中央监控大屏信息'){
                     console.log(Date.now() + 'DEV')
-                    deviceData.value=dataBody?.透析状态
+                    if(dataBody?.透析状态){
+                      deviceData.value=dataBody?.透析状态
+                    }else{
+                      deviceData.value.设备名称=dataBody.IOT信息.床号
+                    }
+                    
                     deviceData.value.设备变化=Date.now() + 'DEV'
                     console.log(1)
                     console.log(2)

--
Gitblit v1.8.0