错误修复

This commit is contained in:
yy 2024-05-30 09:24:07 +08:00
parent 134d202f67
commit 63ccb81c9b
5 changed files with 944 additions and 941 deletions

View File

@ -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({

View File

@ -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>

View File

@ -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']);
} }
}) })
@ -56,6 +59,8 @@ function updateChartData(data: any) {
}) })
} }
} }
}
}
function chartInit() { function chartInit() {
chart = echarts.init(chartDom.value as HTMLElement); chart = echarts.init(chartDom.value as HTMLElement);

View File

@ -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) {

View File

@ -125,8 +125,8 @@
<Minus/> <Minus/>
</el-icon> </el-icon>
</el-button> </el-button>
<!--<el-button size="small" color="#006080" @click="tableItemConfirm(scope)" &lt;!&ndash; <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">确定&ndash;&gt;-->
<!--<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)">取消
@ -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 = [];
@ -402,7 +399,6 @@ function updateMedicineTable(aiMedicine: any, doctorMedicine: any) {
} }
} }
} }
}
function vitalExcepEvent(data: any) { function vitalExcepEvent(data: any) {
logUpdate(data) logUpdate(data)