mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-24 04:54:58 +08:00
This commit is contained in:
parent
edbdfef3c9
commit
27c736c802
|
@ -35,6 +35,7 @@ import RemotePart from './part/remote-part.vue'
|
|||
import MessagePart from './part/message-part.vue'
|
||||
import {Client} from "@stomp/stompjs";
|
||||
import {Session} from "@/utils/storage";
|
||||
import {wsApi} from "@/api/ws";
|
||||
|
||||
const router = useRouter()
|
||||
const remoteStore = useRemoteStore()
|
||||
|
@ -147,7 +148,7 @@ const addLogAfter = () => {
|
|||
messagePartRef.value.scrollToBottom()
|
||||
}
|
||||
|
||||
const surgeryClient = new Client({
|
||||
/*const surgeryClient = new Client({
|
||||
brokerURL: 'ws://localhost:5173/socket.io/admin/rax/SurgeryData',
|
||||
connectHeaders: {
|
||||
token: Session.get('token')
|
||||
|
@ -184,9 +185,9 @@ function getSurgeryData(username: string, db: string) {
|
|||
surgeryClient.subscribe('/topic/user/' + account + ":" + db + '/surgeryData', (data: any) => {
|
||||
console.log(data);
|
||||
})
|
||||
}
|
||||
}*/
|
||||
|
||||
function disconnectSurgeryData(username: string, db: string) {
|
||||
/*function disconnectSurgeryData(username: string, db: string) {
|
||||
const account = "admin";
|
||||
surgeryClient.unsubscribe("/topic/user/" + account + ":" + db + "/surgeryData");
|
||||
}
|
||||
|
@ -220,14 +221,20 @@ function sendChatMessage() {
|
|||
},
|
||||
body: JSON.stringify(message)
|
||||
})
|
||||
}
|
||||
}*/
|
||||
|
||||
chatClient.onConnect = () => {
|
||||
/*chatClient.onConnect = () => {
|
||||
chatClient.subscribe('/topic/user/' + patientName + idNum + date + '/chatroomMessage', (data: any) => {
|
||||
console.log(data)
|
||||
})
|
||||
}
|
||||
}*/
|
||||
|
||||
wsApi.init("ws://localhost:5173/socket.io/admin/vitalSignsMedicine").then(() => {
|
||||
|
||||
})
|
||||
wsApi.openListener((cb: any) => {
|
||||
console.log(cb)
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user