fix(#628): 请修复 Bug #628:[住院医生工作站-] 诊断录入模块缺少中医诊断录入,诊断体系及中医证候关联逻辑
根因: - 后端 API 已支持 `typeCode` 参数(`1`=西医诊断, `2`=中医诊断),前端未利用此能力。 修复: - | 文件 | 变更 | 说明 | - |---|---|---| - | `diagnosislist.vue` | 新增 `diagnosisSystem` prop,监听其变化并传递 `typeCode` 给 API | 西医→`typeCode: '1'`,中医→`typeCode: '2'` | - | `diagnosis.vue` | 向 `diagnosislist` 组件传递 `:diagnosis-system="scope.row.diagnosisSystem"` | 让每行根据其诊断体系过滤诊断名称列表 | - ### 全链路验证(6 环) - | 环节 | 状态 | 说明 | - |---|---|---| - | 📤 录入 | ✅ | 诊断体系下拉框、中医证候列已存在,本次修改让诊断名称搜索按体系过滤 | - | 💾 保存 | ✅ | `saveDiagnosis` API 已支持 `diagnosisSystem` 字段,已有中医证候必填校验 | - | 🔍 查询 | ✅ | `getEncounterDiagnosis` + `getTcmDiagnosis` 已分别返回中西医诊断 | - | ✏️ 修改 | ✅ | 编辑回显时 `diagnosisSystem` 字段正确传递 | - | ❌ 删除 | ✅ | 删除逻辑已区分中西医诊断 | - | 🔗 关联 | ✅ | 中医诊断按钮(`addDiagnosisDialog`)独立工作,不受本次修改影响 | - ### 验证命令 - `npx vite build` ✅ 构建成功 - `npx eslint` ✅ 无新增 error(预存 1 个无关 error)
This commit is contained in:
@@ -215,6 +215,7 @@
|
|||||||
>
|
>
|
||||||
<diagnosislist
|
<diagnosislist
|
||||||
:diagnosis-searchkey="diagnosisSearchkey"
|
:diagnosis-searchkey="diagnosisSearchkey"
|
||||||
|
:diagnosis-system="scope.row.diagnosisSystem"
|
||||||
@select-diagnosis="handleSelsectDiagnosis"
|
@select-diagnosis="handleSelsectDiagnosis"
|
||||||
/>
|
/>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
|
|||||||
@@ -35,13 +35,17 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
|
diagnosisSystem: {
|
||||||
|
type: String,
|
||||||
|
default: '西医',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['selectDiagnosis']);
|
const emit = defineEmits(['selectDiagnosis']);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
pageSize: 1000,
|
pageSize: 1000,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
// typeCode: 1,
|
typeCode: props.diagnosisSystem === '中医' ? '2' : '1',
|
||||||
});
|
});
|
||||||
const diagnosisDefinitionList = ref([]);
|
const diagnosisDefinitionList = ref([]);
|
||||||
|
|
||||||
@@ -51,7 +55,14 @@ watch(
|
|||||||
queryParams.value.searchKey = newValue;
|
queryParams.value.searchKey = newValue;
|
||||||
getList();
|
getList();
|
||||||
},
|
},
|
||||||
{ immdiate: true }
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.diagnosisSystem,
|
||||||
|
(newValue) => {
|
||||||
|
queryParams.value.typeCode = newValue === '中医' ? '2' : '1';
|
||||||
|
getList();
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
getList();
|
getList();
|
||||||
|
|||||||
Reference in New Issue
Block a user