fix(consultation): 解决会诊流程中的多个功能问题
- 在 deptappthoursManage.js 中添加 status 参数以仅获取已启动的机构 - 为 consultationapplication 组件添加已确认和已签名状态选项 - 扩展操作列宽度并添加打印功能按钮 - 优化 handlePrint 方法以支持行参数和性别枚举转换 - 为 consultationconfirmation 组件添加必填验证和编辑权限控制 - 修复会诊确认医师信息回显逻辑 - 在 inspectionApplication 组件中修复表格行点击事件和检验项目加载 - 禁用非紧急标记的编辑权限以解决Bug #268 - 为 surgeryApplication 组件添加响应码验证和错误处理 - 在 consultation 组件中添加表单验证清除功能 - 为 PackageManagement 组件实现动态机构选项加载 - 重构 PackageSettings 组件的套餐金额显示和只读模式 - 为检查项目设置组件添加套餐筛选和下级类型选择功能 - 实现检验套餐的编辑和查看模式切换功能
This commit is contained in:
@@ -69,6 +69,8 @@
|
||||
<el-option label="全部" value="" />
|
||||
<el-option label="未提交" value="0" />
|
||||
<el-option label="提交" value="10" />
|
||||
<el-option label="已确认" value="20" />
|
||||
<el-option label="已签名" value="30" />
|
||||
<el-option label="结束" value="40" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -137,8 +139,15 @@
|
||||
<el-checkbox :model-value="scope.row.consultationStatus === 40" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200" fixed="right" align="center">
|
||||
<el-table-column label="操作" width="250" fixed="right" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
:icon="Printer"
|
||||
@click="handlePrint(scope.row)"
|
||||
title="打印"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@@ -493,22 +502,26 @@ const handleCurrentChange = (val) => {
|
||||
loadData()
|
||||
}
|
||||
|
||||
const handlePrint = async () => {
|
||||
if (!currentRow.value) {
|
||||
const handlePrint = async (row) => {
|
||||
// 优先使用传入的 row,如果没有传入则使用 currentRow
|
||||
const printRow = row || currentRow.value
|
||||
|
||||
if (!printRow) {
|
||||
ElMessage.warning('请先选择一条记录')
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
// 构建打印数据
|
||||
const printData = {
|
||||
patientName: currentRow.value.patientName || '',
|
||||
gender: currentRow.value.genderText || '',
|
||||
age: currentRow.value.age || '',
|
||||
deptName: currentRow.value.department || '',
|
||||
diagnosis: currentRow.value.provisionalDiagnosis || '',
|
||||
consultationReason: currentRow.value.consultationPurpose || '',
|
||||
applyTime: currentRow.value.applyTime || '',
|
||||
applyDoctor: currentRow.value.requestingPhysician || ''
|
||||
patientName: printRow.patientName || '',
|
||||
gender: printRow.genderEnum === 1 ? '男' : '女',
|
||||
age: printRow.age || '',
|
||||
deptName: printRow.department || '',
|
||||
diagnosis: printRow.provisionalDiagnosis || '',
|
||||
consultationReason: printRow.consultationPurpose || '',
|
||||
applyTime: printRow.consultationRequestDate || '',
|
||||
applyDoctor: printRow.requestingPhysician || ''
|
||||
}
|
||||
await simplePrint(PRINT_TEMPLATE.CONSULTATION, printData)
|
||||
} catch (error) {
|
||||
|
||||
@@ -135,8 +135,14 @@
|
||||
<el-input v-model="formData.provisionalDiagnosis" type="textarea" :rows="2" disabled />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="会诊确认参加医师">
|
||||
<el-input v-model="formData.confirmingPhysician" type="textarea" :rows="3" />
|
||||
<el-form-item label="会诊确认参加医师" required>
|
||||
<el-input
|
||||
v-model="formData.confirmingPhysician"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="请输入会诊确认参加医师"
|
||||
:disabled="!canEdit"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="会诊意见" required>
|
||||
@@ -328,11 +334,10 @@ const applyRowToForm = (row) => {
|
||||
invitedObject: row.invitedObject,
|
||||
consultationPurpose: row.consultationPurpose,
|
||||
provisionalDiagnosis: row.provisionalDiagnosis,
|
||||
confirmingPhysician: row.confirmingPhysician || '',
|
||||
confirmingPhysician: '',
|
||||
confirmingPhysicianName: '',
|
||||
consultationOpinion: '', // 先清空,后面从 opinionList 中获取
|
||||
confirmingPhysicianName: row.confirmingPhysicianName || '',
|
||||
confirmingDeptName: row.confirmingDeptName || '',
|
||||
consultationOpinion: '',
|
||||
confirmingDeptName: '',
|
||||
signature: row.signature || '',
|
||||
signatureDate: row.signatureDate,
|
||||
submittingPhysician: row.submittingPhysician,
|
||||
@@ -340,28 +345,22 @@ const applyRowToForm = (row) => {
|
||||
consultationStatus: row.consultationStatus
|
||||
}
|
||||
|
||||
// 从会诊意见列表中获取所有确认医师的信息,并生成显示文本
|
||||
// 从会诊意见列表中获取当前医生的信息
|
||||
if (opinionList.value.length > 0) {
|
||||
// 生成所有参与确认医师的文本(格式:科室-医生姓名;科室-医生姓名)
|
||||
const allConfirmingPhysicians = opinionList.value.map(op => `${op.deptName}-${op.physicianName}`).join(';')
|
||||
formData.value.confirmingPhysician = allConfirmingPhysicians // 这个字段显示所有确认的医生
|
||||
|
||||
// 从会诊意见列表中获取当前医生的信息
|
||||
const currentPhysicianId = userStore.practitionerId || userStore.user?.practitionerId
|
||||
const myOpinion = opinionList.value.find(op => op.physicianId === currentPhysicianId)
|
||||
|
||||
if (myOpinion) {
|
||||
// 如果当前医生已确认,回显其信息到所属医生字段
|
||||
// 如果当前医生已确认,回显其信息
|
||||
formData.value.confirmingPhysician = myOpinion.physicianName || ''
|
||||
formData.value.confirmingPhysicianName = myOpinion.physicianName
|
||||
formData.value.confirmingDeptName = myOpinion.deptName
|
||||
|
||||
// 回显会诊意见(去掉前缀"科室-医生:")
|
||||
if (myOpinion.opinion) {
|
||||
// 格式:科室-医生:意见内容
|
||||
const opinionText = myOpinion.opinion
|
||||
const colonIndex = opinionText.indexOf(':')
|
||||
if (colonIndex > 0) {
|
||||
// 提取冒号后面的内容
|
||||
formData.value.consultationOpinion = opinionText.substring(colonIndex + 1)
|
||||
} else {
|
||||
formData.value.consultationOpinion = opinionText
|
||||
@@ -374,6 +373,11 @@ const applyRowToForm = (row) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 如果当前医生未确认,预填当前医生姓名作为默认值
|
||||
if (!formData.value.confirmingPhysician) {
|
||||
formData.value.confirmingPhysician = getDoctorName()
|
||||
}
|
||||
}
|
||||
|
||||
const handleRowChange = async (row) => {
|
||||
@@ -433,6 +437,10 @@ const handleConfirm = async () => {
|
||||
}
|
||||
} else {
|
||||
// 确认会诊
|
||||
if (!formData.value.confirmingPhysician.trim()) {
|
||||
ElMessage.warning('请先填写会诊确认参加医师')
|
||||
return
|
||||
}
|
||||
if (!formData.value.consultationOpinion.trim()) {
|
||||
ElMessage.warning('请先填写会诊意见')
|
||||
return
|
||||
@@ -442,7 +450,7 @@ const handleConfirm = async () => {
|
||||
const data = {
|
||||
consultationId: formData.value.consultationId,
|
||||
consultationOpinion: formData.value.consultationOpinion,
|
||||
confirmingPhysician: getDoctorName(), // 自动使用当前医生姓名
|
||||
confirmingPhysician: formData.value.confirmingPhysician.trim() || getDoctorName(), // 优先使用用户填写的值
|
||||
confirmingDeptName: getDoctorDept() // 自动使用当前科室
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user