| | |
| | | sockteStore().setweightState(resultInfo.status) |
| | | break |
| | | case "血压计": |
| | | sockteStore().setxyjSockte( |
| | | { |
| | | deviceName:resultInfo.deviceName, |
| | | type:"血压计", |
| | | result:resultInfo.result, |
| | | resultTime:resultInfo.resultTime, |
| | | state:0 |
| | | } |
| | | ) |
| | | sockteStore().setXtjState(resultInfo.status) |
| | | break |
| | | default: |
| | | console.log('有配置类型没有匹配') |
| | |
| | | } |
| | | } |
| | | const connectCallback=function(){ |
| | | const pcName= os.hostname() |
| | | const pcName= sockteStore().pcName |
| | | // 订阅患者信息服务 |
| | | if(stompClient!==null){ |
| | | // 订阅患者信息事件 |
| | | stompClient.subscribe(`/queue/patient/info/${pcName}`,PatientCallback) |
| | | // 订阅配置文件事件 |
| | | stompClient.subscribe(`/queue/workstation/config/set/${clientCode}/${pcName}`,configCallback) |
| | | // 发送配置文件到服务端 |
| | | stompClient.send(`/app/workstation/config/set/${clientCode}/${pcName}`,{},JSON.stringify({"clientCode":clientCode,"machineName":pcName})) |
| | | |
| | | } |
| | |
| | | devices.forEach(de=>{ |
| | | if(stompClient!==null){ |
| | | stompClient.subscribe(`/queue/${clientCode}/${de.deviceName}/result`,callback) |
| | | // /queue/{clientCode}/{deviceName}/keepalive |
| | | // stompClient.subscribe(`/queue/${clientCode}/${de.deviceName}/keepalive`,callbackState) |
| | | stompClient.subscribe(`/queue/${clientCode}/${de.deviceName}/keepalive`,callbackState) |
| | | stompClient.send(`/app/device/request/${clientCode}/${de.deviceName}`, {}, JSON.stringify({"deviceNumber":de.deviceName})); |
| | | |
| | | } |
| | |
| | | * @param codeStr |
| | | */ |
| | | const sendPationCode=(codeStr:string)=>{ |
| | | const pcName= sockteStore().pcName |
| | | const mode={ |
| | | clientCode:clientCode, |
| | | queryCode:codeStr |
| | | } |
| | | if(stompClient!==null){ |
| | | stompClient.send(`/app/patient/info/get/${os.hostname()}`,{},JSON.stringify(mode)) |
| | | stompClient.send(`/app/patient/info/get/${pcName}`,{},JSON.stringify(mode)) |
| | | } |
| | | } |
| | | /** |