fix(#625): 请修复 Bug #625:[住院医生工作站-诊断录入] “诊断类别”字段下拉字典调用错误,混淆为了患者就诊/医保类型
根因:
- **
- 住院医生工作站「诊断录入」页面的「诊断类别」下拉菜单错误使用了 `med_type`(就诊/医保类型)字典,而非 `diag_type`(住院诊断类别)字典
- 其中 `index.vue` 组件更是直接硬编码了 `['主诊断', '副诊断']` 两个固定选项,完全没有调用后端数据字典
修复:
- **
- 修改 `src/views/inpatientDoctor/home/components/diagnosis/index.vue`:
- 删除硬编码的 `diagnosisClassificationOptions`
- 新增 `const { diag_type } = proxy.useDict('diag_type')` 从后端获取住院诊断类别字典
- 模板中 `v-for="item in diagnosisClassificationOptions"` → `v-for="item in diag_type"`
- 修改 `src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue`:
- `proxy.useDict('med_type')` → `proxy.useDict('diag_type')`
- 模板中 `v-for="item in med_type"` → `v-for="item in diag_type"`
- 验证结果:**
- ✅ `npm run build:prod` 编译通过(exit code 0)
- ✅ 修改文件的 ESLint 检查无新增错误(既有 warning/error 为项目预存问题)
- ✅ 后端 `diag_type` 字典已有其他组件(`doctorstation/components/diagnosis/`)在使用,字典数据正常
This commit is contained in:
@@ -159,7 +159,7 @@
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in med_type"
|
||||
v-for="item in diag_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -332,7 +332,8 @@ const props = defineProps({
|
||||
const emits = defineEmits(['diagnosisSave']);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const userStore = useUserStore();
|
||||
const { med_type } = proxy.useDict('med_type');
|
||||
// 获取诊断类型字典(住院诊断类别)
|
||||
const { diag_type } = proxy.useDict('diag_type');
|
||||
const rules = ref({
|
||||
name: [{ required: true, message: '请选择诊断', trigger: 'change' }],
|
||||
medTypeCode: [{ required: true, message: '请选择诊断类型', trigger: 'change' }],
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in diagnosisClassificationOptions"
|
||||
v-for="item in diag_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -324,10 +324,8 @@ const diagnosisSearchkey = ref('')
|
||||
const syndromeSearchkey = ref('')
|
||||
const syndromeList = ref([])
|
||||
|
||||
const diagnosisClassificationOptions = ref([
|
||||
{ label: '主诊断', value: '主诊断' },
|
||||
{ label: '副诊断', value: '副诊断' },
|
||||
])
|
||||
// 获取诊断类型字典(住院诊断类别)
|
||||
const { diag_type } = proxy.useDict('diag_type')
|
||||
|
||||
const filteredSyndromeList = computed(() => {
|
||||
if (!syndromeSearchkey.value) {
|
||||
|
||||
Reference in New Issue
Block a user