diff --git a/src/components/user-info.vue b/src/components/user-info.vue index 3b939e3..f5251c6 100644 --- a/src/components/user-info.vue +++ b/src/components/user-info.vue @@ -33,14 +33,14 @@ diff --git a/src/stores/remote-ws-store.ts b/src/stores/remote-ws-store.ts index 5499469..e9337be 100644 --- a/src/stores/remote-ws-store.ts +++ b/src/stores/remote-ws-store.ts @@ -48,13 +48,13 @@ export const useRemoteWsStore = defineStore("remoteWs", { Session.set("remoteTasks", this.remoteTasks) }, getRemoteTask() { - if (Session.get("remoteTasks") && !this.remoteTasks) { + if (Session.get("remoteTasks") && this.remoteTasks.length == 0) { this.remoteTasks = Session.get("remoteTasks") } return this.remoteTasks }, initRemoteTask() { - if (Session.get("remoteTasks") && !this.remoteTasks) { + if (Session.get("remoteTasks")) { this.remoteTasks = Session.get("remoteTasks") } if (this.remoteTasks.length <= 0) { @@ -139,7 +139,7 @@ export const useRemoteWsStore = defineStore("remoteWs", { } } else { cb({ - status: 1, + status: 2, msg: "已断开连接" }) } @@ -169,7 +169,7 @@ export const useRemoteWsStore = defineStore("remoteWs", { }, unsubscribeVital(name: string, id: string, date: string, index: number) { const patient: any = this.patient[name + id + date + index] - if (patient) { + if (patient && patient.vitalWS) { patient.vitalWS.onmessage = undefined patient.vitalWS.onclose = undefined patient.vitalWS.onerror = undefined @@ -242,7 +242,7 @@ export const useRemoteWsStore = defineStore("remoteWs", { }, unsubscribeChat(name: string, id: string, date: string, index: number) { const patient: any = this.patient[name + id + date + index] - if (patient) { + if (patient && patient.chatWS) { patient.chatWS.onmessage = undefined patient.chatWS.onclose = undefined patient.chatWS.onerror = undefined @@ -335,7 +335,7 @@ export const useRemoteWsStore = defineStore("remoteWs", { }, unsubscribeMedicine(name: string, id: string, date: string, index: number) { const patient: any = this.patient[name + id + date + index] - if (patient) { + if (patient && patient.medicineWS) { patient.medicineWS.onmessage = undefined patient.medicineWS.onclose = undefined patient.medicineWS.onerror = undefined diff --git a/src/views/login/login.vue b/src/views/login/login.vue index 6211696..2f7ac8d 100644 --- a/src/views/login/login.vue +++ b/src/views/login/login.vue @@ -12,7 +12,7 @@
密码登录 - 验证码登录 +