| | |
| | | // 更新sockte链接状态 |
| | | sockteStore().setsockteIsLink(true) |
| | | console.log(sockteStore().isLink) |
| | | if(devices!==undefined &&devices!=null&&devices.length>0){ |
| | | // 更新sockte链接状态 |
| | | sockteStore().setsockteIsLink(true) |
| | | console.log(sockteStore().isLink) |
| | | console.log(devices) |
| | | if(devices!==undefined&&devices!=null &&devices!=null &&devices.length>0){ |
| | | devices.forEach(de=>{ |
| | | if(stompClient!==null){ |
| | | stompClient.subscribe(`/queue/${clientCode}/${de.deviceName}/result`,callback) |
| | | stompClient.subscribe(`/queue/${clientCode}/${de.deviceName}/keepalive`,callbackState) |
| | | stompClient.send(`/app/device/request/${clientCode}/${de.deviceName}`, {}, JSON.stringify({"deviceNumber":de.deviceName})); |
| | | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | // sockte订阅服务关闭完全有post 来代替 |
| | | // if(devices!==undefined &&devices!=null&&devices.length>0){ |
| | | // // 更新sockte链接状态 |
| | | // sockteStore().setsockteIsLink(true) |
| | | // console.log(sockteStore().isLink) |
| | | // console.log(devices) |
| | | // if(devices!==undefined&&devices!=null &&devices!=null &&devices.length>0){ |
| | | // devices.forEach(de=>{ |
| | | // if(stompClient!==null){ |
| | | // console.log() |
| | | // stompClient.subscribe(`/queue/${clientCode}/${de.deviceName}/result`,callback) |
| | | // stompClient.subscribe(`/queue/${clientCode}/${de.deviceName}/keepalive`,callbackState) |
| | | // stompClient.send(`/app/device/request/${clientCode}/${de.deviceName}`, {}, JSON.stringify({"deviceNumber":de.deviceName})); |
| | | // } |
| | | // }) |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | const error_callback=function(error:any){ |
| | |
| | | stompClient.send(`/app/patient/info/set`,{},JSON.stringify(mode)) |
| | | } |
| | | } |
| | | export {creatorClient,sendPationCode,sendPationSet} |
| | | export {creatorClient,sendPationCode,sendPationSet,writeResult} |