Fix Bug #494: 住院医生工作站-检查申请:"申请单名称"字段显示为通用名称,未展示具体检查项目名称
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -86,7 +86,11 @@
|
||||
</template>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="patientName" label="患者姓名" width="120" />
|
||||
<el-table-column prop="name" label="申请单名称" width="140" />
|
||||
<el-table-column label="申请单名称" width="140">
|
||||
<template #default="scope">
|
||||
<span>{{ getItemName(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" width="160" />
|
||||
<el-table-column prop="prescriptionNo" label="处方号" width="140" />
|
||||
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
|
||||
@@ -159,7 +163,7 @@
|
||||
currentDetail.patientName || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请单名称">{{
|
||||
currentDetail.name || '-'
|
||||
getItemName(currentDetail)
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请单状态">{{
|
||||
parseStatus(currentDetail.status)
|
||||
@@ -399,6 +403,28 @@ const parseStatus = (status) => {
|
||||
return statusMap[String(status)] || '-';
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取申请单展示名称:优先使用具体医嘱名称列表
|
||||
*/
|
||||
const getItemName = (row) => {
|
||||
const items = row?.requestFormDetailList;
|
||||
if (items && items.length > 0) {
|
||||
return items.map(item => item.adviceName).filter(Boolean).join('、') || row.name || '-';
|
||||
}
|
||||
return row.name || '-';
|
||||
};
|
||||
|
||||
/**
|
||||
* 构建打印用项目名称字符串(同步函数,用于模板字符串)
|
||||
*/
|
||||
const buildItemNames = (row) => {
|
||||
const items = row?.requestFormDetailList;
|
||||
if (items && items.length > 0) {
|
||||
return items.map(item => item.adviceName).filter(Boolean).join('、') || row.name || '';
|
||||
}
|
||||
return row.name || '';
|
||||
};
|
||||
|
||||
const labelMap = {
|
||||
categoryType: '项目类别',
|
||||
targetDepartment: '发往科室',
|
||||
@@ -651,7 +677,7 @@ const buildPrintContent = (row) => {
|
||||
return `
|
||||
<h2>检查申请单</h2>
|
||||
<div class="info-row"><span class="label">患者姓名:</span>${row.patientName || '-'}</div>
|
||||
<div class="info-row"><span class="label">申请单名称:</span>${row.name || '-'}</div>
|
||||
<div class="info-row"><span class="label">申请单名称:</span>${buildItemNames(row) || '-'}</div>
|
||||
<div class="info-row"><span class="label">创建时间:</span>${row.createTime || '-'}</div>
|
||||
<div class="info-row"><span class="label">处方号:</span>${row.prescriptionNo || '-'}</div>
|
||||
<div class="info-row"><span class="label">申请者:</span>${row.requesterId_dictText || '-'}</div>
|
||||
|
||||
Reference in New Issue
Block a user