修复,多个连接,状态提示错误, 并且去除索引

This commit is contained in:
republicline 2025-09-08 12:33:12 +08:00
parent 003fd7881c
commit 5b1b70aa42
2 changed files with 6 additions and 5 deletions

View File

@ -265,7 +265,7 @@ export const useRemoteWsStore = defineStore("remoteWs", {
patient['vitalWS'] = new WebSocket(vitalUrl);
patient['vitalWS'].onopen = () => {
if (index === this.currentTaskIndex) {
ElMessage.info("远程查看,生命体征数据连接成功");
ElMessage.info("远程查看" + (index + 1) + ",生命体征数据连接成功")
}
patient['vitalWS'].send(JSON.stringify({
patientName: name,
@ -278,7 +278,8 @@ export const useRemoteWsStore = defineStore("remoteWs", {
patient['vitalWS'].onerror = () => {
if (index === this.currentTaskIndex) {
ElMessage.error("远程管理,生命体征数据出错");
// ElMessage.error("远程查看" + (index + 1) + "生命体征数据出错")
ElMessage.error("远程查看,生命体征数据出错")
}
};
@ -436,7 +437,7 @@ export const useRemoteWsStore = defineStore("remoteWs", {
patient['chatWS'] = new WebSocket(chatUrl);
patient['chatWS'].onopen = () => {
if (index === this.currentTaskIndex) {
ElMessage.info("远程查看,通讯连接成功");
ElMessage.info("远程查看" + (index + 1) + ",通讯连接成功")
}
patient['chatWS'].send(JSON.stringify({
patientName: name,

View File

@ -376,8 +376,8 @@ const subscribeChat = () => {
messageList.value = msg.history;
}
if (msg.msgType == "destroy") {
// ElMessageBox.confirm('' + (currentIndex + 1) + '', '', {
ElMessageBox.confirm('远程查看' + '已断开与手术室连接', '提示', {
ElMessageBox.confirm('远程查看' + (currentIndex + 1) + '已断开与手术室连接', '提示', {
// ElMessageBox.confirm('' + '', '', {
confirmButtonText: '确认',
type: 'info'
}).then(() => {