Compare commits

...

2 Commits

2 changed files with 10 additions and 18 deletions

View File

@@ -511,13 +511,6 @@ 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 {
@@ -685,20 +678,18 @@ const handlePrint = async (row) => {
});
}
// 构建 descJson 字段行(与详情弹窗展示的字段一致)
const fieldKeys = orderedDescFieldKeys;
// 构建 descJson 字段行(与详情弹窗展示的字段一致遍历所有key并通过isFieldMatched过滤
let descFieldsHtml = '';
fieldKeys.forEach((key) => {
for (const key in descData) {
if (!(key in labelMap)) continue;
const label = labelMap[key] || key;
const value = transformField(key, descData[key]);
if (descData[key] != null && descData[key] !== '' && value != null && value !== '') {
descFieldsHtml += `
descFieldsHtml += `
<div class="info-row">
<span class="label">${label}</span>
<span class="value">${value}</span>
<span class="value">${value || '-'}</span>
</div>`;
}
});
}
// 构建完整打印HTML
const printContent = `

View File

@@ -342,13 +342,14 @@ const dialogVisible = computed({
// 使用 drord_doctor_type 字典
const adviceTypeList = computed(() => {
if (drord_doctor_type.value && drord_doctor_type.value.length > 0) {
// 只保留耗材(4)和诊疗(3)类型,并添加全部选项
// 只保留耗材(2)和诊疗(3)类型,并添加全部选项
// 注意后端SQL只认 adviceType=2(耗材) 和 3(诊疗)字典值4需映射为2
const filtered = drord_doctor_type.value.filter(item => {
const val = parseInt(item.value);
return val === 3 || val === 4;
return val === 2 || val === 3 || val === 4;
}).map(item => ({
label: item.label,
// 将前端字典值映射为后端SQL值: 耗材4→2, 诊疗3→3
// 后端SQL只有adviceTypes.contains(2)查询耗材字典值4映射为2
value: parseInt(item.value) === 4 ? 2 : parseInt(item.value)
}));
return [...filtered, { label: '全部', value: '' }];