679
chenyc
2022-09-27 efb29dd72dfb4349869d0e7459490309ab47a2c1
src/samples/sockteStomp.ts
@@ -151,7 +151,6 @@
}
const PatientCallback=function(message:any){
    if (message.body) {
        console.log('00000000000000',message.body)
        const data=JSON.parse(message.body)
        console.log(data,'患者信息读取')
        writePatient(data)
@@ -178,9 +177,9 @@
        // 订阅患者信息事件
        stompClient.subscribe(`/queue/patient/info/${pcName}`,PatientCallback)
        // 订阅配置文件事件
        stompClient.subscribe(`/queue/workstation/config/set/${clientCode}/${pcName}`,configCallback)
        // stompClient.subscribe(`/queue/workstation/config/set/${clientCode}/${pcName}`,configCallback)
        // 发送配置文件到服务端
        stompClient.send(`/app/workstation/config/set/${clientCode}/${pcName}`,{},JSON.stringify({"clientCode":clientCode,"machineName":pcName}))
        // stompClient.send(`/app/workstation/config/set/${clientCode}/${pcName}`,{},JSON.stringify({"clientCode":clientCode,"machineName":pcName}))
        
    }
    // 更新sockte链接状态