mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-23 20:44:58 +08:00
远程生命体征断开报错
This commit is contained in:
parent
2ca8b04bd6
commit
30b7e00b38
|
@ -126,7 +126,7 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
},
|
||||
subscribeVital(name: string, id: string, date: string, index: number, cb: any) {
|
||||
const patient = this.patient[name + id + date + index]
|
||||
if (patient.vitalWS) {
|
||||
if (patient && patient.vitalWS) {
|
||||
patient.vitalWS.onmessage = (e: any) => {
|
||||
if (e && e.data) {
|
||||
const data = JSON.parse(e.data);
|
||||
|
@ -146,11 +146,13 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
},
|
||||
vitalOnclose(name: string, id: string, date: string, index: number, cb: any) {
|
||||
const patient = this.patient[name + id + date + index]
|
||||
patient.vitalWS.onclose = () => {
|
||||
const status = this.getCloseStatus()
|
||||
if (!status[name + id + date + index + 'vitalWS']) {
|
||||
delete patient.vitalWS
|
||||
cb()
|
||||
if (patient && patient.vitalWS) {
|
||||
patient.vitalWS.onclose = () => {
|
||||
const status = this.getCloseStatus()
|
||||
if (!status[name + id + date + index + 'vitalWS']) {
|
||||
delete patient.vitalWS
|
||||
cb()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -207,9 +207,7 @@ function setLog(data: any) {
|
|||
const breakRemote = () => {
|
||||
remoteWsStore.disconnect(remoteItem.value.patient, remoteItem.value.patientId, remoteItem.value.date, remoteItem.value.index)
|
||||
remoteWsStore.resetRemoteTask(remoteWsStore.getCurrentTaskIndex())
|
||||
if (remoteWsStore.getActiveRemoteTask()) {
|
||||
showData(remoteWsStore.getActiveRemoteTask())
|
||||
}
|
||||
showData(remoteWsStore.getActiveRemoteTask())
|
||||
emit('breakRemote')
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user