fix(#577): 请修复 Bug #577:[一般] [住院医生工作站-检验] 检验申请单项目列表中的单价/使用单位展示异常,单位回显为字典数字ID(如 6, 16)而非中文
根因:
- JEECG/MyBatis-Plus 字典翻译插件的默认输出格式为 `{field}_dictText`(**下划线**格式),但代码中有 3 处使用了 `unitCodeDictText`(**驼峰**格式),导致字典翻译字段始终返回 `undefined`,回退显示了原始字典数字 ID(如 6、16)。
修复:
- | 文件 | 行号 | 修改前 | 修改后 |
- |---|---|---|---|
- | `laboratoryTests.vue` | 291, 415 | `item.unitCodeDictText` | `item.unitCode_dictText` ✅(已有提交) |
- | `surgery.vue` | 202 | `item.unitCodeDictText` | `item.unitCode_dictText` ✅ |
- | `medicalExaminations.vue` | 364 | `item.unitCodeDictText` | `item.unitCode_dictText` ✅ |
- ### 全链路验证
- 展示** ✅ — `el-transfer` 的 label 渲染现在能正确获取字典翻译中文名
- 搜索** ✅ — 搜索逻辑中的单位生成也已同步修正
- 保存** ✅ — `submit` 中的 `unitCode` 字段使用原始编码,不受影响
This commit is contained in:
@@ -361,7 +361,7 @@ const getList = () => {
|
||||
applicationListAll.value = res.data.records;
|
||||
applicationList.value = res.data.records.map((item) => {
|
||||
const price = item.price != null ? Number(item.price).toFixed(2) : '0.00';
|
||||
const unit = item.unitCodeDictText || item.unitCode || '';
|
||||
const unit = item.unitCode_dictText || item.unitCode || '';
|
||||
return {
|
||||
adviceDefinitionId: item.adviceDefinitionId,
|
||||
orgId: item.orgId,
|
||||
|
||||
@@ -199,7 +199,7 @@ const orgOptions = ref([]); // 科室选项
|
||||
const loading = ref(false); // 加载状态
|
||||
const mapToTransferItem = (item) => {
|
||||
const price = item.price != null ? Number(item.price).toFixed(2) : '0.00';
|
||||
const unit = item.unitCodeDictText || item.unitCode || '';
|
||||
const unit = item.unitCode_dictText || item.unitCode || '';
|
||||
return {
|
||||
adviceDefinitionId: item.adviceDefinitionId,
|
||||
orgId: item.orgId,
|
||||
|
||||
Reference in New Issue
Block a user