会诊管理中 门诊会诊申请确认和门诊会诊申请管理模块全部功能的实现。包括数据库设计,前端UI设计,后端接口开发。
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
</div>
|
||||
<div class="right-actions">
|
||||
<el-button type="danger" @click="handleComplete" :disabled="!selectedRow || selectedRow.consultationStatus !== 30">结束</el-button>
|
||||
<el-button type="success" @click="handleSave">保存</el-button>
|
||||
<el-button type="success" @click="handleSave" :disabled="selectedRow && selectedRow.consultationStatus > 0">保存</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -62,15 +62,19 @@
|
||||
取消提交
|
||||
</el-button>
|
||||
</template>
|
||||
<!-- 已确认状态:显示待签名按钮 -->
|
||||
<template v-else-if="row.consultationStatus === 20">
|
||||
<el-button type="success" size="small" @click="handleView(row)">
|
||||
待签名
|
||||
</el-button>
|
||||
</template>
|
||||
<!-- 已签名状态:显示结束按钮 -->
|
||||
<template v-else-if="row.consultationStatus === 30">
|
||||
<!-- <el-button type="danger" size="small" @click="handleCompleteRow(row)">-->
|
||||
<!-- 结束-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="handleCompleteRow(row)" style="background-color: #f56c6c; border-color: #f56c6c;"
|
||||
@click="handleCompleteRow(row)"
|
||||
style="background-color: #f56c6c; border-color: #f56c6c;"
|
||||
>
|
||||
结束
|
||||
</el-button>
|
||||
@@ -234,39 +238,37 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所属医生:">
|
||||
<el-input v-model="formData.attendingPhysician" placeholder="会诊后填写" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="代表科室:">
|
||||
<el-input v-model="formData.representDepartment" placeholder="会诊后填写" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="签名医生:">
|
||||
<el-input v-model="formData.signPhysician" placeholder="会诊后填写" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="签名时间:">
|
||||
<el-date-picker
|
||||
v-model="formData.signTime"
|
||||
type="datetime"
|
||||
placeholder="年/月/日 --:--"
|
||||
<!-- 🎯 新增:参与医生列表(表格形式) -->
|
||||
<el-form-item label="参与医生签名:" v-if="participatingPhysicians.length > 0">
|
||||
<el-table
|
||||
:data="participatingPhysicians"
|
||||
border
|
||||
stripe
|
||||
style="width: 100%"
|
||||
format="YYYY/MM/DD HH:mm"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
disabled
|
||||
/>
|
||||
max-height="300"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="deptName" label="科室" width="120" align="center" />
|
||||
<el-table-column prop="physicianName" label="医生" width="100" align="center" />
|
||||
<el-table-column prop="confirmTime" label="确认时间" width="160" align="center">
|
||||
<template #default="{ row }">
|
||||
{{ formatDateTime(row.confirmTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="signatureTime" label="签名时间" width="160" align="center">
|
||||
<template #default="{ row }">
|
||||
{{ formatDateTime(row.signatureTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="80" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.invitedStatus >= 3" type="success">已签名</el-tag>
|
||||
<el-tag v-else-if="row.invitedStatus >= 1" type="warning">已确认</el-tag>
|
||||
<el-tag v-else type="info">待确认</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
@@ -289,7 +291,7 @@
|
||||
清空
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 科室医生树(带复选框) -->
|
||||
<div class="invite-section">
|
||||
<div class="section-label">选择会诊科室和医生</div>
|
||||
@@ -323,7 +325,7 @@
|
||||
<div v-show="expandedDepts.includes(dept.id)" class="physicians-list">
|
||||
<div
|
||||
v-for="physician in dept.children"
|
||||
:key="physician.id"
|
||||
:key="physician.id"
|
||||
class="physician-item"
|
||||
>
|
||||
<el-checkbox
|
||||
@@ -332,11 +334,11 @@
|
||||
>
|
||||
{{ physician.label }}
|
||||
</el-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!dept.children || dept.children.length === 0" class="no-physicians">
|
||||
该科室暂无医生
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
@@ -432,6 +434,9 @@ const expandedDepts = ref([]);
|
||||
// 选中的医生列表(用于显示和提交)
|
||||
const selectedPhysiciansList = ref([]);
|
||||
|
||||
// 🎯 新增:参与医生列表(用于显示已确认/已签名的医生)
|
||||
const participatingPhysicians = ref([]);
|
||||
|
||||
// 会诊列表
|
||||
const consultationList = ref([]);
|
||||
|
||||
@@ -716,6 +721,14 @@ const handleRowClick = (row) => {
|
||||
isUrgent: row.consultationUrgency === '2', // 2=紧急
|
||||
consultationPurpose: row.consultationPurpose,
|
||||
createTime: row.consultationRequestDate || row.createTime, // 申请时间
|
||||
|
||||
// 🎯 填充会诊记录字段(如果会诊已完成或已签名)
|
||||
invitedPhysiciansText: row.invitedPhysiciansText || '',
|
||||
consultationOpinion: row.consultationOpinion || '',
|
||||
attendingPhysician: row.attendingPhysician || '',
|
||||
representDepartment: row.representDepartment || '',
|
||||
signPhysician: row.signPhysician || '',
|
||||
signTime: row.signTime || null,
|
||||
});
|
||||
|
||||
console.log('填充后的表单数据:', formData);
|
||||
@@ -730,8 +743,22 @@ const handleRowClick = (row) => {
|
||||
}));
|
||||
|
||||
console.log('填充的医生列表:', selectedPhysiciansList.value);
|
||||
|
||||
// 🎯 填充参与医生列表(显示确认和签名状态)
|
||||
participatingPhysicians.value = row.invitedList.map(inv => ({
|
||||
physicianId: inv.physicianId,
|
||||
physicianName: inv.physicianName,
|
||||
deptId: inv.deptId,
|
||||
deptName: inv.deptName,
|
||||
invitedStatus: inv.invitedStatus || 0,
|
||||
confirmTime: inv.confirmTime || null,
|
||||
signatureTime: inv.signatureTime || null,
|
||||
}));
|
||||
|
||||
console.log('参与医生列表:', participatingPhysicians.value);
|
||||
} else {
|
||||
selectedPhysiciansList.value = [];
|
||||
participatingPhysicians.value = [];
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -781,6 +808,7 @@ const handleNew = () => {
|
||||
|
||||
// 清空选中状态
|
||||
selectedPhysiciansList.value = [];
|
||||
participatingPhysicians.value = [];
|
||||
|
||||
// 加载主诊断
|
||||
loadMainDiagnosis();
|
||||
@@ -1090,6 +1118,19 @@ defineExpose({
|
||||
fetchConsultationList,
|
||||
});
|
||||
|
||||
// 🎯 格式化日期时间
|
||||
const formatDateTime = (dateTime) => {
|
||||
if (!dateTime) return '-';
|
||||
const date = new Date(dateTime);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
const hours = String(date.getHours()).padStart(2, '0');
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||
return `${year}/${month}/${day} ${hours}:${minutes}:${seconds}`;
|
||||
};
|
||||
|
||||
// 监听 activeTab 变化
|
||||
watch(
|
||||
() => props.activeTab,
|
||||
@@ -1302,11 +1343,11 @@ onMounted(() => {
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
.dept-name {
|
||||
.dept-name {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.selected-badge {
|
||||
@@ -1333,26 +1374,26 @@ onMounted(() => {
|
||||
|
||||
.physician-item {
|
||||
padding: 6px 10px;
|
||||
|
||||
:deep(.el-checkbox) {
|
||||
width: 100%;
|
||||
|
||||
:deep(.el-checkbox) {
|
||||
width: 100%;
|
||||
|
||||
.el-checkbox__label {
|
||||
font-size: 13px;
|
||||
.el-checkbox__label {
|
||||
font-size: 13px;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
&.is-checked .el-checkbox__label {
|
||||
color: #409eff;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.no-physicians {
|
||||
color: #909399;
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user