调优:473- [住院医生工作站-检验申请] 列表页字段补全:新增“申请类型”、“标本类型”字段展示,处方号改申请单号
This commit is contained in:
@@ -29,7 +29,17 @@
|
||||
<el-table-column prop="patientName" label="患者姓名" width="120" />
|
||||
<el-table-column prop="name" label="申请单名称" width="140" />
|
||||
<el-table-column prop="createTime" label="创建时间" width="160" />
|
||||
<el-table-column prop="prescriptionNo" label="处方号" width="140" />
|
||||
<el-table-column prop="prescriptionNo" label="申请单号" width="140" />
|
||||
<el-table-column label="申请类型" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<span>{{ parsePriorityCode(scope.row.descJson) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标本类型" width="120" align="center">
|
||||
<template #default="scope">
|
||||
<span>{{ parseSpecimenType(scope.row.descJson) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
|
||||
<el-table-column label="操作" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
@@ -161,6 +171,40 @@ const labelMap = {
|
||||
attention: '注意事项',
|
||||
};
|
||||
|
||||
/**
|
||||
* 解析申请类型(优先级代码)
|
||||
* @param {string} descJson - JSON字符串
|
||||
* @returns {string} 申请类型文本
|
||||
*/
|
||||
const parsePriorityCode = (descJson) => {
|
||||
if (!descJson) return '-';
|
||||
try {
|
||||
const obj = JSON.parse(descJson);
|
||||
// priorityCode: 0-普通, 1-急
|
||||
return obj.priorityCode === 1 ? '急' : '普通';
|
||||
} catch (e) {
|
||||
console.error('解析 descJson 失败:', e);
|
||||
return '-';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 解析标本类型
|
||||
* @param {string} descJson - JSON字符串
|
||||
* @returns {string} 标本类型名称
|
||||
*/
|
||||
const parseSpecimenType = (descJson) => {
|
||||
if (!descJson) return '-';
|
||||
try {
|
||||
const obj = JSON.parse(descJson);
|
||||
// specimenName 或 sampleType 字段
|
||||
return obj.specimenName || obj.sampleType || '-';
|
||||
} catch (e) {
|
||||
console.error('解析 descJson 失败:', e);
|
||||
return '-';
|
||||
}
|
||||
};
|
||||
|
||||
const isFieldMatched = (key) => {
|
||||
return key in labelMap;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user