Compare commits

...

2 Commits

Author SHA1 Message Date
150ecc057f Fix Bug #524: [门诊/医生个人报卡管理] 传染病报告卡保存后数据回显失败 — 根因:showReport 加载数据时 watch 监听 selectedClassA/B/C 变化清空了 diseaseType 分型字段,修复:新增 loadingData 标志在 showReport 加载期间跳过 watch 清空逻辑
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 09:11:56 +08:00
d54ad5ef88 Fix Bug #522: [住院护士站-三测单] 体征录入点击保存后缺乏执行反馈且窗口异常自动关闭
根因: proxy.msgSuccess 不存在(正确路径为 proxy.$modal.msgSuccess),
导致保存成功提示无法弹出;同时 addVitalSigns 缺少 .catch() 块,
API 失败时既无错误提示也无任何反馈。

修复:
1. proxy.msgSuccess → proxy.$modal.msgSuccess(保存成功提示)
2. 添加 .catch() 块:console.error 日志 + proxy.$modal.msgError 错误提示

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 09:11:56 +08:00
2 changed files with 14 additions and 2 deletions

View File

@@ -548,6 +548,8 @@ const dialogReadOnly = ref(false);
const formRef = ref(null);
// 保存按钮加载状态,防止重复提交
const submitLoading = ref(false);
// 数据加载中标志,防止 showReport 加载已有数据时 watch 清空分型字段
const loadingData = ref(false);
const props = defineProps({
title: {
@@ -940,7 +942,8 @@ const showSubtypeSelect = computed(() => {
// 监听疾病选择变化,自动清空分型选择
watch(() => [form.value.selectedClassA, form.value.selectedClassB, form.value.selectedClassC], (newVal, oldVal) => {
// 如果疾病选择发生变化,清空分型选择
if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
// 数据加载中时不清空,避免 showReport 加载已有数据时被错误清空
if (JSON.stringify(newVal) !== JSON.stringify(oldVal) && !loadingData.value) {
form.value.diseaseType = '';
}
}, { deep: true });
@@ -1092,6 +1095,9 @@ function showReport(reportData = {}, readOnly = true) {
dialogVisible.value = true;
dialogReadOnly.value = readOnly;
// 标记数据加载中,防止 watch 清空 diseaseType 分型字段
loadingData.value = true;
resetAddressSelector();
initProvinceOptions();
@@ -1149,6 +1155,9 @@ function showReport(reportData = {}, readOnly = true) {
form.value.addressCounty,
form.value.addressTown
);
// 数据加载完成,恢复 watch 监听
loadingData.value = false;
}
/**

View File

@@ -1058,7 +1058,7 @@ function confirmCharge() {
addVitalSigns(params).then(res => {
if (res.code === 200) {
proxy.msgSuccess('保存成功');
proxy.$modal.msgSuccess('保存成功');
// 保存成功后刷新列表
getPatientList();
// 清空表单
@@ -1088,6 +1088,9 @@ function confirmCharge() {
stoolVolume: '',
};
}
}).catch(err => {
console.error('保存体征数据失败:', err);
proxy.$modal.msgError('保存失败,请重试');
});
}
/** 重置操作表单 */