feat(menu): 添加菜单完整路径功能和待写病历管理
- 在SysMenu实体类中新增fullPath字段用于存储完整路径 - 实现buildMenuTreeWithFullPath方法构建带完整路径的菜单树 - 添加getMenuFullPath和generateFullPath服务方法获取和生成完整路径 - 在菜单控制器中增加获取完整路径的API接口 - 前端菜单组件显示完整路径并在新增修改时使用后端返回的路径 - 添加待写病历管理功能包括获取待写病历列表、数量统计和检查接口 - 在医生工作站界面集成待写病历选项卡和相关处理逻辑 - 更新首页统计数据接口路径并添加待写病历数量获取功能 - 重构首页快捷功能配置为动态从数据库获取用户自定义配置 - 优化菜单列表查询使用异步方式处理带完整路径的菜单数据 - 添加菜单完整路径的数据库映射配置和前端API调用支持
This commit is contained in:
@@ -129,6 +129,39 @@ export function saveEmrTemplate(data) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取待写病历列表
|
||||
*/
|
||||
export function listPendingEmr(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/pending-emr/pending-list',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取待写病历数量
|
||||
*/
|
||||
export function getPendingEmrCount(doctorId) {
|
||||
return request({
|
||||
url: '/doctor-station/pending-emr/pending-count',
|
||||
method: 'get',
|
||||
params: { doctorId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查患者是否需要写病历
|
||||
*/
|
||||
export function checkNeedWriteEmr(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/pending-emr/need-write-emr',
|
||||
method: 'get',
|
||||
params: { encounterId },
|
||||
});
|
||||
}
|
||||
|
||||
// 诊断相关接口
|
||||
/**
|
||||
* 保存诊断
|
||||
|
||||
@@ -129,6 +129,9 @@
|
||||
<el-tab-pane label="门诊病历" name="hospitalizationEmr">
|
||||
<hospitalizationEmr :patientInfo="patientInfo" :activeTab="activeTab" @emrSaved="handleEmrSaved" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="待写病历" name="pendingEmr">
|
||||
<PendingEmr @writeEmr="handleWriteEmr" @viewPatient="handleViewPatient" />
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="病历" name="emr">
|
||||
<Emr
|
||||
:patientInfo="patientInfo"
|
||||
@@ -188,6 +191,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import hospitalizationEmr from './components/hospitalizationEmr/index.vue';
|
||||
import PendingEmr from './components/pendingEmr/index.vue';
|
||||
import {
|
||||
completeEncounter,
|
||||
getEncounterDiagnosis,
|
||||
@@ -214,6 +218,8 @@ import { nextTick } from 'vue';
|
||||
import { updatePatientInfo } from './components/store/patient.js';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
// // 监听路由离开事件
|
||||
// onBeforeRouteLeave((to, from, next) => {
|
||||
// // 弹出确认框
|
||||
@@ -228,6 +234,20 @@ defineOptions({
|
||||
name: 'PatientParentCard',
|
||||
});
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
// 监听路由参数变化
|
||||
watch(
|
||||
() => route.query.tab,
|
||||
(newTab) => {
|
||||
if (newTab === 'pendingEmr') {
|
||||
console.log('Route tab changed to pendingEmr');
|
||||
activeTab.value = 'pendingEmr';
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const userStore = useUserStore();
|
||||
const bedfont = 'bed-font';
|
||||
const queryParams = ref({
|
||||
@@ -321,6 +341,21 @@ onMounted(() => {
|
||||
getWaitPatient();
|
||||
getWaitPatientList();
|
||||
getPatientList();
|
||||
|
||||
// 检查路由参数,如果指定了待写病历,则默认选中该选项卡
|
||||
console.log('Route query:', route.query); // 调试信息
|
||||
if (route.query.tab === 'pendingEmr') {
|
||||
console.log('Switching to pendingEmr tab'); // 调试信息
|
||||
activeTab.value = 'pendingEmr';
|
||||
}
|
||||
|
||||
// 确保DOM更新后激活正确的选项卡
|
||||
nextTick(() => {
|
||||
if (route.query.tab === 'pendingEmr') {
|
||||
// 强制触发选项卡切换
|
||||
handleClick('pendingEmr');
|
||||
}
|
||||
});
|
||||
});
|
||||
// 获取现诊患者列表
|
||||
function getPatientList() {
|
||||
@@ -622,6 +657,20 @@ function handleEmrSaved(isSaved) {
|
||||
outpatientEmrSaved.value = isSaved;
|
||||
}
|
||||
|
||||
// 处理写病历事件
|
||||
function handleWriteEmr(row) {
|
||||
console.log('处理写病历:', row);
|
||||
// 这里可以触发切换到病历页面并加载患者信息
|
||||
// 可以根据需要实现具体逻辑
|
||||
}
|
||||
|
||||
// 处理查看患者事件
|
||||
function handleViewPatient(row) {
|
||||
console.log('处理查看患者:', row);
|
||||
// 这里可以触发查看患者详细信息的逻辑
|
||||
// 可以根据需要实现具体逻辑
|
||||
}
|
||||
|
||||
function openDrawer() {
|
||||
drawer.value = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user