chenyc
2025-08-07 2191b6011fdab3b76344fc2447b8b6aaa972b6c1
src/samples/sockteStomp.ts
@@ -1,6 +1,5 @@
import Stomp from 'stompjs'
import os from 'os'
import { ipcRenderer } from 'electron'
let stompClient: Stomp.Client | null=null
import { confingInfoStore } from '@/stores/StoresConfing'
@@ -79,12 +78,13 @@
}
const writePatient=(resultInfo:any)=>{
    // 给一个时间变化
    const da=new Date().toTimeString()
    const da=new Date()
    console.log(da)
    const info={
        id:resultInfo.patientInfo===null?0:resultInfo.patientInfo.id,
        code:resultInfo.patientInfo===null?'':resultInfo.patientInfo.code,
        name:resultInfo.patientInfo===null?'':resultInfo.patientInfo.patientName,
        patientNamePyFull:resultInfo.patientInfo===null?'':resultInfo.patientInfo.patientNamePyFull,
        patientAvatarIcon:resultInfo.patientInfo===null?'':resultInfo.patientInfo.patientAvatarIcon,
        deviceCode:resultInfo.deviceCode===null?"":resultInfo.deviceCode,
        patientGender:resultInfo.patientInfo.patientGender,
@@ -95,6 +95,7 @@
        isScheduled:resultInfo.isScheduled,
        isAfterMed:resultInfo.isAfterMed,
        deviceNo:resultInfo.deviceNo,
        设备分区名称:resultInfo.设备分区名称,
        preWeight:resultInfo.preWeight,
        // s上次体重
        lastTimeAfterWeight:resultInfo.lastTimeAfterWeight,
@@ -103,7 +104,9 @@
        txq:resultInfo.txq,
        medMethod:resultInfo.medMethod,
        glq:resultInfo.glq,
        preBP:resultInfo.preBP
        preBP:resultInfo.preBP,
        nextRecordDate:resultInfo.nextRecordDate,
        actuallyClliang:resultInfo.actuallyClliang
    }
    // 写入vuex里
    patientInfoStore().setpatientInfo(info)
@@ -170,7 +173,7 @@
// 创建客户端链接
const creatorClient=(configObj:any)=>{
    config=configObj
    devices=configObj.deviceList
    // devices=configObj.deviceList
    clientCode=configObj.clientCode
    console.log(devices,'设备列表','chong')
    const socket = new WebSocket('ws://hemobs.icoldchain.cn/broadcast')