远程管理心

This commit is contained in:
yy 2024-05-30 20:50:03 +08:00
parent aa69fcab6c
commit 5b29674a39
13 changed files with 405 additions and 344 deletions

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer"/> <meta name="referrer" content="no-referrer"/>
<title>鞍星医疗科技</title> <title>懿为医疗科技</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -77,7 +77,7 @@ export const constantRoute = [
}, },
{ {
path: '/remote-manage/remote-control', path: '/remote-manage/remote-control',
name: '远程控制', name: '远程查看',
component: () => import('@/views/remote-manage/remote-control.vue'), component: () => import('@/views/remote-manage/remote-control.vue'),
} }
] ]

View File

@ -101,7 +101,7 @@ export const getMenuData = () => {
type: '菜单', type: '菜单',
},{ },{
id: '4-2', id: '4-2',
menuName: '远程控制', menuName: '远程查看',
order: 1, order: 1,
icon: '', icon: '',
route: '/patients-manage/surgery-info', route: '/patients-manage/surgery-info',

View File

@ -95,13 +95,14 @@ export const useRemoteWsStore = defineStore("remoteWs", {
createConnect(name: string, id: string, date: string, index: number) { createConnect(name: string, id: string, date: string, index: number) {
if (!this.patient[name + id + date + index]) { if (!this.patient[name + id + date + index]) {
const vitalWS = new WebSocket(vitalUrl) const vitalWS = new WebSocket(vitalUrl)
const medicineWS = new WebSocket(medicineUrl) // const medicineWS = new WebSocket(medicineUrl)
const chatWS = new WebSocket(chatUrl) const chatWS = new WebSocket(chatUrl)
vitalWS.onopen = function () { vitalWS.onopen = function () {
vitalWS.send(JSON.stringify({ vitalWS.send(JSON.stringify({
patientName: name, patientName: name,
idNum: id, idNum: id,
date: date date: date,
msgType: "msg"
})) }))
} }
@ -113,7 +114,16 @@ export const useRemoteWsStore = defineStore("remoteWs", {
ElMessage.error("远程管理" + (index + 1) + "出错") 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({ medicineWS.send(JSON.stringify({
patientName: name, patientName: name,
idNum: id, idNum: id,
@ -127,13 +137,14 @@ export const useRemoteWsStore = defineStore("remoteWs", {
medicineWS.onerror = () => { medicineWS.onerror = () => {
ElMessage.error("远程管理" + (index + 1) + "给药出错") ElMessage.error("远程管理" + (index + 1) + "给药出错")
} }*/
chatWS.onopen = function () { chatWS.onopen = function () {
chatWS.send(JSON.stringify({ chatWS.send(JSON.stringify({
patientName: name, patientName: name,
idNum: id, idNum: id,
date: date date: date,
msgType: "msg"
})) }))
} }
@ -145,9 +156,18 @@ export const useRemoteWsStore = defineStore("remoteWs", {
ElMessage.error("远程管理" + (index + 1) + "通讯出错") 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] = { this.patient[name + id + date + index] = {
vitalWS, vitalWS,
medicineWS, // medicineWS,
chatWS chatWS
} }
} }
@ -156,7 +176,7 @@ export const useRemoteWsStore = defineStore("remoteWs", {
const patient: any = this.patient[name + id + date + index] const patient: any = this.patient[name + id + date + index]
if (patient) { if (patient) {
patient.vitalWS.close() patient.vitalWS.close()
patient.medicineWS.close() // patient.medicineWS.close()
patient.chatWS.close() patient.chatWS.close()
delete this.patient[name + id + date + index] 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) { subscribeVital(name: string, id: string, date: string, index: number, cb: any) {
const patient: any = this.patient[name + id + date + index] const patient: any = this.patient[name + id + date + index]
if (patient) { 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 patient.vitalCB = cb
} else { } else {
this.createConnect(name, id, date, index) 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 this.patient[name + id + date + index].vitalCB = cb
} }
}, },
@ -190,7 +228,8 @@ export const useRemoteWsStore = defineStore("remoteWs", {
patientName: name, patientName: name,
idNum: id, idNum: id,
date: date, date: date,
msg msg,
msgType: "msg"
} }
patient.chatWS.send(JSON.stringify(params)) patient.chatWS.send(JSON.stringify(params))
cb({ cb({
@ -207,7 +246,16 @@ export const useRemoteWsStore = defineStore("remoteWs", {
const patient: any = this.patient[name + id + date + index] const patient: any = this.patient[name + id + date + index]
if (patient) { if (patient) {
patient.chatCB = cb 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 { } else {
cb({ cb({
status: 1, status: 1,
@ -240,7 +288,8 @@ export const useRemoteWsStore = defineStore("remoteWs", {
date: args.date, date: args.date,
flag: args.flag, flag: args.flag,
medicine: args.medicine, medicine: args.medicine,
value: args.value value: args.value,
msgType: "msg"
} }
patient.medicineWS.send(JSON.stringify(params)) patient.medicineWS.send(JSON.stringify(params))
cb({ cb({
@ -257,7 +306,16 @@ export const useRemoteWsStore = defineStore("remoteWs", {
const patient = this.patient[name + id + date + index] const patient = this.patient[name + id + date + index]
if (patient) { if (patient) {
patient.medicineCB = cb 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 { } else {
cb({ cb({
status: 1, status: 1,

View File

@ -29,7 +29,7 @@ export const useUserStore = defineStore('login', {
actions: { actions: {
getlogin() { getlogin() {
const onlineUser = Session.get("onlineUser"); 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) { setlogin(key: string, e: any) {
this.userInfo[key] = e this.userInfo[key] = e

View File

@ -7,20 +7,20 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="住院号" prop="住院号" :label-width="rightWidth"> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="gutter"> <el-row :gutter="gutter">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="性别" prop="性别"> <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-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="科室" prop="科室" :label-width="rightWidth"> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -103,7 +103,7 @@ const rules = reactive({
{required: true, message: '请输入姓名', trigger: ['blur', 'change']}, {required: true, message: '请输入姓名', trigger: ['blur', 'change']},
], ],
code: [ code: [
{required: true, message: '请输入住院号', trigger: ['blur', 'change']}, {required: true, message: '请输入证件号', trigger: ['blur', 'change']},
], ],
dept: [ dept: [
{required: true, message: '请选择科室', trigger: ['blur', 'change']}, {required: true, message: '请选择科室', trigger: ['blur', 'change']},

View File

@ -28,7 +28,7 @@
@row-click="tableRowClick"> @row-click="tableRowClick">
<!-- <el-table-column type="selection" width="55"/>--> <!-- <el-table-column type="selection" width="55"/>-->
<el-table-column type="index" label="#" width="55" align="center"/> <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 property="姓名" label="姓名" width="120" align="center"/>
<el-table-column label="手机号" width="220" align="center"> <el-table-column label="手机号" width="220" align="center">
<template #default="scope"> <template #default="scope">

View File

@ -24,7 +24,7 @@
</el-select> </el-select>
</div> </div>
<div class="search-cell"> <div class="search-cell">
<span class="label">住院</span> <span class="label">证件</span>
<el-input v-model="queryParams.code" placeholder="请输入"></el-input> <el-input v-model="queryParams.code" placeholder="请输入"></el-input>
</div> </div>
<div class="search-cell"> <div class="search-cell">
@ -218,7 +218,7 @@ async function queryData(e: any) {
tableData.value = [] tableData.value = []
if (!e.code) { if (!e.code) {
ElMessage.warning('住院号为必填项!') ElMessage.warning('证件号为必填项!')
return return
} }
if (!queryParams.value.type) { if (!queryParams.value.type) {

View File

@ -13,7 +13,7 @@
<el-form-item class="input-box" ><span>输入病人姓名</span> <el-form-item class="input-box" ><span>输入病人姓名</span>
<el-input v-model="patientInfo.patient"></el-input> <el-input v-model="patientInfo.patient"></el-input>
</el-form-item> </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-input v-model="patientInfo.patientId"></el-input>
</el-form-item> </el-form-item>
<!-- <p class="input-box"><span>请选择手术时间</span>--> <!-- <p class="input-box"><span>请选择手术时间</span>-->
@ -66,7 +66,7 @@ const confirmRemote = () => {
if (patientInfo.value.patientId && patientInfo.value.patient) { if (patientInfo.value.patientId && patientInfo.value.patient) {
ElMessage.success('连接成功!') ElMessage.success('连接成功!')
patientInfo.value.isRemote = true 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) patientInfo.value.date = dateFormater("yyyyMMdd", patientInfo.value.date)
unsubscribeLastTask(); unsubscribeLastTask();
remoteWsStore.setCurrentTaskIndex(patientInfo.value.index) remoteWsStore.setCurrentTaskIndex(patientInfo.value.index)

View File

@ -1,61 +1,61 @@
<template> <template>
<div class="remote-item-part"> <div class="remote-item-part">
<div class="title"> <div class="title">
<span>{{ remoteTask.taskName || '远程控制' }}</span> <span>{{ remoteTask.taskName || '远程查看' }}</span>
</div> </div>
<div class="content mini" :class="{ 'is-total': remoteTask.isRemote }"> <div class="content mini" :class="{ 'is-total': remoteTask.isRemote }">
<div class="left-box"> <div class="left-box">
<div class="info-box"> <div class="info-box">
<div class="row-item"> <div class="row-item">
<span class="label">病人名称</span> <span class="label">病人名称</span>
<span class="input-value">{{ remoteTask.patient }}</span> <span class="input-value">{{ remoteTask.patient }}</span>
</div> </div>
<div class="row-item"> <div class="row-item">
<span class="label">住院</span> <span class="label">证件</span>
<span class="input-value">{{ remoteTask.patientId }}</span> <span class="input-value">{{ remoteTask.patientId }}</span>
</div> </div>
<div class="row-item"> <div class="row-item">
<span class="label">手术时间</span> <span class="label">手术时间</span>
<span class="input-value">{{ <span class="input-value">{{
remoteTask.date remoteTask.date
}}</span> }}</span>
</div> </div>
<div class="row-item"> <div class="row-item">
<span class="label">手术状态</span> <span class="label">手术状态</span>
<span class="tag-value" :class="{ 'normal': !patientInfo.state }">正常</span> <span class="tag-value" :class="{ 'normal': !patientInfo.state }">正常</span>
<span class="tag-value" :class="{ 'alarm': patientInfo.state }">异常</span> <span class="tag-value" :class="{ 'alarm': patientInfo.state }">异常</span>
</div> </div>
</div> </div>
<div class="row-item" :class="{ 'alarm': patientInfo.BIS_except }"> <div class="row-item" :class="{ 'alarm': patientInfo.BIS_except }">
<span class="label">BIS</span> <span class="label">BIS</span>
<span class="value">{{ patientInfo.BIS }}</span> <span class="value">{{ patientInfo.BIS }}</span>
</div> </div>
<div class="row-item" :class="{ 'alarm': patientInfo.SBP_except }"> <div class="row-item" :class="{ 'alarm': patientInfo.SBP_except }">
<span class="label">SBP</span> <span class="label">SBP</span>
<span class="value">{{ patientInfo.SBP }}<span class="unit">mmHg</span></span> <span class="value">{{ patientInfo.SBP }}<span class="unit">mmHg</span></span>
</div> </div>
<div class="row-item"> <div class="row-item">
<span class="label">SPO2</span> <span class="label">SPO2</span>
<span class="value">{{ patientInfo.SPO2 }}</span> <span class="value">{{ patientInfo.SPO2 }}</span>
</div> </div>
<div class="row-item yellow" :class="{ 'alarm': patientInfo.DBP_except }"> <div class="row-item yellow" :class="{ 'alarm': patientInfo.DBP_except }">
<span class="label">DBP</span> <span class="label">DBP</span>
<span class="value">{{ patientInfo.DBP }}<span class="unit">mmHg</span></span> <span class="value">{{ patientInfo.DBP }}<span class="unit">mmHg</span></span>
</div> </div>
<div class="row-item yellow" :class="{ 'alarm': patientInfo.HR_except }"> <div class="row-item yellow" :class="{ 'alarm': patientInfo.HR_except }">
<span class="label">HR</span> <span class="label">HR</span>
<span class="value">{{ patientInfo.HR }}<span class="unit">/</span></span> <span class="value">{{ patientInfo.HR }}<span class="unit">/</span></span>
</div> </div>
<div class="row-item yellow"> <div class="row-item yellow">
<span class="label">TEMP</span> <span class="label">TEMP</span>
<span class="value">{{ patientInfo.TEMP }}</span> <span class="value">{{ patientInfo.TEMP }}</span>
</div> </div>
</div> </div>
<div class="center-box"> <div class="center-box">
<img src="@/assets/imgs/main_body_intact.png"> <img src="@/assets/imgs/main_body_intact.png">
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script lang='ts' setup> <script lang='ts' setup>
@ -63,7 +63,7 @@ import {onMounted, onUnmounted, ref} from 'vue'
import {useRemoteWsStore} from "@/stores/remote-ws-store"; import {useRemoteWsStore} from "@/stores/remote-ws-store";
const props = withDefaults(defineProps<{ index: number }>(), { const props = withDefaults(defineProps<{ index: number }>(), {
index: () => 0 index: () => 0
}) })
const emit = defineEmits(['addLogAfter']) const emit = defineEmits(['addLogAfter'])
const remoteWsStore = useRemoteWsStore(); const remoteWsStore = useRemoteWsStore();
@ -72,59 +72,60 @@ const patientInfo = ref({} as any)
let reconnectTime = 0 let reconnectTime = 0
onMounted(() => { onMounted(() => {
// //
if (remoteTask.value.isRemote) { if (remoteTask.value.isRemote) {
initData() initData()
} }
}) })
onUnmounted(() => { onUnmounted(() => {
remoteWsStore.unsubscribeVital(remoteTask.value.patient, remoteTask.value.patientId, remoteTask.value.date, props.index); remoteWsStore.unsubscribeVital(remoteTask.value.patient, remoteTask.value.patientId, remoteTask.value.date, props.index);
}) })
function initData() { function initData() {
subscribeVital() subscribeVital()
wsClose() wsClose()
} }
function subscribeVital() { function subscribeVital() {
remoteWsStore.subscribeVital(remoteTask.value.patient, remoteTask.value.patientId, remoteTask.value.date, props.index, (res: any) => { remoteWsStore.subscribeVital(remoteTask.value.patient, remoteTask.value.patientId, remoteTask.value.date, props.index, (res: any) => {
const data = JSON.parse(res.data); const data = JSON.parse(res.data);
if (data.vitalSignsList && data.vitalSignsList.length > 0) { if (data.vitalSignsList && data.vitalSignsList.length > 0) {
Object.assign(patientInfo.value, data.vitalSignsList[0]); Object.assign(patientInfo.value, data.vitalSignsList[0]);
patientInfo.value.state = (patientInfo.value.BIS_except || patientInfo.value.SBP_except || patientInfo.value.state = (patientInfo.value.BIS_except || patientInfo.value.SBP_except ||
patientInfo.value.DBP_except || patientInfo.value.HR_except); patientInfo.value.DBP_except || patientInfo.value.HR_except);
setLog(patientInfo.value, props.index) setLog(patientInfo.value, props.index)
emit('addLogAfter', props.index) emit('addLogAfter', props.index)
} }
}) })
} }
function wsClose() { function wsClose() {
remoteWsStore.vitalOnclose(remoteTask.value.patient, remoteTask.value.patientId, remoteTask.value.date, props.index, () => { remoteWsStore.vitalOnclose(remoteTask.value.patient, remoteTask.value.patientId, remoteTask.value.date, props.index, () => {
if (reconnectTime < 3) { if (reconnectTime < 3) {
remoteWsStore.createConnect(remoteTask.value.patient, remoteTask.value.patientId, remoteTask.value.date, props.index) remoteWsStore.createConnect(remoteTask.value.patient, remoteTask.value.patientId, remoteTask.value.date, props.index)
subscribeVital() setTimeout(() => {
wsClose() subscribeVital()
} else { wsClose()
reconnectTime = 0 }, 3000)
} reconnectTime++
}) }
})
} }
function setLog(data: any, index: number) { function setLog(data: any, index: number) {
remoteWsStore.exceptionType.forEach((item: any) => { remoteWsStore.exceptionType.forEach((item: any) => {
if (data[item]) { if (data[item]) {
const msg: any = remoteWsStore.exceptionMsg[item]; const msg: any = remoteWsStore.exceptionMsg[item];
remoteWsStore.setRemoteLog({ remoteWsStore.setRemoteLog({
state: msg, state: msg,
taskName: remoteTask.value.taskName, taskName: remoteTask.value.taskName,
time: new Date(), time: new Date(),
type: "exception" type: "exception"
}, index); }, index);
} }
}) })
} }
</script> </script>
@ -133,234 +134,236 @@ function setLog(data: any, index: number) {
$size: 20px; $size: 20px;
.remote-item-part { .remote-item-part {
cursor: pointer; cursor: pointer;
position: relative;
width: 100%;
height: 100%;
border: 1px solid $border-color;
&::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: transparent;
transition: all .6s;
z-index: 1;
}
&:hover {
&::after {
background-color: rgba(black, .1);
transition: all .6s;
}
}
.title {
position: relative; position: relative;
width: 100%; width: 100%;
height: $size; height: 100%;
font-size: $size*0.7; border: 1px solid $border-color;
text-align: center;
line-height: $size;
font-weight: 600;
color: white;
background: $main-color;
}
.content { &::after {
width: 100%; content: '';
height: calc(100% - #{$size}); position: absolute;
padding: $size*0.5; top: 0;
display: flex; left: 0;
justify-content: space-between; right: 0;
bottom: 0;
.common-box { background-color: transparent;
width: 30%; transition: all .6s;
height: 100%; z-index: 1;
display: flex;
flex-direction: column;
justify-content: space-evenly;
align-items: center;
} }
.left-box { &:hover {
@extend .common-box; &::after {
background-color: rgba(black, .1);
.label { transition: all .6s;
background: $main-color; }
}
} }
.center-box { .title {
@extend .common-box; position: relative;
img {
max-width: 100%;
max-height: 100%;
}
}
.right-box {
@extend .common-box;
.label {
background: #f8b300;
}
}
.row-item {
width: 100%;
display: flex;
justify-content: space-between;
.label {
flex-shrink: 0;
width: 100%; width: 100%;
height: $size; height: $size;
color: white;
font-size: $size*0.6;
line-height: $size;
text-align: center;
border-radius: 5px;
}
}
.info-box,
.row-item .value {
display: none;
}
&.is-total {
.info-box,
.row-item .value {
display: block;
}
.label {
width: calc(50% - $size*0.5);
}
.value {
width: 50%;
height: $size;
border-width: 1px;
border-style: solid;
text-align: center;
border-radius: 5px;
color: $main-color;
border-color: $main-color;
font-size: $size*0.7; font-size: $size*0.7;
text-align: center;
line-height: $size; line-height: $size;
font-weight: 600; font-weight: 600;
color: white;
.unit { background: $main-color;
font-size: $size*0.6;
font-family: 400;
}
}
.right-box .value {
color: $main-color;
border-color: $main-color;
}
.row-item.alarm {
.label {
background: red !important;
}
.value {
color: red !important;
border-color: red !important;
}
}
.info-box {
width: 100%;
.row-item {
padding: $size*0.5 0;
height: $size;
justify-content: flex-start;
align-items: center;
.label {
width: $size*3;
height: $size;
background: transparent;
color: $main-color;
font-size: $size*0.6;
line-height: $size;
font-weight: 600;
text-align: left;
}
.input-value {
width: 100%;
height: $size;
line-height: $size;
font-size: $size*0.6;
color: $main-color;
border-bottom: 1px solid $border2-color;
}
.tag-value {
margin-left: $size*0.3;
margin-top: $size*0.1;
padding: 0 $size*0.5;
height: $size*0.9;
line-height: $size;
font-size: $size*0.5;
color: white;
font-weight: 600;
background: $border2-color;
border-radius: 8px;
&.normal {
background: $main-color;
}
&.alarm {
background: red;
}
}
}
}
} }
&.mini { .content {
padding: $size; width: 100%;
height: calc(100% - #{$size});
padding: $size*0.5;
display: flex;
justify-content: space-between;
.left-box { .common-box {
width: 50%; width: 30%;
} height: 100%;
display: flex;
flex-direction: column;
justify-content: space-evenly;
align-items: center;
}
.center-box {
width: 50%;
}
&.is-total {
.left-box { .left-box {
.info-box { @extend .common-box;
display: block;
flex-shrink: 0;
}
.row-item.yellow {
.label { .label {
background: $main-color; background: $main-color;
}
}
.center-box {
@extend .common-box;
img {
max-width: 100%;
max-height: 100%;
}
}
.right-box {
@extend .common-box;
.label {
background: #f8b300;
}
}
.row-item {
width: 100%;
display: flex;
justify-content: space-between;
.label {
flex-shrink: 0;
width: 100%;
height: $size;
color: white;
font-size: $size*0.6;
line-height: $size;
text-align: center;
border-radius: 5px;
}
}
.info-box,
.row-item .value {
display: none;
}
&.is-total {
.info-box,
.row-item .value {
display: block;
}
.label {
width: calc(50% - $size * 0.5);
} }
.value { .value {
color: $main-color; width: 50%;
border-color: $main-color; height: $size;
} border-width: 1px;
} border-style: solid;
} text-align: center;
} border-radius: 5px;
color: $main-color;
border-color: $main-color;
font-size: $size*0.7;
line-height: $size;
font-weight: 600;
.unit {
font-size: $size*0.6;
font-family: 400;
}
}
.right-box .value {
color: $main-color;
border-color: $main-color;
}
.row-item.alarm {
.label {
background: red !important;
}
.value {
color: red !important;
border-color: red !important;
}
}
.info-box {
width: 100%;
.row-item {
padding: $size*0.5 0;
height: $size;
justify-content: flex-start;
align-items: center;
.label {
width: $size*3;
height: $size;
background: transparent;
color: $main-color;
font-size: $size*0.6;
line-height: $size;
font-weight: 600;
text-align: left;
}
.input-value {
width: 100%;
height: $size;
line-height: $size;
font-size: $size*0.6;
color: $main-color;
border-bottom: 1px solid $border2-color;
}
.tag-value {
margin-left: $size*0.3;
margin-top: $size*0.1;
padding: 0 $size*0.5;
height: $size*0.9;
line-height: $size;
font-size: $size*0.5;
color: white;
font-weight: 600;
background: $border2-color;
border-radius: 8px;
&.normal {
background: $main-color;
}
&.alarm {
background: red;
}
}
}
}
}
&.mini {
padding: $size;
.left-box {
width: 50%;
}
.center-box {
width: 50%;
}
&.is-total {
.left-box {
.info-box {
display: block;
flex-shrink: 0;
}
.row-item.yellow {
.label {
background: $main-color;
}
.value {
color: $main-color;
border-color: $main-color;
}
}
}
}
}
} }
}
}</style> }</style>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="remote-part"> <div class="remote-part">
<div class="title"> <div class="title">
<span>{{ remoteItem?.taskName || '远程控制' }}</span> <span>{{ remoteItem?.taskName || '远程查看' }}</span>
<el-button v-if="remoteItem?.taskName" class="break-btn" @click="breakRemote">断开连接</el-button> <el-button v-if="remoteItem?.taskName" class="break-btn" @click="breakRemote">断开连接</el-button>
</div> </div>
<!-- 小分辨率 --> <!-- 小分辨率 -->
@ -13,7 +13,7 @@
<span class="input-value">{{ remoteItem.patient }}</span> <span class="input-value">{{ remoteItem.patient }}</span>
</div> </div>
<div class="row-item"> <div class="row-item">
<span class="label">住院</span> <span class="label">证件</span>
<span class="input-value">{{ remoteItem.patientId }}</span> <span class="input-value">{{ remoteItem.patientId }}</span>
</div> </div>
<div class="row-item"> <div class="row-item">
@ -65,7 +65,7 @@
<span class="input-value">{{ remoteItem?.patient }}</span> <span class="input-value">{{ remoteItem?.patient }}</span>
</div> </div>
<div class="row-item"> <div class="row-item">
<span class="label">住院</span> <span class="label">证件</span>
<span class="input-value">{{ remoteItem?.patientId }}</span> <span class="input-value">{{ remoteItem?.patientId }}</span>
</div> </div>
</div> </div>

View File

@ -110,7 +110,7 @@
</template> --> </template> -->
</el-table-column> </el-table-column>
<el-table-column prop="total" label="累计药量(ml)" 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"> <!-- <el-table-column label="特殊情况人为干预" align="center">
<template #default="scope"> <template #default="scope">
<div class="table-btn-box"> <div class="table-btn-box">
@ -143,7 +143,7 @@
<el-table-column prop="name" label="药物名称" align="center"/> <el-table-column prop="name" label="药物名称" align="center"/>
<el-table-column prop="speed" label="速度(ml/h)" width="100"/> <el-table-column prop="speed" label="速度(ml/h)" width="100"/>
<el-table-column prop="total" label="累计药量(ml)" 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"> <!-- <el-table-column label="特殊情况人为干预" align="center">
<template #default="scope"> <template #default="scope">
<div class="table-btn-box"> <div class="table-btn-box">
@ -268,7 +268,7 @@ onMounted(() => {
onUnmounted(() => { onUnmounted(() => {
const index = remoteWsStore.getCurrentTaskIndex() const index = remoteWsStore.getCurrentTaskIndex()
remoteWsStore.unsubscribeChat(currentRemote.value.patient, currentRemote.value.patientId, currentRemote.value.date, index); 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); 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)); 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) { function (res: any) {
const data = JSON.parse(res.data); const data = JSON.parse(res.data);
if (data.status != 1) { if (data.status != 1) {
@ -300,7 +300,7 @@ function subscribeWS() {
} else { } else {
ElMessage.error(data.msg) ElMessage.error(data.msg)
} }
}) })*/
} }
@ -456,13 +456,13 @@ const setDatabase = () => {
const viewPatientInfo = () => { const viewPatientInfo = () => {
isPatientDialog.value = true; isPatientDialog.value = true;
// getPatientInfo(currentRemote.value.patient, currentRemote.value.patientId, /*getPatientInfo(currentRemote.value.patient, currentRemote.value.patientId,
// currentRemote.value.date).then(res => { currentRemote.value.date).then(res => {
// if (res.code == 0) { if (res.code == 0) {
// patientsFormRef.value.resetData() patientsFormRef.value.resetData()
// patientsFormRef.value.formData = JSON.parse(JSON.stringify(res.data)) patientsFormRef.value.formData = JSON.parse(JSON.stringify(res.data))
// } }
// }) })*/
getPatientInfoM(currentRemote.value.patient, currentRemote.value.patientId, getPatientInfoM(currentRemote.value.patient, currentRemote.value.patientId,
currentRemote.value.date).then(res => { currentRemote.value.date).then(res => {
if (res.code == 0) { if (res.code == 0) {

View File

@ -64,7 +64,7 @@ const editTask = (item: any) => {
remoteDialogRef.value.open(item.index) remoteDialogRef.value.open(item.index)
} }
} }
// //
const toRemoteControl = (item: any) => { const toRemoteControl = (item: any) => {
// //
if (item.isRemote) { if (item.isRemote) {