mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-24 13:04:57 +08:00
错误修复
This commit is contained in:
parent
134d202f67
commit
63ccb81c9b
|
@ -50,7 +50,7 @@ if (token) {
|
||||||
router.addRoute({
|
router.addRoute({
|
||||||
name: "root",
|
name: "root",
|
||||||
path: "/",
|
path: "/",
|
||||||
redirect: "/home"
|
redirect: "/remote-manage"
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
router.addRoute({
|
router.addRoute({
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown trigger="click" @command="userCommand">
|
<el-dropdown trigger="click" @command="userCommand">
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
{{ userInfo.name }}
|
{{ userInfo?.name }}
|
||||||
<el-icon class="el-icon--right">
|
<el-icon class="el-icon--right">
|
||||||
<arrow-down/>
|
<arrow-down/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
|
|
|
@ -34,17 +34,20 @@ onMounted(() => {
|
||||||
|
|
||||||
function updateChartData(data: any) {
|
function updateChartData(data: any) {
|
||||||
if (data) {
|
if (data) {
|
||||||
if (currentNode && currentNode.Time == data.Time) {
|
if (currentNode && currentNode.Time == data[0].Time) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
currentNode = data;
|
currentNode = data[0];
|
||||||
}
|
}
|
||||||
|
for (let i = data.length - 1; i >= 0; i--) {
|
||||||
|
const item = data[i]
|
||||||
|
if (xData.indexOf(dateFormater("HH:mm:ss", item.Time)) == -1) {
|
||||||
xData.shift();
|
xData.shift();
|
||||||
xData.push(dateFormater("HH:mm:ss", data.Time ? data.Time - 8 * 60 * 60 * 1000 : ''));
|
xData.push(dateFormater("HH:mm:ss", item.Time));
|
||||||
series.forEach(serie => {
|
series.forEach((serie: any) => {
|
||||||
serie.data.shift();
|
serie.data.shift();
|
||||||
serie.data.push(data[serie.name]);
|
serie.data.push(item[serie.name]);
|
||||||
if (data[serie.name + '_except']) {
|
if (item[serie.name + '_except']) {
|
||||||
emit("exceptionEvent", remoteWsStore.exceptionMsg[serie.name + '_except']);
|
emit("exceptionEvent", remoteWsStore.exceptionMsg[serie.name + '_except']);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -55,6 +58,8 @@ function updateChartData(data: any) {
|
||||||
series,
|
series,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function chartInit() {
|
function chartInit() {
|
||||||
|
|
|
@ -140,7 +140,9 @@ onMounted(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
if (remoteItem.value) {
|
||||||
remoteWsStore.unsubscribeVital(remoteItem.value.patient, remoteItem.value.patientId, remoteItem.value.date, currentIndex);
|
remoteWsStore.unsubscribeVital(remoteItem.value.patient, remoteItem.value.patientId, remoteItem.value.date, currentIndex);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function showData(i: any) {
|
function showData(i: any) {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<div class="center-box">
|
<div class="center-box">
|
||||||
<div class="body-box">
|
<div class="body-box">
|
||||||
<div class="body-img">
|
<div class="body-img">
|
||||||
<img src="@/assets/imgs/main_body.png" style="width: 100%;height: 100%;" />
|
<img src="@/assets/imgs/main_body.png" style="width: 100%;height: 100%;"/>
|
||||||
<img class="lung-img" :class="{ 'shake_1': lungAlarm }"
|
<img class="lung-img" :class="{ 'shake_1': lungAlarm }"
|
||||||
:src="lungAlarm ? imgLungAlarm : imgLung">
|
:src="lungAlarm ? imgLungAlarm : imgLung">
|
||||||
<img class="heart-img" :class="{ 'shake_1': heartAlarm }"
|
<img class="heart-img" :class="{ 'shake_1': heartAlarm }"
|
||||||
|
@ -44,11 +44,11 @@
|
||||||
<!-- </el-select>-->
|
<!-- </el-select>-->
|
||||||
<el-button color="#C77000" style="width: 150px;" @click="viewPatientInfo">患者信息</el-button>
|
<el-button color="#C77000" style="width: 150px;" @click="viewPatientInfo">患者信息</el-button>
|
||||||
<el-button color="#C77000" style="width: 150px;">已连接</el-button>
|
<el-button color="#C77000" style="width: 150px;">已连接</el-button>
|
||||||
<!-- <el-button color="#C77000" >机器人运行正常</el-button>-->
|
<!-- <el-button color="#C77000" >机器人运行正常</el-button>-->
|
||||||
</div>
|
</div>
|
||||||
<el-button color="#e0e0e0" @click="backRemote">
|
<el-button color="#e0e0e0" @click="backRemote">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<Back />
|
<Back/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
返回
|
返回
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="send-box">
|
<div class="send-box">
|
||||||
<el-input v-model="msgVal" placeholder="请输入消息" />
|
<el-input v-model="msgVal" placeholder="请输入消息"/>
|
||||||
<el-button color="#006080" @click="sendMsg">发送消息</el-button>
|
<el-button color="#006080" @click="sendMsg">发送消息</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -110,8 +110,8 @@
|
||||||
</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="70" align="center" />
|
<el-table-column prop="state" label="工作状态" width="70" 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">
|
||||||
<el-button size="small" color="#006080" @click="tableItemPlus(scope)">
|
<el-button size="small" color="#006080" @click="tableItemPlus(scope)">
|
||||||
|
@ -125,8 +125,8 @@
|
||||||
<Minus/>
|
<Minus/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
<!--<el-button size="small" color="#006080" @click="tableItemConfirm(scope)"
|
<!– <el-button size="small" color="#006080" @click="tableItemConfirm(scope)"
|
||||||
:disabled="tableDataStore[scope.$index].speed === scope.row.speed">确定-->
|
: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>
|
||||||
<el-button size="small" color="#006080" @click="tableItemCancel(scope)">取消
|
<el-button size="small" color="#006080" @click="tableItemCancel(scope)">取消
|
||||||
|
@ -139,11 +139,11 @@
|
||||||
<!-- table2 -->
|
<!-- table2 -->
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<el-table :data="fixedTableData" height="100%" style="width: 100%">
|
<el-table :data="fixedTableData" height="100%" style="width: 100%">
|
||||||
<el-table-column type="index" label="序号" width="40" align="center" />
|
<el-table-column type="index" label="序号" width="40" align="center"/>
|
||||||
<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="70" align="center" />
|
<el-table-column prop="state" label="工作状态" width="70" 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">
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
|
|
||||||
<el-dialog v-model="setDatabaseDialog" title="请选择需要查询的病人" width="300px" align-center>
|
<el-dialog v-model="setDatabaseDialog" title="请选择需要查询的病人" width="300px" align-center>
|
||||||
<el-select v-model="database" filterable placeholder="Select" style="width: 100%;">
|
<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>
|
</el-select>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
|
@ -182,16 +182,16 @@
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog v-model="isPatientDialog" title="患者信息" width="50%">
|
<el-dialog v-model="isPatientDialog" title="患者信息" width="50%">
|
||||||
<PatientsForm ref="patientsFormRef" type="view" @close="isPatientDialog = false" />
|
<PatientsForm ref="patientsFormRef" type="view" @close="isPatientDialog = false"/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, reactive, ref } from 'vue';
|
import {onMounted, onUnmounted, reactive, ref} from 'vue';
|
||||||
import { useRouter } from 'vue-router'
|
import {useRouter} from 'vue-router'
|
||||||
import { ElMessage } from 'element-plus';
|
import {ElMessage} from 'element-plus';
|
||||||
import { dateFormater } from '@/utils/date-util';
|
import {dateFormater} from '@/utils/date-util';
|
||||||
import chartLine from './chart/chart-line.vue';
|
import chartLine from './chart/chart-line.vue';
|
||||||
import chartEcg from './chart/chart-ecg.vue';
|
import chartEcg from './chart/chart-ecg.vue';
|
||||||
import PatientsForm from '@/views/patients-manage/form/patients-form.vue'
|
import PatientsForm from '@/views/patients-manage/form/patients-form.vue'
|
||||||
|
@ -199,23 +199,23 @@ import imgLung from '@/assets/imgs/lung.png';
|
||||||
import imgHeart from '@/assets/imgs/heart.png';
|
import imgHeart from '@/assets/imgs/heart.png';
|
||||||
import imgLungAlarm from '@/assets/imgs/lung_alarm.png';
|
import imgLungAlarm from '@/assets/imgs/lung_alarm.png';
|
||||||
import imgHeartAlarm from '@/assets/imgs/heart_alarm.png';
|
import imgHeartAlarm from '@/assets/imgs/heart_alarm.png';
|
||||||
import { useRemoteWsStore } from "@/stores/remote-ws-store";
|
import {useRemoteWsStore} from "@/stores/remote-ws-store";
|
||||||
import { useUserStore } from "@/stores/user-info-store";
|
import {useUserStore} from "@/stores/user-info-store";
|
||||||
import { getPatientInfo, getPatientInfoM } from "@/api/patient";
|
import {getPatientInfo, getPatientInfoM} from "@/api/patient";
|
||||||
|
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const medicineCustom: any[] = [
|
const medicineCustom: any[] = [
|
||||||
{ name: '丙泊酚', plus: 0.5, total: 50 },
|
{name: '丙泊酚', plus: 0.5, total: 50},
|
||||||
{ name: '舒芬太尼', plus: 1, total: 100 },
|
{name: '舒芬太尼', plus: 1, total: 100},
|
||||||
{ name: '瑞芬太尼', plus: 0.05, total: 5 },
|
{name: '瑞芬太尼', plus: 0.05, total: 5},
|
||||||
{ name: '顺阿曲库胺', plus: 0.02, total: 2 },
|
{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: 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.1, total: 10}
|
||||||
]
|
]
|
||||||
const remoteWsStore = useRemoteWsStore()
|
const remoteWsStore = useRemoteWsStore()
|
||||||
const currentRemote = ref()
|
const currentRemote = ref()
|
||||||
|
@ -237,7 +237,7 @@ const messageSum = ref(10)
|
||||||
const userName = ref(userInfo.userInfo.name)
|
const userName = ref(userInfo.userInfo.name)
|
||||||
const setDatabaseDialog = ref(false);
|
const setDatabaseDialog = ref(false);
|
||||||
const featureTable = ref([] as any[]);
|
const featureTable = ref([] as any[]);
|
||||||
let chartNowData = reactive({ ID: 0 });
|
let chartNowData = reactive({ID: 0});
|
||||||
const lungAlarm = ref(false); // 肺部警告
|
const lungAlarm = ref(false); // 肺部警告
|
||||||
const heartAlarm = ref(false); // 心脏警告
|
const heartAlarm = ref(false); // 心脏警告
|
||||||
const isAIDose = ref(false); // 是否AI给药
|
const isAIDose = ref(false); // 是否AI给药
|
||||||
|
@ -277,10 +277,10 @@ function subscribeWS() {
|
||||||
remoteWsStore.subscribeVital(currentRemote.value.patient, currentRemote.value.patientId, currentRemote.value.date, index,
|
remoteWsStore.subscribeVital(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);
|
||||||
chartDom1.value.updateChartData(data.vitalSignsList[0]);
|
chartDom1.value.updateChartData(data.vitalSignsList);
|
||||||
chartDom2.value.updateChartData(data.vitalSignsList[0]);
|
chartDom2.value.updateChartData(data.vitalSignsList);
|
||||||
chartDom3.value.updateChartData(data.vitalSignsList[0]);
|
chartDom3.value.updateChartData(data.vitalSignsList);
|
||||||
chartDom4.value.updateChartData(data.vitalSignsList[0]);
|
chartDom4.value.updateChartData(data.vitalSignsList);
|
||||||
updateMedicineTable(data.aiMedicineList[0], data.docMedicineList[0]);
|
updateMedicineTable(data.aiMedicineList[0], data.docMedicineList[0]);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -323,8 +323,7 @@ function updateMedicineTable(aiMedicine: any, doctorMedicine: any) {
|
||||||
if (aiMedicine) {
|
if (aiMedicine) {
|
||||||
delete aiMedicine._id;
|
delete aiMedicine._id;
|
||||||
delete aiMedicine.Time;
|
delete aiMedicine.Time;
|
||||||
if (currentAIMedicine && currentAIMedicine.Time == aiMedicine.Time) {
|
|
||||||
} else {
|
|
||||||
currentAIMedicine = aiMedicine;
|
currentAIMedicine = aiMedicine;
|
||||||
const keys = Object.keys(aiMedicine);
|
const keys = Object.keys(aiMedicine);
|
||||||
keys.forEach(key => {
|
keys.forEach(key => {
|
||||||
|
@ -358,13 +357,11 @@ function updateMedicineTable(aiMedicine: any, doctorMedicine: any) {
|
||||||
fixedTableData.value = fixedTable;
|
fixedTableData.value = fixedTable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (doctorMedicine) {
|
if (doctorMedicine) {
|
||||||
delete doctorMedicine._id;
|
delete doctorMedicine._id;
|
||||||
delete doctorMedicine.Time;
|
delete doctorMedicine.Time;
|
||||||
if (currentDocMedicine && currentDocMedicine.Time == doctorMedicine.Time) {
|
|
||||||
} else {
|
|
||||||
currentDocMedicine = doctorMedicine;
|
currentDocMedicine = doctorMedicine;
|
||||||
const keys = Object.keys(doctorMedicine);
|
const keys = Object.keys(doctorMedicine);
|
||||||
keys.forEach(key => {
|
keys.forEach(key => {
|
||||||
|
@ -373,12 +370,12 @@ function updateMedicineTable(aiMedicine: any, doctorMedicine: any) {
|
||||||
|
|
||||||
if (varTableData.value.length > 0) {
|
if (varTableData.value.length > 0) {
|
||||||
varTableData.value.forEach((medicine: any) => {
|
varTableData.value.forEach((medicine: any) => {
|
||||||
medicine.speed = Number(doctorMedicine[medicine.name]) + Number(aiMedicine[medicine.name]);
|
medicine.speed = (Number(doctorMedicine[medicine.name]) + Number(aiMedicine[medicine.name])).toFixed(2);
|
||||||
medicine.total = Number(doctorMedicine[medicine.name + "sum"]) + Number(aiMedicine[medicine.name + "sum"]);
|
medicine.total = (Number(doctorMedicine[medicine.name + "sum"]) + Number(aiMedicine[medicine.name + "sum"])).toFixed(2);
|
||||||
});
|
});
|
||||||
fixedTableData.value.forEach((medicine: any) => {
|
fixedTableData.value.forEach((medicine: any) => {
|
||||||
medicine.speed = Number(doctorMedicine[medicine.name]) + Number(aiMedicine[medicine.name]);
|
medicine.speed = (Number(doctorMedicine[medicine.name]) + Number(aiMedicine[medicine.name])).toFixed(2);
|
||||||
medicine.total = Number(doctorMedicine[medicine.name + "sum"]) + Number(aiMedicine[medicine.name + "sum"]);
|
medicine.total = (Number(doctorMedicine[medicine.name + "sum"]) + Number(aiMedicine[medicine.name + "sum"])).toFixed(2);
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const varTable: any = [];
|
const varTable: any = [];
|
||||||
|
@ -401,7 +398,6 @@ function updateMedicineTable(aiMedicine: any, doctorMedicine: any) {
|
||||||
fixedTableData.value = fixedTable;
|
fixedTableData.value = fixedTable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function vitalExcepEvent(data: any) {
|
function vitalExcepEvent(data: any) {
|
||||||
|
@ -510,13 +506,13 @@ function msgLogScrollBottom() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const tableItemPlus = (e: any) => {
|
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 += obj.plus;
|
||||||
e.row.speed = Number(e.row.speed.toFixed(2));
|
e.row.speed = Number(e.row.speed.toFixed(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
const tableItemMinus = (e: any) => {
|
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;
|
if (!isAIDose.value && e.row.speed - obj.plus <= 0) return;
|
||||||
e.row.speed -= obj.plus;
|
e.row.speed -= obj.plus;
|
||||||
if (e.row.speed < 0) e.row.speed = 0;
|
if (e.row.speed < 0) e.row.speed = 0;
|
||||||
|
@ -582,7 +578,7 @@ function startAI() {
|
||||||
width: 37%;
|
width: 37%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
&>h3 {
|
& > h3 {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
color: $main-color;
|
color: $main-color;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
|
@ -751,7 +747,7 @@ function startAI() {
|
||||||
color: #c77000;
|
color: #c77000;
|
||||||
}
|
}
|
||||||
|
|
||||||
&>.el-button {
|
& > .el-button {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: #f2f3f5;
|
background-color: #f2f3f5;
|
||||||
color: $main-color;
|
color: $main-color;
|
||||||
|
@ -765,7 +761,7 @@ function startAI() {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
&>.left-box {
|
& > .left-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -799,7 +795,7 @@ function startAI() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&>.right-box {
|
& > .right-box {
|
||||||
width: calc(100% - 205px);
|
width: calc(100% - 205px);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user