@@ -57,11 +57,18 @@
< / el -button >
< / el -button >
< / template >
< / template >
<!-- 已提交状态 : 显示取消提交按钮 -- >
<!-- 已提交状态 : 显示取消提交按钮 -- >
< template v-else-if = "row.consultationStatus === 10" >
<!-- 🎯 修复 : 如果有医生已确认或签名 , 则隐藏取消提交按钮 -- >
< template v-else-if = "row.consultationStatus === 10 && !hasConfirmedOrSignedDoctor(row)" >
< el -button type = "warning" size = "small" @click ="handleCancelSubmit(row)" >
< el -button type = "warning" size = "small" @click ="handleCancelSubmit(row)" >
取消提交
取消提交
< / el -button >
< / el -button >
< / template >
< / template >
<!-- 已提交但有医生确认 / 签名 : 显示查看按钮 -- >
< template v-else-if = "row.consultationStatus === 10 && hasConfirmedOrSignedDoctor(row)" >
< el -button type = "info" size = "small" @click ="handleView(row)" >
查看
< / el -button >
< / template >
<!-- 已确认状态 : 显示待签名按钮 -- >
<!-- 已确认状态 : 显示待签名按钮 -- >
< template v-else-if = "row.consultationStatus === 20" >
< template v-else-if = "row.consultationStatus === 20" >
< el -button type = "success" size = "small" @click ="handleView(row)" >
< el -button type = "success" size = "small" @click ="handleView(row)" >
@@ -239,7 +246,7 @@
< / el-form-item >
< / el-form-item >
<!-- 🎯 新增 : 参与医生列表 ( 表格形式 ) -- >
<!-- 🎯 新增 : 参与医生列表 ( 表格形式 ) -- >
< el-form-item label = "参与医生签名:" v-if = "participatingPhysicians.length > 0" >
< el-form-item label = "参与医生签名:" >
< el-table
< el-table
:data = "participatingPhysicians"
:data = "participatingPhysicians"
border
border
@@ -247,11 +254,11 @@
style = "width: 100%"
style = "width: 100%"
max -height = " 300 "
max -height = " 300 "
>
>
< el-table-column type = "index" label = "序号" width ="60 " align = "center" / >
< el-table-column type = "index" label = "序号" min - width =" 60 " align = "center" / >
< el-table-column prop = "confirmingDeptName" label = "代表科室" width =" 120" align = "center" / >
< el-table-column prop = "confirmingDeptName" label = "代表科室" min - width =" 120 " align = "center" / >
< el-table-column prop = "confirmingPhysicianName" label = "所属医生" width =" 100" align = "center" / >
< el-table-column prop = "confirmingPhysicianName" label = "所属医生" min - width =" 100 " align = "center" / >
< el-table-column prop = "signature" label = "签名医生" width =" 100" align = "center" / >
< el-table-column prop = "signature" label = "签名医生" min - width =" 100 " align = "center" / >
< el-table-column prop = "signatureDate" label = "签名时间" width =" 160" align = "center" >
< el-table-column prop = "signatureDate" label = "签名时间" min - width =" 160 " align = "center" >
< template # default = "{ row }" >
< template # default = "{ row }" >
{ { formatDateTime ( row . signatureDate ) } }
{ { formatDateTime ( row . signatureDate ) } }
< / template >
< / template >
@@ -629,6 +636,14 @@ const clearAllSelections = () => {
selectedPhysiciansList . value = [ ] ;
selectedPhysiciansList . value = [ ] ;
} ;
} ;
// 🎯 检查是否有医生已确认或签名
const hasConfirmedOrSignedDoctor = ( row ) => {
if ( ! row . invitedList || row . invitedList . length === 0 ) {
return false ;
}
return row . invitedList . some ( inv => inv . invitedStatus >= 20 ) ;
} ;
// 加载会诊列表
// 加载会诊列表
const loadConsultationList = async ( ) => {
const loadConsultationList = async ( ) => {
if ( ! props . patientInfo ? . encounterId ) {
if ( ! props . patientInfo ? . encounterId ) {
@@ -772,13 +787,15 @@ const handleRowClick = async (row) => {
console . log ( '填充的医生列表:' , selectedPhysiciansList . value ) ;
console . log ( '填充的医生列表:' , selectedPhysiciansList . value ) ;
// 🎯 填充参与医生列表(显示确认和签名状态)
// 🎯 填充参与医生列表(显示确认和签名状态)
participatingPhysicians . value = row . invitedList . map ( inv => ( {
participatingPhysicians . value = row . invitedList
physicianId : inv . physicianId ,
. filter ( inv => inv . invitedStatus >= 20 ) // 只显示已确认或已签名的医生
confirmingPhysicianName : inv . physicianName || '' ,
. map ( inv => ( {
confirmingDeptName : inv . deptName || '' ,
physicianId : inv . physicianId ,
signature : inv . signatureTime ? inv . physicianName : '' , // 有签名时间才显示签名医生
confirmingPhysicianName : inv . physicianName || '' ,
signatureDat e: inv . signatureTi me || null ,
confirmingDeptNam e: inv . deptNa me || '' ,
} ) ) ;
signature : inv . invitedStatus >= 30 ? inv . physicianName : '' , // 已签名才显示签名医生
signatureDate : inv . signatureTime || null ,
} ) ) ;
console . log ( '参与医生列表:' , participatingPhysicians . value ) ;
console . log ( '参与医生列表:' , participatingPhysicians . value ) ;
} else {
} else {
@@ -1073,7 +1090,16 @@ const handleCompleteRow = async (row) => {
// 查看详情
// 查看详情
const handleView = ( row ) => {
const handleView = ( row ) => {
handleRowClick ( row ) ;
handleRowClick ( row ) ;
ElMessage . info ( '该申请已完成或已取消,仅可查看' ) ;
// 根据状态显示不同的提示消息
if ( row . consultationStatus === 10 && hasConfirmedOrSignedDoctor ( row ) ) {
ElMessage . info ( '已有医生确认或签名,无法取消提交,仅可查看' ) ;
} else if ( row . consultationStatus === 20 ) {
ElMessage . info ( '该申请已确认,等待签名' ) ;
} else if ( row . consultationStatus === 40 ) {
ElMessage . info ( '该申请已完成,仅可查看' ) ;
} else if ( row . consultationStatus === 50 ) {
ElMessage . info ( '该申请已取消,仅可查看' ) ;
}
} ;
} ;
// 作废
// 作废