diff --git a/openhis-server-new/openhis-domain/src/main/java/com/openhis/administration/domain/Dept.java b/openhis-server-new/openhis-domain/src/main/java/com/openhis/administration/domain/Dept.java index afd8ceff..739ef4f8 100644 --- a/openhis-server-new/openhis-domain/src/main/java/com/openhis/administration/domain/Dept.java +++ b/openhis-server-new/openhis-domain/src/main/java/com/openhis/administration/domain/Dept.java @@ -5,6 +5,7 @@ import lombok.Data; import lombok.experimental.Accessors; import java.time.LocalDateTime; +import java.util.List; /** * 科室Entity实体 @@ -38,4 +39,7 @@ public class Dept { /** 更新时间 */ private LocalDateTime updateTime; + + /** 关联的排班列表(一对多关系) */ + private List schedules; } diff --git a/openhis-ui-vue3/src/router/index.js b/openhis-ui-vue3/src/router/index.js index f257c48b..aaa4be90 100644 --- a/openhis-ui-vue3/src/router/index.js +++ b/openhis-ui-vue3/src/router/index.js @@ -26,21 +26,7 @@ import Layout from '@/layout' // 公共路由 export const constantRoutes = [ - { - path: '/appoinmentmanage', - component: Layout, - redirect: '/appoinmentmanage', - name: 'AppoinmentManage', - 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: '/redirect', component: Layout, diff --git a/openhis-ui-vue3/src/views/maintainSystem/checkprojectSettings/index.vue b/openhis-ui-vue3/src/views/maintainSystem/checkprojectSettings/index.vue index b95ecd00..8f223d11 100644 --- a/openhis-ui-vue3/src/views/maintainSystem/checkprojectSettings/index.vue +++ b/openhis-ui-vue3/src/views/maintainSystem/checkprojectSettings/index.vue @@ -107,16 +107,16 @@ @@ -205,10 +205,10 @@ @@ -279,10 +279,19 @@ @@ -344,14 +353,14 @@
- - - + + +
@@ -414,10 +423,19 @@ @@ -454,10 +472,19 @@ @@ -523,7 +550,23 @@ const currentPackageData = ref(null) // 检查类型和科室选项 const checkTypes = ref([]); -const checkMethods = ref([]); +// 完整的检查类型字典数据 + const inspectionTypeDicts = ref([]); + // 完整的服务范围字典数据 + const serviceScopeDicts = ref([]); + const checkMethods = ref([]); + + // 根据字典值获取检查类型标签 + const getInspectionTypeLabel = (value) => { + const dictItem = inspectionTypeDicts.value.find(item => item.dictValue === value); + return dictItem ? dictItem.dictLabel : value; + }; + + // 根据字典值获取服务范围标签 + const getServiceScopeLabel = (value) => { + const dictItem = serviceScopeDicts.value.find(item => item.dictValue === value); + return dictItem ? dictItem.dictLabel : value; + }; const checkParts = ref([]); const checkPackages = ref([]); const departments = ref([]); @@ -592,17 +635,33 @@ onMounted(async () => { departments.value = deptResponse.data; } - // 获取检查类型数据 - const typeResponse = await listCheckType(); + // 获取检查类型数据(从数据字典获取) + const typeResponse = await getDicts('inspection_type'); if (typeResponse && typeResponse.data) { - // 将数据库返回的检查类型数据转换为表格所需格式 - const types = typeResponse.data; - // 获取所有不重复的检查类型值 - checkTypes.value = [...new Set(types.map(item => item.type))]; - + // 保存完整的字典数据 + inspectionTypeDicts.value = typeResponse.data; + // 从数据字典获取检查类型值 + checkTypes.value = typeResponse.data.map(item => item.dictValue); + } else { + checkTypes.value = []; + inspectionTypeDicts.value = []; + } + + // 获取服务范围数据(从数据字典获取) + const scopeResponse = await getDicts('scope_of_services'); + if (scopeResponse && scopeResponse.data) { + // 保存完整的服务范围字典数据 + serviceScopeDicts.value = scopeResponse.data; + } else { + serviceScopeDicts.value = []; + } + + // 获取检查类型表格数据(仍然从API获取) + const typeTableResponse = await listCheckType(); + if (typeTableResponse && typeTableResponse.data) { // 构建检查类型表格数据 checkTypeData.splice(0, checkTypeData.length); - types.forEach((item, index) => { + typeTableResponse.data.forEach((item, index) => { checkTypeData.push({ id: item.id, // 保存id字段,用于判断是新增还是修改 row: (index + 1).toString(), @@ -859,13 +918,13 @@ async function loadMenuData(menu) { // 处理编辑按钮点击 function handleEdit(index) { - const item = tableData[index]; + const item = tableData.value[index]; item.editing = true; } // 处理确认按钮点击 async function handleConfirm(index) { - const item = tableData[index]; + const item = tableData.value[index]; try { // 根据当前激活的菜单调用不同的API if (activeMenu.value === '检查方法') { @@ -972,7 +1031,7 @@ async function handleConfirm(index) { } } // 退出编辑状态 - tableData[index].editing = false; + tableData.value[index].editing = false; // 显示保存成功提示 ElMessage.success(`第 ${item.row} 行数据已保存`); } catch (error) { @@ -989,7 +1048,7 @@ async function handleDelete(index) { cancelButtonText: '取消', type: 'warning' }).then(async () => { - const item = tableData[index]; + const item = tableData.value[index]; try { // 如果有id,调用API删除数据库中的数据 if (item.id) { @@ -1002,7 +1061,7 @@ async function handleDelete(index) { } } // 从数组中删除该行数据 - tableData.splice(index, 1); + tableData.value.splice(index, 1); ElMessage.success('删除成功!'); } catch (error) { ElMessage.error('删除失败,请稍后重试'); @@ -1017,7 +1076,7 @@ function handleAddNewRow() { // 获取当前最大行号,为新建行生成行号 const maxRowNum = Math.max( 0, - ...tableData.map(item => { + ...tableData.value.map(item => { // 处理子行编号,如"1.1"只取主行号"1" const rowParts = item.row.split('.'); return parseInt(rowParts[0]) || 0; @@ -1089,12 +1148,12 @@ function handleAddNewRow() { }; } - tableData.push(newRow); + tableData.value.push(newRow); } // 处理添加按钮点击 function handleAdd(index) { - const parentRow = tableData[index]; + const parentRow = tableData.value[index]; // 创建子行数据,继承父行的编码 const childRow = { @@ -1111,7 +1170,7 @@ function handleAdd(index) { }; // 在父行后插入子行 - tableData.splice(index + 1, 0, childRow); + tableData.value.splice(index + 1, 0, childRow); } // 处理搜索功能