Compare commits

...

3 Commits

Author SHA1 Message Date
赵云
3beec42913 Fix Bug #528: [住院医生工作站-检查申请] 修改申请单成功后,弹窗未自动关闭且列表数据未自动刷新
根因:submit() 方法的 .then() 回调中 else 分支使用 res.message(后端返回 res.msg),
且缺少 .catch() 错误处理。当请求异常时既无错误提示也不触发 submitOk 事件。

修复:
1. 统一使用 res.msg 替代 res.message
2. 添加 .catch() 错误处理(console.error + 用户提示)
3. 统一使用已导入的 ElMessage 替代 proxy.$message

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-16 21:08:58 +08:00
赵云
3df5c697dd Fix Bug #518: [门诊医生工作站-诊断-传染病报卡] 报卡页面缺失"性别、出生日期、实足年龄"核心字段
根因1: 性别单选按钮使用 value 属性而非 label 属性,导致 Element Plus
  el-radio 无法绑定 v-model 值,UI 不显示选中状态
根因2: normalizeSexFromPatientInfo 函数 genderEnum 兜底逻辑未处理字符串类型
  和 0 值情况,导致性别解析在部分场景下返回"未知"

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 20:26:11 +08:00
赵云
19cd4a87d4 Fix Bug #476: 住院医生工作-检查申请单界面缺失核心临床字段(紧急程度、过敏史、检查目的等)
详情弹窗和打印功能缺少紧急程度、过敏史、检查目的、期望检查时间、病史摘要等字段显示。
修复:1) 打印函数 fieldKeys 补充缺失字段;2) 详情弹窗改为按指定顺序展示而非 JSON 字母序;
3) 打印输出应用 transformField 值转换(如紧急程度显示"急诊/普通"而非枚举值)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 19:24:40 +08:00
3 changed files with 30 additions and 19 deletions

View File

@@ -54,9 +54,9 @@
<el-col :span="7" class="form-item">
<span class="form-label required">性别</span>
<el-radio-group v-model="form.sex" class="gender-radio-group">
<el-radio value="男"></el-radio>
<el-radio value="女"></el-radio>
<el-radio value="未知">未知</el-radio>
<el-radio label="男"></el-radio>
<el-radio label="女"></el-radio>
<el-radio label="未知">未知</el-radio>
</el-radio-group>
</el-col>
<el-col :span="10" class="form-item">
@@ -1044,8 +1044,9 @@ function normalizeSexFromPatientInfo(patientInfo) {
if (patientInfo.genderName) return patientInfo.genderName;
if (patientInfo.sex) return normalizeSex(patientInfo.sex);
// 使用数字枚举字段
if (patientInfo.genderEnum === 1) return '男';
if (patientInfo.genderEnum === 2) return '女';
if (patientInfo.genderEnum === 1 || patientInfo.genderEnum === '1') return '男';
if (patientInfo.genderEnum === 2 || patientInfo.genderEnum === '2') return '女';
if (patientInfo.genderEnum === 0 || patientInfo.genderEnum === '0') return '未知';
return '未知';
}

View File

@@ -179,11 +179,14 @@
<div v-if="descJsonData && hasMatchedFields" class="applicationShow-container-content">
<el-descriptions title="申请单描述" :column="2">
<template v-for="(value, key) in descJsonData" :key="key">
<el-descriptions-item v-if="isFieldMatched(key)" :label="getFieldLabel(key)">
{{ transformField(key, value) || '-' }}
</el-descriptions-item>
</template>
<el-descriptions-item
v-for="key in orderedDescFieldKeys"
:key="key"
v-if="descJsonData[key] != null && descJsonData[key] !== ''"
:label="getFieldLabel(key)"
>
{{ transformField(key, descJsonData[key]) || '-' }}
</el-descriptions-item>
</el-descriptions>
</div>
@@ -511,6 +514,13 @@ const hasMatchedFields = computed(() => {
return Object.keys(descJsonData.value).some((key) => isFieldMatched(key));
});
// Ordered field keys for detail display and print, matching the bug requirement order
const orderedDescFieldKeys = [
'targetDepartment', 'urgencyLevel', 'allergyHistory', 'examinationPurpose',
'expectedExaminationTime', 'medicalHistorySummary', 'symptom', 'sign',
'clinicalDiagnosis', 'otherDiagnosis', 'relatedResult', 'attention',
];
/** 查询科室 */
const getLocationInfo = async () => {
try {
@@ -679,15 +689,16 @@ const handlePrint = async (row) => {
}
// 构建 descJson 字段行(与详情弹窗展示的字段一致)
const fieldKeys = ['targetDepartment', 'symptom', 'sign', 'clinicalDiagnosis', 'otherDiagnosis', 'relatedResult', 'attention'];
const fieldKeys = orderedDescFieldKeys;
let descFieldsHtml = '';
fieldKeys.forEach((key) => {
const label = labelMap[key] || key;
if (descData[key] != null && descData[key] !== '') {
const value = transformField(key, descData[key]);
if (descData[key] != null && descData[key] !== '' && value != null && value !== '') {
descFieldsHtml += `
<div class="info-row">
<span class="label">${label}</span>
<span class="value">${descData[key]}</span>
<span class="value">${value}</span>
</div>`;
}
});

View File

@@ -499,17 +499,16 @@ const submit = () => {
categoryEnum: '22',
}).then((res) => {
if (res.code === 200) {
if (props.isEditMode) {
proxy.$message.success(res.msg || '修改成功');
} else {
proxy.$message.success(res.msg);
}
ElMessage.success(res.msg || (props.isEditMode ? '修改成功' : '保存成功'));
applicationList.value = [];
resetForm();
emits('submitOk');
} else {
proxy.$message.error(res.message);
ElMessage.error(res.msg || '保存失败');
}
}).catch((error) => {
console.error('保存检查申请失败:', error);
ElMessage.error('保存失败,请稍后重试');
});
};