mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2026-06-14 20:31:49 +08:00
远程管理心
This commit is contained in:
parent
aa69fcab6c
commit
5b29674a39
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="referrer" content="no-referrer"/>
|
||||
<title>瑞鞍星医疗科技</title>
|
||||
<title>瑞懿为医疗科技</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ export const constantRoute = [
|
|||
},
|
||||
{
|
||||
path: '/remote-manage/remote-control',
|
||||
name: '远程控制',
|
||||
name: '远程查看',
|
||||
component: () => import('@/views/remote-manage/remote-control.vue'),
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ export const getMenuData = () => {
|
|||
type: '菜单',
|
||||
},{
|
||||
id: '4-2',
|
||||
menuName: '远程控制',
|
||||
menuName: '远程查看',
|
||||
order: 1,
|
||||
icon: '',
|
||||
route: '/patients-manage/surgery-info',
|
||||
|
|
|
|||
|
|
@ -95,13 +95,14 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
createConnect(name: string, id: string, date: string, index: number) {
|
||||
if (!this.patient[name + id + date + index]) {
|
||||
const vitalWS = new WebSocket(vitalUrl)
|
||||
const medicineWS = new WebSocket(medicineUrl)
|
||||
// const medicineWS = new WebSocket(medicineUrl)
|
||||
const chatWS = new WebSocket(chatUrl)
|
||||
vitalWS.onopen = function () {
|
||||
vitalWS.send(JSON.stringify({
|
||||
patientName: name,
|
||||
idNum: id,
|
||||
date: date
|
||||
date: date,
|
||||
msgType: "msg"
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
@ -113,7 +114,16 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
ElMessage.error("远程管理" + (index + 1) + "出错")
|
||||
}
|
||||
|
||||
medicineWS.onopen = function () {
|
||||
vitalWS.onmessage = (e: any) => {
|
||||
if (e && e.data) {
|
||||
const data = JSON.parse(e.data);
|
||||
if (data.msgType == "heartbeat") {
|
||||
vitalWS.send(JSON.stringify({msgType: "heartbeat"}))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* medicineWS.onopen = function () {
|
||||
medicineWS.send(JSON.stringify({
|
||||
patientName: name,
|
||||
idNum: id,
|
||||
|
|
@ -127,13 +137,14 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
|
||||
medicineWS.onerror = () => {
|
||||
ElMessage.error("远程管理" + (index + 1) + "给药出错")
|
||||
}
|
||||
}*/
|
||||
|
||||
chatWS.onopen = function () {
|
||||
chatWS.send(JSON.stringify({
|
||||
patientName: name,
|
||||
idNum: id,
|
||||
date: date
|
||||
date: date,
|
||||
msgType: "msg"
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
@ -145,9 +156,18 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
ElMessage.error("远程管理" + (index + 1) + "通讯出错")
|
||||
}
|
||||
|
||||
chatWS.onmessage = (e: any) => {
|
||||
if (e && e.data) {
|
||||
const data = JSON.parse(e.data);
|
||||
if (data.msgType == "heartbeat") {
|
||||
chatWS.send(JSON.stringify({msgType: "heartbeat"}))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.patient[name + id + date + index] = {
|
||||
vitalWS,
|
||||
medicineWS,
|
||||
// medicineWS,
|
||||
chatWS
|
||||
}
|
||||
}
|
||||
|
|
@ -156,7 +176,7 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
const patient: any = this.patient[name + id + date + index]
|
||||
if (patient) {
|
||||
patient.vitalWS.close()
|
||||
patient.medicineWS.close()
|
||||
// patient.medicineWS.close()
|
||||
patient.chatWS.close()
|
||||
delete this.patient[name + id + date + index]
|
||||
}
|
||||
|
|
@ -164,11 +184,29 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
subscribeVital(name: string, id: string, date: string, index: number, cb: any) {
|
||||
const patient: any = this.patient[name + id + date + index]
|
||||
if (patient) {
|
||||
patient.vitalWS.onmessage = cb
|
||||
patient.vitalWS.onmessage = (e: any) => {
|
||||
if (e && e.data) {
|
||||
const data = JSON.parse(e.data);
|
||||
if (data.msgType == "msg") {
|
||||
cb(e)
|
||||
} else {
|
||||
patient.vitalWS.send(JSON.stringify({msgType: "heartbeat"}))
|
||||
}
|
||||
}
|
||||
}
|
||||
patient.vitalCB = cb
|
||||
} else {
|
||||
this.createConnect(name, id, date, index)
|
||||
this.patient[name + id + date + index].vitalWS.onmessage = cb
|
||||
this.patient[name + id + date + index].vitalWS.onmessage = (e: any) => {
|
||||
if (e && e.data) {
|
||||
const data = JSON.parse(e.data);
|
||||
if (data.msgType == "msg") {
|
||||
cb(e)
|
||||
} else {
|
||||
this.patient[name + id + date + index].vitalWS.send(JSON.stringify({msgType: "heartbeat"}))
|
||||
}
|
||||
}
|
||||
}
|
||||
this.patient[name + id + date + index].vitalCB = cb
|
||||
}
|
||||
},
|
||||
|
|
@ -190,7 +228,8 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
patientName: name,
|
||||
idNum: id,
|
||||
date: date,
|
||||
msg
|
||||
msg,
|
||||
msgType: "msg"
|
||||
}
|
||||
patient.chatWS.send(JSON.stringify(params))
|
||||
cb({
|
||||
|
|
@ -207,7 +246,16 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
const patient: any = this.patient[name + id + date + index]
|
||||
if (patient) {
|
||||
patient.chatCB = cb
|
||||
patient.chatWS.onmessage = cb
|
||||
patient.chatWS.onmessage = (e: any) => {
|
||||
if (e && e.data) {
|
||||
const data = JSON.parse(e.data);
|
||||
if (data.msgType == "msg") {
|
||||
cb(e)
|
||||
} else {
|
||||
patient.chatWS.send(JSON.stringify({msgType: "heartbeat"}))
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cb({
|
||||
status: 1,
|
||||
|
|
@ -240,7 +288,8 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
date: args.date,
|
||||
flag: args.flag,
|
||||
medicine: args.medicine,
|
||||
value: args.value
|
||||
value: args.value,
|
||||
msgType: "msg"
|
||||
}
|
||||
patient.medicineWS.send(JSON.stringify(params))
|
||||
cb({
|
||||
|
|
@ -257,7 +306,16 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
const patient = this.patient[name + id + date + index]
|
||||
if (patient) {
|
||||
patient.medicineCB = cb
|
||||
patient.medicineWS.onmessage = cb
|
||||
patient.medicineWS.onmessage = (e: any) => {
|
||||
if (e && e.data) {
|
||||
const data = JSON.parse(e.data);
|
||||
if (data.msgType == "msg") {
|
||||
cb(e)
|
||||
} else {
|
||||
patient.medicineWS.send(JSON.stringify({msgType: "heartbeat"}))
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cb({
|
||||
status: 1,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export const useUserStore = defineStore('login', {
|
|||
actions: {
|
||||
getlogin() {
|
||||
const onlineUser = Session.get("onlineUser");
|
||||
return this.userInfo.account ? this.userInfo : onlineUser
|
||||
return this.userInfo.account && this.userInfo.account != null ? this.userInfo : onlineUser
|
||||
},
|
||||
setlogin(key: string, e: any) {
|
||||
this.userInfo[key] = e
|
||||
|
|
|
|||
|
|
@ -7,20 +7,20 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="住院号" prop="住院号" :label-width="rightWidth">
|
||||
<el-input v-model="formData.住院号" readonly placeholder="请输入住院号"></el-input>
|
||||
<el-form-item label="证件号" prop="住院号" :label-width="rightWidth">
|
||||
<el-input v-model="formData.住院号" readonly placeholder="请输入"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="gutter">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="性别">
|
||||
<el-input v-model="formData.性别" readonly placeholder="请输入住院号" ></el-input>
|
||||
<el-input v-model="formData.性别" readonly placeholder="请输入" ></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="科室" prop="科室" :label-width="rightWidth">
|
||||
<el-input v-model="formData.科室" readonly placeholder="请输入住院号" ></el-input>
|
||||
<el-input v-model="formData.科室" readonly placeholder="请输入" ></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -103,7 +103,7 @@ const rules = reactive({
|
|||
{required: true, message: '请输入姓名', trigger: ['blur', 'change']},
|
||||
],
|
||||
code: [
|
||||
{required: true, message: '请输入住院号', trigger: ['blur', 'change']},
|
||||
{required: true, message: '请输入证件号', trigger: ['blur', 'change']},
|
||||
],
|
||||
dept: [
|
||||
{required: true, message: '请选择科室', trigger: ['blur', 'change']},
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
@row-click="tableRowClick">
|
||||
<!-- <el-table-column type="selection" width="55"/>-->
|
||||
<el-table-column type="index" label="#" width="55" align="center"/>
|
||||
<el-table-column property="住院号" label="住院号" width="120" align="center"/>
|
||||
<el-table-column property="住院号" label="证件号" width="120" align="center"/>
|
||||
<el-table-column property="姓名" label="姓名" width="120" align="center"/>
|
||||
<el-table-column label="手机号" width="220" align="center">
|
||||
<template #default="scope">
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
</el-select>
|
||||
</div>
|
||||
<div class="search-cell">
|
||||
<span class="label">住院号</span>
|
||||
<span class="label">证件号</span>
|
||||
<el-input v-model="queryParams.code" placeholder="请输入"></el-input>
|
||||
</div>
|
||||
<div class="search-cell">
|
||||
|
|
@ -218,7 +218,7 @@ async function queryData(e: any) {
|
|||
tableData.value = []
|
||||
|
||||
if (!e.code) {
|
||||
ElMessage.warning('住院号为必填项!')
|
||||
ElMessage.warning('证件号为必填项!')
|
||||
return
|
||||
}
|
||||
if (!queryParams.value.type) {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<el-form-item class="input-box" ><span>输入病人姓名:</span>
|
||||
<el-input v-model="patientInfo.patient"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="input-box" ><span>输入病人住院号:</span>
|
||||
<el-form-item class="input-box" ><span>输入病人证件号:</span>
|
||||
<el-input v-model="patientInfo.patientId"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <p class="input-box"><span>请选择手术时间:</span>-->
|
||||
|
|
@ -66,7 +66,7 @@ const confirmRemote = () => {
|
|||
if (patientInfo.value.patientId && patientInfo.value.patient) {
|
||||
ElMessage.success('连接成功!')
|
||||
patientInfo.value.isRemote = true
|
||||
patientInfo.value.taskName = '远程控制' + (patientInfo.value.index + 1)
|
||||
patientInfo.value.taskName = '远程查看' + (patientInfo.value.index + 1)
|
||||
patientInfo.value.date = dateFormater("yyyyMMdd", patientInfo.value.date)
|
||||
unsubscribeLastTask();
|
||||
remoteWsStore.setCurrentTaskIndex(patientInfo.value.index)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="remote-item-part">
|
||||
<div class="title">
|
||||
<span>{{ remoteTask.taskName || '远程控制' }}</span>
|
||||
<span>{{ remoteTask.taskName || '远程查看' }}</span>
|
||||
</div>
|
||||
<div class="content mini" :class="{ 'is-total': remoteTask.isRemote }">
|
||||
<div class="left-box">
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<span class="input-value">{{ remoteTask.patient }}</span>
|
||||
</div>
|
||||
<div class="row-item">
|
||||
<span class="label">住院号</span>
|
||||
<span class="label">证件号</span>
|
||||
<span class="input-value">{{ remoteTask.patientId }}</span>
|
||||
</div>
|
||||
<div class="row-item">
|
||||
|
|
@ -104,10 +104,11 @@ function wsClose() {
|
|||
remoteWsStore.vitalOnclose(remoteTask.value.patient, remoteTask.value.patientId, remoteTask.value.date, props.index, () => {
|
||||
if (reconnectTime < 3) {
|
||||
remoteWsStore.createConnect(remoteTask.value.patient, remoteTask.value.patientId, remoteTask.value.date, props.index)
|
||||
setTimeout(() => {
|
||||
subscribeVital()
|
||||
wsClose()
|
||||
} else {
|
||||
reconnectTime = 0
|
||||
}, 3000)
|
||||
reconnectTime++
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -138,6 +139,7 @@ $size: 20px;
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
border: 1px solid $border-color;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
|
|
@ -149,6 +151,7 @@ $size: 20px;
|
|||
transition: all .6s;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
&::after {
|
||||
background-color: rgba(black, .1);
|
||||
|
|
@ -239,7 +242,7 @@ $size: 20px;
|
|||
}
|
||||
|
||||
.label {
|
||||
width: calc(50% - $size*0.5);
|
||||
width: calc(50% - $size * 0.5);
|
||||
}
|
||||
|
||||
.value {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="remote-part">
|
||||
<div class="title">
|
||||
<span>{{ remoteItem?.taskName || '远程控制' }}</span>
|
||||
<span>{{ remoteItem?.taskName || '远程查看' }}</span>
|
||||
<el-button v-if="remoteItem?.taskName" class="break-btn" @click="breakRemote">断开连接</el-button>
|
||||
</div>
|
||||
<!-- 小分辨率 -->
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
<span class="input-value">{{ remoteItem.patient }}</span>
|
||||
</div>
|
||||
<div class="row-item">
|
||||
<span class="label">住院号</span>
|
||||
<span class="label">证件号</span>
|
||||
<span class="input-value">{{ remoteItem.patientId }}</span>
|
||||
</div>
|
||||
<div class="row-item">
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
<span class="input-value">{{ remoteItem?.patient }}</span>
|
||||
</div>
|
||||
<div class="row-item">
|
||||
<span class="label">住院号</span>
|
||||
<span class="label">证件号</span>
|
||||
<span class="input-value">{{ remoteItem?.patientId }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@
|
|||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column prop="total" label="累计药量(ml)" width="100"/>
|
||||
<el-table-column prop="state" label="工作状态" width="150" align="center"/>
|
||||
<!-- <el-table-column prop="state" label="工作状态" width="150" align="center"/>-->
|
||||
<!-- <el-table-column label="特殊情况人为干预" align="center">
|
||||
<template #default="scope">
|
||||
<div class="table-btn-box">
|
||||
|
|
@ -143,7 +143,7 @@
|
|||
<el-table-column prop="name" label="药物名称" align="center"/>
|
||||
<el-table-column prop="speed" label="速度(ml/h)" width="100"/>
|
||||
<el-table-column prop="total" label="累计药量(ml)" width="100"/>
|
||||
<el-table-column prop="state" label="工作状态" width="150" align="center"/>
|
||||
<!-- <el-table-column prop="state" label="工作状态" width="150" align="center"/>-->
|
||||
<!-- <el-table-column label="特殊情况人为干预" align="center">
|
||||
<template #default="scope">
|
||||
<div class="table-btn-box">
|
||||
|
|
@ -268,7 +268,7 @@ onMounted(() => {
|
|||
onUnmounted(() => {
|
||||
const index = remoteWsStore.getCurrentTaskIndex()
|
||||
remoteWsStore.unsubscribeChat(currentRemote.value.patient, currentRemote.value.patientId, currentRemote.value.date, index);
|
||||
remoteWsStore.unsubscribeMedicine(currentRemote.value.patient, currentRemote.value.patientId, currentRemote.value.date, index);
|
||||
// remoteWsStore.unsubscribeMedicine(currentRemote.value.patient, currentRemote.value.patientId, currentRemote.value.date, index);
|
||||
remoteWsStore.unsubscribeVital(currentRemote.value.patient, currentRemote.value.patientId, currentRemote.value.date, index);
|
||||
})
|
||||
|
||||
|
|
@ -289,7 +289,7 @@ function subscribeWS() {
|
|||
mssageList.value.push(JSON.parse(res.data));
|
||||
})
|
||||
|
||||
remoteWsStore.subscribeMedicine(currentRemote.value.patient, currentRemote.value.patientId, currentRemote.value.date, index,
|
||||
/*remoteWsStore.subscribeMedicine(currentRemote.value.patient, currentRemote.value.patientId, currentRemote.value.date, index,
|
||||
function (res: any) {
|
||||
const data = JSON.parse(res.data);
|
||||
if (data.status != 1) {
|
||||
|
|
@ -300,7 +300,7 @@ function subscribeWS() {
|
|||
} else {
|
||||
ElMessage.error(data.msg)
|
||||
}
|
||||
})
|
||||
})*/
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -456,13 +456,13 @@ const setDatabase = () => {
|
|||
|
||||
const viewPatientInfo = () => {
|
||||
isPatientDialog.value = true;
|
||||
// getPatientInfo(currentRemote.value.patient, currentRemote.value.patientId,
|
||||
// currentRemote.value.date).then(res => {
|
||||
// if (res.code == 0) {
|
||||
// patientsFormRef.value.resetData()
|
||||
// patientsFormRef.value.formData = JSON.parse(JSON.stringify(res.data))
|
||||
// }
|
||||
// })
|
||||
/*getPatientInfo(currentRemote.value.patient, currentRemote.value.patientId,
|
||||
currentRemote.value.date).then(res => {
|
||||
if (res.code == 0) {
|
||||
patientsFormRef.value.resetData()
|
||||
patientsFormRef.value.formData = JSON.parse(JSON.stringify(res.data))
|
||||
}
|
||||
})*/
|
||||
getPatientInfoM(currentRemote.value.patient, currentRemote.value.patientId,
|
||||
currentRemote.value.date).then(res => {
|
||||
if (res.code == 0) {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ const editTask = (item: any) => {
|
|||
remoteDialogRef.value.open(item.index)
|
||||
}
|
||||
}
|
||||
// 跳转到远程控制
|
||||
// 跳转到远程查看
|
||||
const toRemoteControl = (item: any) => {
|
||||
// 如果当前任务是已连接状态则跳转,否则打开弹窗
|
||||
if (item.isRemote) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user