This commit is contained in:
yy 2024-05-28 22:09:05 +08:00
parent b58a554f3b
commit f8bdc0196a
2 changed files with 150 additions and 140 deletions

View File

@ -1,6 +1,7 @@
import request from "@/utils/request";
const patientInfoUrl = "/admin/medicine/getPatientInfo";
const patientInfoMUrl = "/admin/medicine/getPatientInfoM";
const getPatientPageUrl = "/admin/medicine/getPatientPage";
const getPatientSurgeryListUrl = "/admin/medicine/getPatientSurgeryList";
const getSurgeryTableDataUrl = "/admin/medicine/getSurgeryTableData";
@ -19,6 +20,20 @@ export function getPatientInfo(name: string, id: string, date: string): Promise<
});
}
export function getPatientInfoM(name: string, id: string, date?: string): Promise<any> {
return new Promise((resolve, reject) => {
request.postForm(patientInfoMUrl, {
patientName: name,
idNum: id,
date: date
}).then((res: any) => {
resolve(res.data);
}).catch(error => {
reject(error);
});
});
}
export function getPatientPage(params: {
offset: number,
limit: number,

View File

@ -4,50 +4,51 @@
<div class="left-box">
<h3>{{ currentRemote?.taskName }}</h3>
<chart-line ref="chartDom1" class="chart-line" :names="['BIS', 'HR']"
@exception-event="vitalExcepEvent"></chart-line>
@exception-event="vitalExcepEvent"></chart-line>
<chart-line ref="chartDom2" class="chart-line" :names="['SBP', 'DBP']"
@exception-event="vitalExcepEvent"></chart-line>
@exception-event="vitalExcepEvent"></chart-line>
<chart-line ref="chartDom3" class="chart-line" :names="['SPO2', 'TEMP']"
@exception-event="vitalExcepEvent"></chart-line>
@exception-event="vitalExcepEvent"></chart-line>
<chart-ecg ref="chartDom4" class="chart-ecg" :name="['CH1', 'CH2']"
@exception-event="vitalExcepEvent"></chart-ecg>
@exception-event="vitalExcepEvent"></chart-ecg>
</div>
<div class="center-box">
<div class="body-box">
<div class="body-img">
<img src="@/assets/imgs/main_body.png" style="width: 100%;height: 100%;"/>
<img class="lung-img" :class="{ 'shake_1': lungAlarm }" :src="lungAlarm ? imgLungAlarm : imgLung">
<img src="@/assets/imgs/main_body.png" style="width: 100%;height: 100%;" />
<img class="lung-img" :class="{ 'shake_1': lungAlarm }"
:src="lungAlarm ? imgLungAlarm : imgLung">
<img class="heart-img" :class="{ 'shake_1': heartAlarm }"
:src="heartAlarm ? imgHeartAlarm : imgHeart">
:src="heartAlarm ? imgHeartAlarm : imgHeart">
</div>
</div>
<!-- <div class="btn-box">-->
<!-- <el-button class="start-btn" color="#F80000" @click="startAI">-->
<!-- 开始-->
<!-- </el-button>-->
<!-- <div class="right-btn-box">-->
<!-- <el-button :class="{ 'active': isAIDose }" size="small" @click="">AI给药</el-button>-->
<!-- <el-button :class="{ 'active': !isAIDose }" size="small">人工给药</el-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="btn-box">-->
<!-- <el-button class="start-btn" color="#F80000" @click="startAI">-->
<!-- 开始-->
<!-- </el-button>-->
<!-- <div class="right-btn-box">-->
<!-- <el-button :class="{ 'active': isAIDose }" size="small" @click="">AI给药</el-button>-->
<!-- <el-button :class="{ 'active': !isAIDose }" size="small">人工给药</el-button>-->
<!-- </div>-->
<!-- </div>-->
</div>
<div class="right-box">
<div class="top-btn-box">
<div class="top-left-btn-box">
<!-- <el-select v-model="database" filterable placeholder="Select" style="width: 100%;"-->
<!-- @change="selectDatabase">-->
<!-- <el-option v-for="item in databaseOptions" :key="item.value" :label="item.label"-->
<!-- :value="item.value"/>-->
<!-- </el-select>-->
<!-- <el-select v-model="database" filterable placeholder="Select" style="width: 100%;"-->
<!-- @change="selectDatabase">-->
<!-- <el-option v-for="item in databaseOptions" :key="item.value" :label="item.label"-->
<!-- :value="item.value"/>-->
<!-- </el-select>-->
<el-button color="#C77000" @click="viewPatientInfo">患者信息</el-button>
<el-button color="#C77000">已连接</el-button>
<el-button color="#C77000">机器人运行正常</el-button>
</div>
<el-button color="#e0e0e0" @click="backRemote">
<el-icon>
<Back/>
<Back />
</el-icon>
返回
</el-button>
@ -60,29 +61,29 @@
</ul>
</div>
<div class="right-box">
<!-- <div class="video-box" @click="playPause">-->
<!-- <div class="icon-box">-->
<!-- <el-icon v-if="isVideoPlay">-->
<!-- <VideoPause/>-->
<!-- </el-icon>-->
<!-- <el-icon v-else>-->
<!-- <VideoPlay/>-->
<!-- </el-icon>-->
<!-- </div>-->
<!-- &lt;!&ndash; poster="@/assets/imgs/video_bck.png" &ndash;&gt;-->
<!-- <video ref="liveVideo">-->
<!-- <source src="@/assets/medical.mp4" type="video/mp4"/>-->
<!-- </video>-->
<!-- </div>-->
<!-- <div class="video-box" @click="playPause">-->
<!-- <div class="icon-box">-->
<!-- <el-icon v-if="isVideoPlay">-->
<!-- <VideoPause/>-->
<!-- </el-icon>-->
<!-- <el-icon v-else>-->
<!-- <VideoPlay/>-->
<!-- </el-icon>-->
<!-- </div>-->
<!-- &lt;!&ndash; poster="@/assets/imgs/video_bck.png" &ndash;&gt;-->
<!-- <video ref="liveVideo">-->
<!-- <source src="@/assets/medical.mp4" type="video/mp4"/>-->
<!-- </video>-->
<!-- </div>-->
<div class="message-box">
<ul ref="msgLog" class="message-log">
<li v-for="(item, index) in mssageList" :key="'msg-log-' + index"
:class="{ 'align-right': item.createName == userName }">
:class="{ 'align-right': item.createName == userName }">
<span>{{ item.content }}</span>
</li>
</ul>
<div class="send-box">
<el-input v-model="msgVal" placeholder="请输入消息"/>
<el-input v-model="msgVal" placeholder="请输入消息" />
<el-button color="#006080" @click="sendMsg">发送消息</el-button>
</div>
</div>
@ -91,14 +92,14 @@
<!-- table1 -->
<div class="table-box">
<el-table :data="varTableData" height="100%" style="width: 100%">
<el-table-column prop="num" label="票号" width="40" align="center"/>
<el-table-column prop="name" label="药物名称" align="center"/>
<el-table-column prop="num" label="票号" width="40" align="center" />
<el-table-column prop="name" label="药物名称" align="center" />
<el-table-column prop="speed" label="速度(ml/h)" width="120">
<template #header>
<el-dropdown @command="table1SpeedCommand">
<span style="color: white;font-size: 14px;line-height: 20px;">
{{ table1SpeedVal || '请选择速度' }}
</span>
<span style="color: white;font-size: 14px;line-height: 20px;">
{{ table1SpeedVal || '请选择速度' }}
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item command="速度(ug/kg/min)">速度(ug/kg/min)</el-dropdown-item>
@ -111,24 +112,25 @@
<el-table-column prop="total" label="累计药量(ml)" width="100">
<template #default="scope"></template>
</el-table-column>
<el-table-column prop="state" label="工作状态" width="70" align="center"/>
<el-table-column prop="state" label="工作状态" width="70" align="center" />
<el-table-column label="特殊情况人为干预" align="center">
<template #default="scope">
<div class="table-btn-box">
<el-button size="small" color="#006080" @click="tableItemPlus(scope)">
<el-icon>
<Plus/>
<Plus />
</el-icon>
</el-button>
<el-button size="small" color="#006080" :disabled="scope.row.speed <= 0"
@click="tableItemMinus(scope)">
@click="tableItemMinus(scope)">
<el-icon>
<Minus/>
<Minus />
</el-icon>
</el-button>
<!-- <el-button size="small" color="#006080" @click="tableItemConfirm(scope)"
:disabled="tableDataStore[scope.$index].speed === scope.row.speed">确定-->
<el-button size="small" color="#006080" @click="tableItemConfirm(scope, varTableData)">确定
<el-button size="small" color="#006080"
@click="tableItemConfirm(scope, varTableData)">确定
</el-button>
<el-button size="small" color="#006080" @click="tableItemCancel(scope)">取消
</el-button>
@ -140,28 +142,29 @@
<!-- table2 -->
<div class="table-box">
<el-table :data="fixedTableData" height="100%" style="width: 100%">
<el-table-column prop="num" label="票号" width="40" align="center"/>
<el-table-column prop="name" label="药物名称" align="center"/>
<el-table-column prop="speed" label="速度(ml/h)" width="100"/>
<el-table-column prop="num" label="票号" width="40" align="center" />
<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">
<template #default="scope"></template>
</el-table-column>
<el-table-column prop="state" label="工作状态" width="70" align="center"/>
<el-table-column prop="state" label="工作状态" width="70" align="center" />
<el-table-column label="特殊情况人为干预" align="center">
<template #default="scope">
<div class="table-btn-box">
<el-button size="small" color="#006080" @click="tableItemPlus(scope)">
<el-icon>
<Plus/>
<Plus />
</el-icon>
</el-button>
<el-button size="small" color="#006080" :disabled="scope.row.speed <= 0"
@click="tableItemMinus(scope)">
@click="tableItemMinus(scope)">
<el-icon>
<Minus/>
<Minus />
</el-icon>
</el-button>
<el-button size="small" color="#006080" @click="tableItemConfirm(scope, fixedTableData)">确定
<el-button size="small" color="#006080"
@click="tableItemConfirm(scope, fixedTableData)">确定
</el-button>
<el-button size="small" color="#006080" @click="tableItemCancel(scope)">取消
</el-button>
@ -175,7 +178,7 @@
<el-dialog v-model="setDatabaseDialog" title="请选择需要查询的病人" width="300px" align-center>
<el-select v-model="database" filterable placeholder="Select" style="width: 100%;">
<el-option v-for="item in databaseOptions" :key="item.value" :label="item.label" :value="item.value"/>
<el-option v-for="item in databaseOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<template #footer>
<span class="dialog-footer">
@ -185,16 +188,16 @@
</template>
</el-dialog>
<el-dialog v-model="isPatientDialog" title="患者信息" width="40%">
<PatientsForm ref="patientsFormRef" type="view" @close="isPatientDialog = false"/>
<PatientsForm ref="patientsFormRef" type="view" @close="isPatientDialog = false" />
</el-dialog>
</div>
</template>
<script lang="ts" setup>
import {onMounted, onUnmounted, reactive, ref} from 'vue';
import {useRouter} from 'vue-router'
import {ElMessage} from 'element-plus';
import {dateFormater} from '@/utils/date-util';
import { onMounted, onUnmounted, reactive, ref } from 'vue';
import { useRouter } from 'vue-router'
import { ElMessage } from 'element-plus';
import { dateFormater } from '@/utils/date-util';
import chartLine from './chart/chart-line.vue';
import chartEcg from './chart/chart-ecg.vue';
import PatientsForm from '@/views/patients-manage/form/patients-form.vue'
@ -202,23 +205,23 @@ import imgLung from '@/assets/imgs/lung.png';
import imgHeart from '@/assets/imgs/heart.png';
import imgLungAlarm from '@/assets/imgs/lung_alarm.png';
import imgHeartAlarm from '@/assets/imgs/heart_alarm.png';
import {useRemoteWsStore} from "@/stores/remote-ws-store";
import {useUserStore} from "@/stores/user-info-store";
import {getPatientInfo} from "@/api/patient";
import { useRemoteWsStore } from "@/stores/remote-ws-store";
import { useUserStore } from "@/stores/user-info-store";
import { getPatientInfo, getPatientInfoM } from "@/api/patient";
const router = useRouter()
const medicineCustom: any[] = [
{name: '丙泊酚', plus: 0.5, total: 50},
{name: '舒芬太尼', plus: 1, total: 100},
{name: '瑞芬太尼', plus: 0.05, total: 5},
{name: '顺阿曲库胺', plus: 0.02, total: 2},
{name: '尼卡地平', plus: 1, total: 100},
{name: '艾司洛尔', plus: 1, total: 100},
{name: '麻黄素', plus: 1, total: 100},
{name: '阿托品', plus: 1, total: 100},
{name: '罗库溴铵', plus: 0.1, total: 10}
{ name: '丙泊酚', plus: 0.5, total: 50 },
{ name: '舒芬太尼', plus: 1, total: 100 },
{ name: '瑞芬太尼', plus: 0.05, total: 5 },
{ name: '顺阿曲库胺', plus: 0.02, total: 2 },
{ name: '尼卡地平', plus: 1, total: 100 },
{ name: '艾司洛尔', plus: 1, total: 100 },
{ name: '麻黄素', plus: 1, total: 100 },
{ name: '阿托品', plus: 1, total: 100 },
{ name: '罗库溴铵', plus: 0.1, total: 10 }
]
const remoteWsStore = useRemoteWsStore()
const currentRemote = ref(remoteWsStore.remoteTasks[remoteWsStore.currentTaskIndex])
@ -240,7 +243,7 @@ const messageSum = ref(10)
const userName = ref(userInfo.userInfo.name)
const setDatabaseDialog = ref(false);
const featureTable = ref([] as any[]);
let chartNowData = reactive({ID: 0});
let chartNowData = reactive({ ID: 0 });
const lungAlarm = ref(false); //
const heartAlarm = ref(false); //
const isAIDose = ref(false); // AI
@ -257,7 +260,6 @@ let currentDocMedicine: any;
const medicineSpeedTemp: any = {};
onMounted(() => {
console.log(currentRemote.value.isRemote)
if (!currentRemote.value.isRemote) {
router.replace('/remote-manage/remote-manage');
return;
@ -265,7 +267,7 @@ onMounted(() => {
msgLogScrollBottom();
initScale();
subscribeWS();
// setTableData();
// setTableData();
});
onUnmounted(() => {
@ -457,29 +459,21 @@ const setDatabase = () => {
};
const viewPatientInfo = () => {
getPatientInfo(currentRemote.value.patient, currentRemote.value.patientId,
currentRemote.value.date).then(res => {
console.log(res)
})
isPatientDialog.value = true;
setTimeout(() => {
patientsFormRef.value.resetData()
patientsFormRef.value.formData = JSON.parse(JSON.stringify({
id: '',
name: '测试',
code: 'afasf',
sex: '男',
dept: '测试',
bodyHeight: '170',
isMedicalHistory: '无',
bodyWeight: '80',
medicalHistoryName: '无',
age: '22',
allergyHistoryName: '无',
phone: '123456',
hospitalTime: new Date()
}))
}, 0)
// 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) {
patientsFormRef.value.resetData()
patientsFormRef.value.formData = JSON.parse(JSON.stringify(res.data))
}
})
}
const backRemote = () => {
router.back();
@ -515,13 +509,13 @@ function msgLogScrollBottom() {
}
const tableItemPlus = (e: any) => {
const obj = medicineCustom.find(item => item.name === e.row.name) || {plus: 1};
const obj = medicineCustom.find(item => item.name === e.row.name) || { plus: 1 };
e.row.speed += obj.plus;
e.row.speed = Number(e.row.speed.toFixed(2));
}
const tableItemMinus = (e: any) => {
const obj = medicineCustom.find(item => item.name === e.row.name) || {plus: 1};
const obj = medicineCustom.find(item => item.name === e.row.name) || { plus: 1 };
if (!isAIDose.value && e.row.speed - obj.plus <= 0) return;
e.row.speed -= obj.plus;
if (e.row.speed < 0) e.row.speed = 0;
@ -585,7 +579,7 @@ function startAI() {
width: 670px;
height: 100%;
& > h3 {
&>h3 {
font-size: 26px;
color: $main-color;
line-height: 30px;
@ -754,7 +748,7 @@ function startAI() {
color: #c77000;
}
& > .el-button {
&>.el-button {
border-radius: 4px;
background-color: #f2f3f5;
color: $main-color;
@ -768,7 +762,7 @@ function startAI() {
display: flex;
justify-content: space-between;
& > .left-box {
&>.left-box {
position: relative;
width: 200px;
height: 100%;
@ -802,44 +796,44 @@ function startAI() {
}
}
& > .right-box {
&>.right-box {
width: calc(100% - 205px);
height: 100%;
// .video-box {
// position: relative;
// width: 100%;
// height: 270px;
// background: $main-color;
// /* background: url(@/assets/imgs/video_bck.png);
//background-size: 100% 100%; */
//
// &:hover {
// .icon-box {
// display: flex;
// }
// }
//
// .icon-box {
// display: none;
// position: absolute;
// top: 0;
// left: 0;
// bottom: 0;
// right: 0;
// font-size: 60px;
// color: white;
// background: rgba(black, .3);
// justify-content: center;
// align-items: center;
// }
//
// video {
// width: 100%;
// height: 100%;
// object-fit: cover;
// }
// }
// .video-box {
// position: relative;
// width: 100%;
// height: 270px;
// background: $main-color;
// /* background: url(@/assets/imgs/video_bck.png);
//background-size: 100% 100%; */
//
// &:hover {
// .icon-box {
// display: flex;
// }
// }
//
// .icon-box {
// display: none;
// position: absolute;
// top: 0;
// left: 0;
// bottom: 0;
// right: 0;
// font-size: 60px;
// color: white;
// background: rgba(black, .3);
// justify-content: center;
// align-items: center;
// }
//
// video {
// width: 100%;
// height: 100%;
// object-fit: cover;
// }
// }
.message-box {
width: 100%;
@ -951,4 +945,5 @@ function startAI() {
}
}
}
}</style>
}
</style>