医生工作站->患者信息中医页面无法打开bug

This commit is contained in:
2025-12-17 09:58:28 +08:00
parent 27a7396c78
commit 574a9267bf
3 changed files with 38 additions and 38 deletions

View File

@@ -18,11 +18,11 @@ public class SchedulePoolAppServiceImpl implements ISchedulePoolAppService {
@Override @Override
public R<?> addSchedulePool(SchedulePoolDto schedulePoolDto) { public R<?> addSchedulePool(SchedulePoolDto schedulePoolDto) {
//12/15 实体封装过程数据关系复杂 尚未完全理清 下次继续改 //1.数据检验
if(ObjectUtil.isNull(schedulePoolDto)){ if(ObjectUtil.isNull(schedulePoolDto)){
return R.fail("号源不能为空"); return R.fail("号源不能为空");
} }
//2.封装实体
SchedulePool schedulePool = new SchedulePool(); SchedulePool schedulePool = new SchedulePool();
schedulePool.setHospitalId(schedulePoolDto.getHospitalId()); schedulePool.setHospitalId(schedulePoolDto.getHospitalId());
schedulePool.setDeptId(schedulePoolDto.getDeptId()); schedulePool.setDeptId(schedulePoolDto.getDeptId());
@@ -35,6 +35,7 @@ public class SchedulePoolAppServiceImpl implements ISchedulePoolAppService {
schedulePool.setRegType(schedulePoolDto.getRegType()); schedulePool.setRegType(schedulePoolDto.getRegType());
schedulePool.setFee(schedulePoolDto.getFee()); schedulePool.setFee(schedulePoolDto.getFee());
//3.保存
boolean save = schedulePoolService.save(schedulePool); boolean save = schedulePoolService.save(schedulePool);
return R.ok(save); return R.ok(save);
} }

View File

@@ -583,36 +583,38 @@ function getListInfo(addNewRow) {
getTcmAdviceList({ encounterId: props.patientInfo.encounterId }).then((res) => { getTcmAdviceList({ encounterId: props.patientInfo.encounterId }).then((res) => {
if (res && res.data && Array.isArray(res.data)) { if (res && res.data && Array.isArray(res.data)) {
// 清空当前处方列表
tcmPrescriptionList.value = [];
// 处理返回的数据 // 处理返回的数据
res.data.forEach((item) => { if (res.data.length > 0) {
try { // 如果有数据,清空当前列表并重新添加
// 解析contentJson获取完整的医嘱数据 tcmPrescriptionList.value = [];
const contentData = item.contentJson ? JSON.parse(item.contentJson) : {};
// 创建一个新的处方对象 res.data.forEach((item) => {
const newPrescription = { try {
...item, // 解析contentJson获取完整的医嘱数据
...contentData, const contentData = item.contentJson ? JSON.parse(item.contentJson) : {};
// 确保关键显示字段存在
adviceName: contentData.adviceName || item.adviceName || '',
quantity: contentData.quantity || item.quantity || '',
totalPrice: contentData.totalPrice || item.totalPrice || '',
diagnosisName: contentData.diagnosisName || item.diagnosisName || '',
positionName: contentData.positionName || item.positionName || '',
doseUnitCode_dictText: contentData.doseUnitCode_dictText || item.doseUnitCode_dictText || '',
chineseHerbsDoseQuantity: contentData.chineseHerbsDoseQuantity || item.chineseHerbsDoseQuantity || '',
prescriptionList: [contentData]
};
// 添加到处方列表 // 创建一个新的处方对象
tcmPrescriptionList.value.push(newPrescription); const newPrescription = {
} catch (error) { ...item,
console.error('解析医嘱数据失败:', error, '数据项:', item); ...contentData,
} // 确保关键显示字段存在
}); adviceName: contentData.adviceName || item.adviceName || '',
quantity: contentData.quantity || item.quantity || '',
totalPrice: contentData.totalPrice || item.totalPrice || '',
diagnosisName: contentData.diagnosisName || item.diagnosisName || '',
positionName: contentData.positionName || item.positionName || '',
doseUnitCode_dictText: contentData.doseUnitCode_dictText || item.doseUnitCode_dictText || '',
chineseHerbsDoseQuantity: contentData.chineseHerbsDoseQuantity || item.chineseHerbsDoseQuantity || '',
prescriptionList: [contentData]
};
// 添加到处方列表
tcmPrescriptionList.value.push(newPrescription);
} catch (error) {
console.error('解析医嘱数据失败:', error, '数据项:', item);
}
});
}
// 重新计算总金额 // 重新计算总金额
handleTotalAmount(); handleTotalAmount();
@@ -622,11 +624,11 @@ function getListInfo(addNewRow) {
} }
} else { } else {
console.error('获取医嘱列表失败或数据格式错误:', res); console.error('获取医嘱列表失败或数据格式错误:', res);
tcmPrescriptionList.value = []; // 保持当前列表不变,不要清空
} }
}).catch(error => { }).catch(error => {
console.error('获取医嘱列表异常:', error); console.error('获取医嘱列表异常:', error);
tcmPrescriptionList.value = []; // 保持当前列表不变,不要清空
}); });
tcmDiagnosisList.value = getFromDiagnosis(props.patientInfo.encounterId); tcmDiagnosisList.value = getFromDiagnosis(props.patientInfo.encounterId);

View File

@@ -30,7 +30,7 @@
<span class="menu-icon">👥</span> <span class="menu-icon">👥</span>
<span>患者管理</span> <span>患者管理</span>
</div> </div>
<div class="menu-item" @click="navigateToAppoinmentManage"> <div class="menu-item">
<span class="menu-icon">💉</span> <span class="menu-icon">💉</span>
<span>预约管理</span> <span>预约管理</span>
</div> </div>
@@ -203,10 +203,7 @@ function awaitingMedicineBtn() {
router.push({ path: '/medicationmanagement/statisticalManagement/earlyWarning' }); router.push({ path: '/medicationmanagement/statisticalManagement/earlyWarning' });
} }
// 跳转到预约管理页面
function navigateToAppoinmentManage() {
router.push({ path: '/appoinmentmanage' });
}
function getExpirationWarningCount() { function getExpirationWarningCount() {
getExpirationWarning({ pageNo: 1, pageSize: 10 }).then((res) => { getExpirationWarning({ pageNo: 1, pageSize: 10 }).then((res) => {
total.value = res.data.total || 0; total.value = res.data.total || 0;