2024-01-18 17:28:00 +08:00
|
|
|
<template>
|
2024-05-30 20:50:03 +08:00
|
|
|
<div class="remote-item-part">
|
|
|
|
<div class="title">
|
|
|
|
<span>{{ remoteTask.taskName || '远程查看' }}</span>
|
|
|
|
</div>
|
|
|
|
<div class="content mini" :class="{ 'is-total': remoteTask.isRemote }">
|
|
|
|
<div class="left-box">
|
|
|
|
<div class="info-box">
|
|
|
|
<div class="row-item">
|
|
|
|
<span class="label">病人名称</span>
|
|
|
|
<span class="input-value">{{ remoteTask.patient }}</span>
|
|
|
|
</div>
|
|
|
|
<div class="row-item">
|
|
|
|
<span class="label">证件号</span>
|
|
|
|
<span class="input-value">{{ remoteTask.patientId }}</span>
|
|
|
|
</div>
|
|
|
|
<div class="row-item">
|
|
|
|
<span class="label">手术时间</span>
|
|
|
|
<span class="input-value">{{
|
|
|
|
remoteTask.date
|
|
|
|
}}</span>
|
|
|
|
</div>
|
|
|
|
<div class="row-item">
|
|
|
|
<span class="label">手术状态</span>
|
|
|
|
<span class="tag-value" :class="{ 'normal': !patientInfo.state }">正常</span>
|
|
|
|
<span class="tag-value" :class="{ 'alarm': patientInfo.state }">异常</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row-item" :class="{ 'alarm': patientInfo.BIS_except }">
|
|
|
|
<span class="label">BIS</span>
|
|
|
|
<span class="value">{{ patientInfo.BIS }}</span>
|
|
|
|
</div>
|
|
|
|
<div class="row-item" :class="{ 'alarm': patientInfo.SBP_except }">
|
|
|
|
<span class="label">SBP</span>
|
|
|
|
<span class="value">{{ patientInfo.SBP }}<span class="unit">mmHg</span></span>
|
|
|
|
</div>
|
|
|
|
<div class="row-item">
|
|
|
|
<span class="label">SPO2</span>
|
|
|
|
<span class="value">{{ patientInfo.SPO2 }}</span>
|
|
|
|
</div>
|
|
|
|
<div class="row-item yellow" :class="{ 'alarm': patientInfo.DBP_except }">
|
|
|
|
<span class="label">DBP</span>
|
|
|
|
<span class="value">{{ patientInfo.DBP }}<span class="unit">mmHg</span></span>
|
|
|
|
</div>
|
|
|
|
<div class="row-item yellow" :class="{ 'alarm': patientInfo.HR_except }">
|
|
|
|
<span class="label">HR</span>
|
|
|
|
<span class="value">{{ patientInfo.HR }}<span class="unit">次/分</span></span>
|
|
|
|
</div>
|
|
|
|
<div class="row-item yellow">
|
|
|
|
<span class="label">TEMP</span>
|
|
|
|
<span class="value">{{ patientInfo.TEMP }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="center-box">
|
|
|
|
<img src="@/assets/imgs/main_body_intact.png">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-01-18 17:28:00 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang='ts' setup>
|
2024-04-23 09:42:25 +08:00
|
|
|
import {onMounted, onUnmounted, ref} from 'vue'
|
|
|
|
import {useRemoteWsStore} from "@/stores/remote-ws-store";
|
2024-01-18 17:28:00 +08:00
|
|
|
|
2024-04-23 09:42:25 +08:00
|
|
|
const props = withDefaults(defineProps<{ index: number }>(), {
|
2024-05-30 20:50:03 +08:00
|
|
|
index: () => 0
|
2024-01-18 17:28:00 +08:00
|
|
|
})
|
|
|
|
const emit = defineEmits(['addLogAfter'])
|
2024-04-23 09:42:25 +08:00
|
|
|
const remoteWsStore = useRemoteWsStore();
|
|
|
|
const remoteTask = ref(remoteWsStore.remoteTasks[props.index]);
|
|
|
|
const patientInfo = ref({} as any)
|
2024-05-29 19:16:11 +08:00
|
|
|
let reconnectTime = 0
|
2024-01-18 17:28:00 +08:00
|
|
|
|
|
|
|
onMounted(() => {
|
2024-05-30 20:50:03 +08:00
|
|
|
// 连接成功执行查询
|
|
|
|
if (remoteTask.value.isRemote) {
|
|
|
|
initData()
|
|
|
|
}
|
2024-01-18 17:28:00 +08:00
|
|
|
})
|
2024-04-23 09:42:25 +08:00
|
|
|
onUnmounted(() => {
|
2024-05-30 20:50:03 +08:00
|
|
|
remoteWsStore.unsubscribeVital(remoteTask.value.patient, remoteTask.value.patientId, remoteTask.value.date, props.index);
|
2024-01-18 17:28:00 +08:00
|
|
|
})
|
|
|
|
|
|
|
|
function initData() {
|
2024-05-30 20:50:03 +08:00
|
|
|
subscribeVital()
|
|
|
|
wsClose()
|
2024-04-23 09:42:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
function subscribeVital() {
|
2024-05-30 20:50:03 +08:00
|
|
|
remoteWsStore.subscribeVital(remoteTask.value.patient, remoteTask.value.patientId, remoteTask.value.date, props.index, (res: any) => {
|
|
|
|
const data = JSON.parse(res.data);
|
|
|
|
if (data.vitalSignsList && data.vitalSignsList.length > 0) {
|
|
|
|
Object.assign(patientInfo.value, data.vitalSignsList[0]);
|
|
|
|
patientInfo.value.state = (patientInfo.value.BIS_except || patientInfo.value.SBP_except ||
|
|
|
|
patientInfo.value.DBP_except || patientInfo.value.HR_except);
|
|
|
|
setLog(patientInfo.value, props.index)
|
|
|
|
emit('addLogAfter', props.index)
|
|
|
|
}
|
|
|
|
})
|
2024-05-29 17:09:56 +08:00
|
|
|
|
2024-04-23 09:42:25 +08:00
|
|
|
}
|
|
|
|
|
2024-05-29 19:16:11 +08:00
|
|
|
function wsClose() {
|
2024-05-30 20:50:03 +08:00
|
|
|
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()
|
|
|
|
}, 3000)
|
|
|
|
reconnectTime++
|
|
|
|
}
|
|
|
|
})
|
2024-05-29 19:16:11 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2024-04-23 09:42:25 +08:00
|
|
|
function setLog(data: any, index: number) {
|
2024-05-30 20:50:03 +08:00
|
|
|
remoteWsStore.exceptionType.forEach((item: any) => {
|
|
|
|
if (data[item]) {
|
|
|
|
const msg: any = remoteWsStore.exceptionMsg[item];
|
|
|
|
remoteWsStore.setRemoteLog({
|
|
|
|
state: msg,
|
|
|
|
taskName: remoteTask.value.taskName,
|
|
|
|
time: new Date(),
|
|
|
|
type: "exception"
|
|
|
|
}, index);
|
|
|
|
}
|
|
|
|
})
|
2024-01-18 17:28:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang='scss' scoped>
|
|
|
|
$size: 20px;
|
|
|
|
|
|
|
|
.remote-item-part {
|
2024-05-30 20:50:03 +08:00
|
|
|
cursor: pointer;
|
2024-01-18 17:28:00 +08:00
|
|
|
position: relative;
|
|
|
|
width: 100%;
|
2024-05-30 20:50:03 +08:00
|
|
|
height: 100%;
|
|
|
|
border: 1px solid $border-color;
|
2024-01-18 17:28:00 +08:00
|
|
|
|
2024-05-30 20:50:03 +08:00
|
|
|
&::after {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
background-color: transparent;
|
|
|
|
transition: all .6s;
|
|
|
|
z-index: 1;
|
2024-01-18 17:28:00 +08:00
|
|
|
}
|
|
|
|
|
2024-05-30 20:50:03 +08:00
|
|
|
&:hover {
|
|
|
|
&::after {
|
|
|
|
background-color: rgba(black, .1);
|
|
|
|
transition: all .6s;
|
|
|
|
}
|
2024-01-18 17:28:00 +08:00
|
|
|
}
|
|
|
|
|
2024-05-30 20:50:03 +08:00
|
|
|
.title {
|
|
|
|
position: relative;
|
2024-01-18 17:28:00 +08:00
|
|
|
width: 100%;
|
|
|
|
height: $size;
|
|
|
|
font-size: $size*0.7;
|
2024-05-30 20:50:03 +08:00
|
|
|
text-align: center;
|
2024-01-18 17:28:00 +08:00
|
|
|
line-height: $size;
|
|
|
|
font-weight: 600;
|
2024-05-30 20:50:03 +08:00
|
|
|
color: white;
|
|
|
|
background: $main-color;
|
|
|
|
}
|
2024-01-18 17:28:00 +08:00
|
|
|
|
2024-05-30 20:50:03 +08:00
|
|
|
.content {
|
|
|
|
width: 100%;
|
|
|
|
height: calc(100% - #{$size});
|
|
|
|
padding: $size*0.5;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
.common-box {
|
|
|
|
width: 30%;
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: space-evenly;
|
|
|
|
align-items: center;
|
2024-01-18 17:28:00 +08:00
|
|
|
}
|
|
|
|
|
2024-05-30 20:50:03 +08:00
|
|
|
.left-box {
|
|
|
|
@extend .common-box;
|
2024-01-18 17:28:00 +08:00
|
|
|
|
2024-05-30 20:50:03 +08:00
|
|
|
.label {
|
|
|
|
background: $main-color;
|
|
|
|
}
|
2024-01-18 17:28:00 +08:00
|
|
|
}
|
|
|
|
|
2024-05-30 20:50:03 +08:00
|
|
|
.center-box {
|
|
|
|
@extend .common-box;
|
|
|
|
|
|
|
|
img {
|
|
|
|
max-width: 100%;
|
|
|
|
max-height: 100%;
|
|
|
|
}
|
2024-01-18 17:28:00 +08:00
|
|
|
}
|
|
|
|
|
2024-05-30 20:50:03 +08:00
|
|
|
.right-box {
|
|
|
|
@extend .common-box;
|
|
|
|
|
|
|
|
.label {
|
|
|
|
background: #f8b300;
|
|
|
|
}
|
|
|
|
}
|
2024-01-18 17:28:00 +08:00
|
|
|
|
|
|
|
.row-item {
|
|
|
|
width: 100%;
|
2024-05-30 20:50:03 +08:00
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
2024-01-18 17:28:00 +08:00
|
|
|
|
2024-05-30 20:50:03 +08:00
|
|
|
.label {
|
|
|
|
flex-shrink: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: $size;
|
|
|
|
color: white;
|
|
|
|
font-size: $size*0.6;
|
|
|
|
line-height: $size;
|
|
|
|
text-align: center;
|
|
|
|
border-radius: 5px;
|
2024-01-18 17:28:00 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-30 20:50:03 +08:00
|
|
|
.info-box,
|
|
|
|
.row-item .value {
|
|
|
|
display: none;
|
|
|
|
}
|
2024-01-18 17:28:00 +08:00
|
|
|
|
2024-05-30 20:50:03 +08:00
|
|
|
&.is-total {
|
2024-01-18 17:28:00 +08:00
|
|
|
|
2024-05-30 20:50:03 +08:00
|
|
|
.info-box,
|
|
|
|
.row-item .value {
|
|
|
|
display: block;
|
|
|
|
}
|
2024-01-18 17:28:00 +08:00
|
|
|
|
|
|
|
.label {
|
2024-05-30 20:50:03 +08:00
|
|
|
width: calc(50% - $size * 0.5);
|
2024-01-18 17:28:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.value {
|
2024-05-30 20:50:03 +08:00
|
|
|
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;
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-18 17:28:00 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-30 20:50:03 +08:00
|
|
|
&.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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2024-01-18 17:28:00 +08:00
|
|
|
}
|
|
|
|
}</style>
|