医生排班页面修复,新增组件间交互功能。

This commit is contained in:
2025-12-11 17:14:48 +08:00
parent a58e02f2cb
commit bd6f3ca587
8 changed files with 79 additions and 11 deletions

View File

@@ -5,6 +5,8 @@ import com.openhis.administration.domain.DoctorSchedule;
public interface IDoctorScheduleAppService {
R<?> getDoctorScheduleList();
R<?> addDoctorSchedule(DoctorSchedule doctorSchedule);
R<?> removeDoctorSchedule(Integer doctorScheduleId);

View File

@@ -8,6 +8,7 @@ import com.openhis.web.appointmentmanage.appservice.IDoctorScheduleAppService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class DoctorScheduleAppServiceImpl implements IDoctorScheduleAppService {
@@ -15,6 +16,12 @@ public class DoctorScheduleAppServiceImpl implements IDoctorScheduleAppService {
private IDoctorScheduleService doctorScheduleService;
@Override
public R<?> getDoctorScheduleList() {
List<DoctorSchedule> list = doctorScheduleService.list();
return R.ok(list);
}
@Override
public R<?> addDoctorSchedule(DoctorSchedule doctorSchedule) {
if (ObjectUtil.isEmpty(doctorSchedule)) {

View File

@@ -14,6 +14,15 @@ public class DoctorScheduleController {
@Resource
private IDoctorScheduleAppService doctorScheduleAppService;
/*
* 获取医生排班List
*
* */
@PostMapping("/add")
public R<?> getDoctorScheduleList() {
return R.ok(doctorScheduleAppService.getDoctorScheduleList());
}
/*
* 新增医生排班
*

View File

@@ -40,6 +40,4 @@ public class Dept {
/** 更新时间 */
private LocalDateTime updateTime;
/** 关联的排班列表(一对多关系) */
private List<DoctorSchedule> schedules;
}

View File

@@ -28,6 +28,7 @@ public class SchedulePool {
/** 结束时间 */
private LocalTime endTime;
/**/
private Integer totalQuota;
private Integer bookedNum;
private Integer lockedNum;

View File

@@ -26,7 +26,7 @@ import Layout from '@/layout'
// 公共路由
export const constantRoutes = [
{ path: '/appoinmentmanage', component: Layout, redirect: '/appoinmentmanage', name: 'AppoinmentManage', hidden: true, meta: { title: '预约管理', icon: 'component' }, children: [{ path: '', component: () => import('@/views/appoinmentmanage/index.vue'), name: 'AppoinmentManageIndex', meta: { title: '预约管理' } }] },
{ path: '/appoinmentmanage', component: Layout, redirect: '/appoinmentmanage', name: 'AppoinmentManage', hidden: true, meta: { title: '预约管理', icon: 'component' }, children: [{ path: '', component: () => import('@/views/appoinmentmanage/index.vue'), name: 'AppoinmentManageIndex', meta: { title: '预约管理' } }, { path: 'doctorschedule/:deptId', component: () => import('@/views/appoinmentmanage/doctorschedule/index.vue'), name: 'DoctorSchedule', hidden: true, meta: { title: '医生排班' } }] },
{
path: '/redirect',
component: Layout,

View File

@@ -128,7 +128,9 @@
class="inline-select"
:disabled="!isEditMode"
>
<el-option label="内科诊查" value="内科诊查"></el-option>
<el-option label="常规诊查" value="常规诊查"></el-option>
<el-option label="专科诊查" value="专科诊查"></el-option>
<el-option label="特殊诊查" value="特殊诊查"></el-option>
<el-option label="专家诊查" value="专家诊查"></el-option>
</el-select>
</template>
@@ -148,9 +150,9 @@
<template #default="scope">
<el-input
v-model="scope.row.stopReason"
placeholder="请输入停诊原因"
:placeholder="scope.row.stopClinic ? '请输入停诊原因' : ''"
class="inline-input"
:disabled="!isEditMode"
:disabled="!isEditMode || !scope.row.stopClinic"
></el-input>
</template>
</el-table-column>
@@ -370,6 +372,8 @@ onMounted(() => {
.schedule-table-container {
margin-bottom: 20px;
width: 100%;
overflow-x: auto;
}
.daily-schedule {
@@ -377,6 +381,7 @@ onMounted(() => {
border: 1px solid #ebeef5;
border-radius: 4px;
overflow: hidden;
width: 100%;
}
.daily-header {
@@ -400,14 +405,48 @@ onMounted(() => {
}
.schedule-table {
width: 100% !important;
min-width: 100% !important;
:deep(.el-table__header-wrapper) {
width: 100% !important;
border-top: none;
}
:deep(.el-table__body-wrapper) {
width: 100% !important;
}
:deep(.el-table__header-wrapper th.el-table__cell),
:deep(.el-table__body-wrapper td.el-table__cell) {
text-align: center;
padding: 8px 0;
}
/* 隐藏表格头部的边框线,与日期标题融合 */
:deep(.el-table__header-wrapper) {
border-top: none;
/* 确保表格容器填满 */
:deep(.el-table__inner-wrapper) {
width: 100% !important;
}
/* 确保表格本身填满 */
:deep(.el-table__body) {
width: 100% !important;
}
/* 确保表格列正确分配宽度 */
:deep(.el-table__header) {
width: 100% !important;
}
:deep(.el-table__header tr),
:deep(.el-table__body tr) {
width: 100% !important;
}
/* 确保表格容器的最小宽度与内容匹配 */
:deep(.el-table) {
width: 100% !important;
min-width: 100% !important;
}
}

View File

@@ -124,6 +124,7 @@
<script setup name="AppoinmentManage">
import { ref, onMounted } from 'vue'
import { useRouter } from 'vue-router'
import { ElMessage, ElDialog, ElSelect, ElOption, ElInput, ElForm, ElFormItem } from 'element-plus'
import { EditPen, View, DocumentRemove } from '@element-plus/icons-vue'
import { listDept, searchDept } from '@/api/appoinmentmanage/dept'
@@ -254,14 +255,25 @@ const handleAppointmentSettingCancel = () => {
appointmentSettingDialog.value = false
}
// 路由和导航
const router = useRouter()
// 编辑
const handleEdit = (row) => {
ElMessage.info(`编辑科室: ${row.deptName}`)
// 导航到医生排班页面传递科室ID和编辑模式
router.push({
path: `/appoinmentmanage/doctorschedule/${row.id}`,
query: { mode: 'edit' }
})
}
// 查看
const handleView = (row) => {
ElMessage.info(`查看科室: ${row.deptName}`)
// 导航到医生排班页面传递科室ID和查看模式
router.push({
path: `/appoinmentmanage/doctorschedule/${row.id}`,
query: { mode: 'view' }
})
}
// 分页大小变化