mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-24 13:04:57 +08:00
Merge remote-tracking branch 'origin/一期' into 一期
This commit is contained in:
commit
2b5e36d3e4
|
@ -1,5 +1,6 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { Session } from "@/utils/storage";
|
import { Session } from "@/utils/storage";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
const vitalUrl = "ws://localhost:5173/socket.io/admin/rax/vitalSignsMedicine?token=" + Session.getToken()
|
const vitalUrl = "ws://localhost:5173/socket.io/admin/rax/vitalSignsMedicine?token=" + Session.getToken()
|
||||||
const medicineUrl = "ws://localhost:5173/socket.io/admin/rax/addMedicine?token=" + Session.getToken()
|
const medicineUrl = "ws://localhost:5173/socket.io/admin/rax/addMedicine?token=" + Session.getToken()
|
||||||
|
@ -27,7 +28,7 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
||||||
Session.set("currentTaskIndex", i)
|
Session.set("currentTaskIndex", i)
|
||||||
},
|
},
|
||||||
getCurrentTaskIndex() {
|
getCurrentTaskIndex() {
|
||||||
if (Session.get("currentTaskIndex")) {
|
if (Session.get("currentTaskIndex") > -1) {
|
||||||
this.currentTaskIndex = Session.get("currentTaskIndex")
|
this.currentTaskIndex = Session.get("currentTaskIndex")
|
||||||
}
|
}
|
||||||
return this.currentTaskIndex
|
return this.currentTaskIndex
|
||||||
|
@ -103,6 +104,15 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
||||||
date: date
|
date: date
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vitalWS.onclose = () => {
|
||||||
|
ElMessage.info("远程管理" + (index + 1) + "已断开")
|
||||||
|
}
|
||||||
|
|
||||||
|
vitalWS.onerror = () => {
|
||||||
|
ElMessage.error("远程管理" + (index + 1) + "出错")
|
||||||
|
}
|
||||||
|
|
||||||
medicineWS.onopen = function () {
|
medicineWS.onopen = function () {
|
||||||
medicineWS.send(JSON.stringify({
|
medicineWS.send(JSON.stringify({
|
||||||
patientName: name,
|
patientName: name,
|
||||||
|
@ -110,6 +120,15 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
||||||
date: date
|
date: date
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
medicineWS.onclose = () => {
|
||||||
|
ElMessage.info("远程管理" + (index + 1) + "给药已断开")
|
||||||
|
}
|
||||||
|
|
||||||
|
medicineWS.onerror = () => {
|
||||||
|
ElMessage.error("远程管理" + (index + 1) + "给药出错")
|
||||||
|
}
|
||||||
|
|
||||||
chatWS.onopen = function () {
|
chatWS.onopen = function () {
|
||||||
chatWS.send(JSON.stringify({
|
chatWS.send(JSON.stringify({
|
||||||
patientName: name,
|
patientName: name,
|
||||||
|
@ -117,6 +136,15 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
||||||
date: date
|
date: date
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chatWS.onclose = () => {
|
||||||
|
ElMessage.info("远程管理" + (index + 1) + "通讯已断开")
|
||||||
|
}
|
||||||
|
|
||||||
|
chatWS.onerror = () => {
|
||||||
|
ElMessage.error("远程管理" + (index + 1) + "通讯出错")
|
||||||
|
}
|
||||||
|
|
||||||
this.patient[name + id + date + index] = {
|
this.patient[name + id + date + index] = {
|
||||||
vitalWS,
|
vitalWS,
|
||||||
medicineWS,
|
medicineWS,
|
||||||
|
|
|
@ -95,6 +95,7 @@ function subscribeVital() {
|
||||||
emit('addLogAfter', props.index)
|
emit('addLogAfter', props.index)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setLog(data: any, index: number) {
|
function setLog(data: any, index: number) {
|
||||||
|
|
|
@ -180,6 +180,7 @@ function getData() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -218,7 +218,7 @@ const medicineCustom: any[] = [
|
||||||
{ name: '罗库溴铵', plus: 0.1, total: 10 }
|
{ name: '罗库溴铵', plus: 0.1, total: 10 }
|
||||||
]
|
]
|
||||||
const remoteWsStore = useRemoteWsStore()
|
const remoteWsStore = useRemoteWsStore()
|
||||||
const currentRemote = ref(remoteWsStore.getRemoteTask()[remoteWsStore.getCurrentTaskIndex()])
|
const currentRemote = ref()
|
||||||
const userInfo = useUserStore()
|
const userInfo = useUserStore()
|
||||||
|
|
||||||
const chartDom1 = ref(),
|
const chartDom1 = ref(),
|
||||||
|
@ -254,6 +254,7 @@ let currentDocMedicine: any;
|
||||||
const medicineSpeedTemp: any = {};
|
const medicineSpeedTemp: any = {};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
currentRemote.value = remoteWsStore.getRemoteTask()[remoteWsStore.getCurrentTaskIndex()]
|
||||||
if (!currentRemote.value.isRemote) {
|
if (!currentRemote.value.isRemote) {
|
||||||
router.replace('/remote-manage/remote-manage');
|
router.replace('/remote-manage/remote-manage');
|
||||||
return;
|
return;
|
||||||
|
@ -300,6 +301,7 @@ function subscribeWS() {
|
||||||
ElMessage.error(data.msg)
|
ElMessage.error(data.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function initData() {
|
function initData() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user