mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-24 04:54: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) {
|
subscribeVital(name: string, id: string, date: string, index: number, cb: any) {
|
||||||
const patient = this.patient[name + id + date + index]
|
const patient = this.patient[name + id + date + index]
|
||||||
if (patient.vitalWS) {
|
if (patient && patient.vitalWS) {
|
||||||
patient.vitalWS.onmessage = (e: any) => {
|
patient.vitalWS.onmessage = (e: any) => {
|
||||||
if (e && e.data) {
|
if (e && e.data) {
|
||||||
const data = JSON.parse(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) {
|
vitalOnclose(name: string, id: string, date: string, index: number, cb: any) {
|
||||||
const patient = this.patient[name + id + date + index]
|
const patient = this.patient[name + id + date + index]
|
||||||
patient.vitalWS.onclose = () => {
|
if (patient && patient.vitalWS) {
|
||||||
const status = this.getCloseStatus()
|
patient.vitalWS.onclose = () => {
|
||||||
if (!status[name + id + date + index + 'vitalWS']) {
|
const status = this.getCloseStatus()
|
||||||
delete patient.vitalWS
|
if (!status[name + id + date + index + 'vitalWS']) {
|
||||||
cb()
|
delete patient.vitalWS
|
||||||
|
cb()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -207,9 +207,7 @@ function setLog(data: any) {
|
||||||
const breakRemote = () => {
|
const breakRemote = () => {
|
||||||
remoteWsStore.disconnect(remoteItem.value.patient, remoteItem.value.patientId, remoteItem.value.date, remoteItem.value.index)
|
remoteWsStore.disconnect(remoteItem.value.patient, remoteItem.value.patientId, remoteItem.value.date, remoteItem.value.index)
|
||||||
remoteWsStore.resetRemoteTask(remoteWsStore.getCurrentTaskIndex())
|
remoteWsStore.resetRemoteTask(remoteWsStore.getCurrentTaskIndex())
|
||||||
if (remoteWsStore.getActiveRemoteTask()) {
|
showData(remoteWsStore.getActiveRemoteTask())
|
||||||
showData(remoteWsStore.getActiveRemoteTask())
|
|
||||||
}
|
|
||||||
emit('breakRemote')
|
emit('breakRemote')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user