fix(consultation): 修复会诊确认参加医师字段取值逻辑 - Bug #266
**问题修复:** - 字段标签:将'会诊邀请参加医师'改为'会诊确认参加医师' - 后端取值:从consultation_confirmation表的confirming_physicians字段取值 - 前端显示:解析JSON格式并格式化为'科室-姓名'的友好显示 **技术变更:** - ConsultationAppServiceImpl.java: 修改convertToDto(),查询确认表获取字段值 - consultation.vue: 添加JSON解析逻辑,格式化显示医师列表
This commit is contained in:
@@ -713,6 +713,25 @@ const handleRowClick = async (row) => {
|
||||
if (row) {
|
||||
console.log('点击的行数据:', row);
|
||||
|
||||
// 🎯 处理会诊确认参加医师字段(可能是JSON格式)
|
||||
let physiciansText = row.invitedPhysiciansText || '';
|
||||
if (physiciansText) {
|
||||
try {
|
||||
// 尝试解析JSON格式
|
||||
const physicians = JSON.parse(physiciansText);
|
||||
if (Array.isArray(physicians)) {
|
||||
// 格式化为:科室-姓名、科室-姓名
|
||||
physiciansText = physicians
|
||||
.map(p => `${p.deptName || ''}-${p.physicianName || ''}`)
|
||||
.filter(text => text !== '-')
|
||||
.join('、');
|
||||
}
|
||||
} catch (e) {
|
||||
// 如果不是JSON,保持原值
|
||||
console.log('invitedPhysiciansText不是JSON格式,使用原值:', physiciansText);
|
||||
}
|
||||
}
|
||||
|
||||
// 填充表单数据
|
||||
Object.assign(formData, {
|
||||
consultationId: row.consultationId,
|
||||
@@ -731,7 +750,7 @@ const handleRowClick = async (row) => {
|
||||
createTime: row.consultationRequestDate || row.createTime, // 申请时间
|
||||
|
||||
// 🎯 填充会诊记录字段(如果会诊已完成或已签名)
|
||||
invitedPhysiciansText: row.invitedPhysiciansText || '',
|
||||
invitedPhysiciansText: physiciansText,
|
||||
consultationOpinion: row.consultationOpinion || '',
|
||||
attendingPhysician: row.attendingPhysician || '',
|
||||
representDepartment: row.representDepartment || '',
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user