提交merge1.3

This commit is contained in:
2025-12-27 15:30:25 +08:00
parent 8c607c8749
commit 088861f66e
1245 changed files with 220442 additions and 77616 deletions

View File

@@ -164,7 +164,11 @@
<script setup>
import { getPrescriptionList, adviceExecute, adviceCancel, medicineSummary } from './api';
<<<<<<< HEAD
import { patientInfoList } from '../store/patient.js';
=======
import { patientInfoList } from '../../components/store/patient.js';
>>>>>>> v1.3
import { formatDate, formatDateStr } from '@/utils/index';
import { ref, getCurrentInstance } from 'vue';
import useUserStore from '@/store/modules/user';
@@ -203,6 +207,7 @@ function handleGetPrescription() {
therapyEnum: therapyEnum.value,
exeStatus: props.exeStatus,
requestStatus: props.requestStatus,
<<<<<<< HEAD
}).then((res) => {
// try {
// 根据encounterId分组
@@ -253,6 +258,68 @@ function handleGetPrescription() {
// loading.value = false;
// }
});
=======
})
.then((res) => {
// try {
// 根据encounterId分组
const groupedPrescriptions = res.data.records.reduce((groups, prescription) => {
let times = new Set();
let rate = {};
let checkedRates = {};
// 汇总时间点 默认全部汇总
prescription.dispenseIds = [];
prescription.medicineSummaryParamList.forEach((item) => {
// 已汇总的时间点不需要显示
if (item.dispenseStatus != 8) {
prescription.dispenseIds.push({
dispenseId: item.dispenseId,
receiverId: userStore.id,
});
// 将全部的时间点拆分 把日期去重,页面显示示例 05-15 [01:30 02:30 03:30]
let time = item.dispenseTime?.substring(5, 10);
let rateTime = item.dispenseTime?.substring(11, 16);
times.add(time);
rate[time] = rate[time] || [];
rate[time].push({ rate: rateTime, dispenseId: item.dispenseId });
checkedRates[time] = checkedRates[time] || [];
checkedRates[time].push(rateTime);
}
});
prescription.times = Array.from(times);
prescription.rate = rate;
prescription.checkedRates = checkedRates;
// 把相同encounterId的医嘱放在同一个数组中
const encounterId = prescription.encounterId;
if (!groups[encounterId]) {
groups[encounterId] = [];
}
if (!activeNames.value.includes(encounterId)) {
activeNames.value.push(encounterId);
}
groups[encounterId].push(prescription);
return groups;
}, {});
// 将分组结果转换为数组形式
prescriptionList.value = Object.values(groupedPrescriptions);
loading.value = false;
// } catch {
// loading.value = false;
// }
})
.catch((err) => {
loading.value = false;
useUserStore()
.logOut()
.then(() => {
ElMessage.error(err);
next({ path: '/' });
});
});
>>>>>>> v1.3
chooseAll.value = false;
} else {
prescriptionList.value = [];
@@ -324,4 +391,8 @@ defineExpose({
font-size: 15px;
font-weight: 500;
}
</style>
<<<<<<< HEAD
</style>
=======
</style>
>>>>>>> v1.3

View File

@@ -49,7 +49,11 @@
<script setup>
import { getMedicineSummary, getMedicineSummaryDetail } from './api';
<<<<<<< HEAD
import { patientInfoList } from '../store/patient.js';
=======
import { patientInfoList } from '../../components/store/patient.js';
>>>>>>> v1.3
import { ref, getCurrentInstance } from 'vue';
const medicineSummaryFormList = ref([]);