Compare commits
2 Commits
680db771cd
...
2f9dd2b1df
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f9dd2b1df | |||
| e247aac319 |
@@ -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 = `
|
||||
|
||||
@@ -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: '' }];
|
||||
|
||||
Reference in New Issue
Block a user