diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/basedatamanage/appservice/impl/OrganizationLocationAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/basedatamanage/appservice/impl/OrganizationLocationAppServiceImpl.java index 7c76d027..c84f11c9 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/basedatamanage/appservice/impl/OrganizationLocationAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/basedatamanage/appservice/impl/OrganizationLocationAppServiceImpl.java @@ -135,7 +135,8 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation BeanUtils.copyProperties(orgLocQueryDto, orgLoc); Long activityDefinitionId = orgLoc.getActivityDefinitionId(); - String activityName = activityDefinitionId != null ? activityDefinitionMapper.selectById(activityDefinitionId).getName() : ""; + String activityName = activityDefinitionId != null + ? activityDefinitionMapper.selectById(activityDefinitionId).getName() : ""; List organizationLocationList = organizationLocationService.getOrgLocListByOrgIdAndActivityDefinitionId(orgLoc.getActivityDefinitionId()); @@ -147,8 +148,8 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation for (OrganizationLocation organizationLocation : organizationLocationList) if (DateTimeUtils.isOverlap(organizationLocation.getStartTime(), organizationLocation.getEndTime(), orgLoc.getStartTime(), orgLoc.getEndTime())) { - String organizationName = - organizationService.getById(organizationLocation.getOrganizationId()).getName(); + Organization org = organizationService.getById(organizationLocation.getOrganizationId()); + String organizationName = org != null ? org.getName() : "未知科室"; return R.fail("当前诊疗:" + activityName + CommonConstants.Common.DASH + orgLoc.getStartTime() + CommonConstants.Common.DASH + orgLoc.getEndTime() + "与" + organizationName + "时间冲突"); } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java index d07df036..2e71ff5c 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java @@ -95,13 +95,6 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer prescriptionNo = assignSeqUtil.getSeq(AssignSeqEnum.ACTIVITY_PSYCHOTROPIC_NO.getPrefix(), 8); } - // 诊疗执行科室配置校验(必须在数据库操作之前执行) - List activityOrganizationConfig = - requestFormManageAppMapper.getActivityOrganizationConfig(typeCode); - if (activityOrganizationConfig.isEmpty()) { - throw new ServiceException("请先配置当前时间段的执行科室"); - } - // 当前时间 Date curDate = new Date(); // 请求类型 @@ -146,6 +139,12 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer // 诊疗集合 List activityList = requestFormSaveDto.getActivityList(); log.info("保存申请单,typeCode={}, activityListSize={}, encounterId={}", typeCode, activityList != null ? activityList.size() : 0, encounterId); + // 诊疗执行科室配置 + List activityOrganizationConfig = + requestFormManageAppMapper.getActivityOrganizationConfig(typeCode); + if (activityOrganizationConfig.isEmpty()) { + throw new ServiceException("请先配置当前时间段的执行科室"); + } for (ActivitySaveDto activitySaveDto : activityList) { serviceRequest = new ServiceRequest(); @@ -435,7 +434,7 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer return new java.util.ArrayList<>(); // 返回空列表而不是查询数据库 } - List requestFormList = requestFormManageAppMapper.getRequestForm(encounterId, typeCode, startDate, endDate, status); + List requestFormList = requestFormManageAppMapper.getRequestForm(encounterId, typeCode, startDate, endDate, status, null); for (RequestFormQueryDto requestFormQueryDto : requestFormList) { // 查询处方详情 List requestFormDetail = diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/mapper/RequestFormManageAppMapper.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/mapper/RequestFormManageAppMapper.java index 540689d1..fd0b8da5 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/mapper/RequestFormManageAppMapper.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/mapper/RequestFormManageAppMapper.java @@ -37,13 +37,15 @@ public interface RequestFormManageAppMapper { * @param startDate 开始日期(可选,格式:yyyy-MM-dd) * @param endDate 结束日期(可选,格式:yyyy-MM-dd) * @param status 单据状态(可选) + * @param keyword 关键字(可选,申请单号/检查项目名称模糊匹配) * @return 申请单列表 */ List getRequestForm(@Param("encounterId") Long encounterId, @Param("typeCode") String typeCode, @Param("startDate") String startDate, @Param("endDate") String endDate, - @Param("status") String status); + @Param("status") String status, + @Param("keyword") String keyword); /** * 查询申请单详情 diff --git a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue index 7c763f07..1ee2188d 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue @@ -522,6 +522,7 @@ const categoryList = ref([]); // 原始分类+项目数据 const dictSearchKey = ref(''); const activeNames = ref(''); // 当前展开的折叠项 const categoryLoadingSet = ref(new Set()); // Bug #500: 正在加载方法的分类集合 +const isAnimating = ref(false); // Bug #500: 防止快速切换时折叠动画重叠导致抖动 const allMethods = ref([]); @@ -669,8 +670,13 @@ async function handleCategoryExpand(cat) { categoryLoadingSet.value.delete(cat.typeId); } } -// Bug #500: 改为非 async 函数,避免 el-collapse 的 @change 等待异步完成导致抖动 +// Bug #500: 添加防抖逻辑,快速切换时跳过中间状态的动画,避免高度跳变和白屏闪烁 function handleCollapseChange(activeName) { + if (isAnimating.value) return; // 动画进行中,忽略后续点击 + + isAnimating.value = true; + setTimeout(() => { isAnimating.value = false; }, 300); // 与 CSS 过渡时长一致 + if (activeName) { const cat = filteredCategoryList.value.find(c => c.typeId == activeName); if (cat && (!cat.methods || cat.methods.length === 0)) { @@ -1307,6 +1313,7 @@ defineExpose({ getList }); .collapse-scroll { flex: 1; overflow-y: auto; + overflow-x: hidden; /* Bug #500: 防止切换时水平方向溢出导致抖动 */ } .empty-hint { color: #909399; @@ -1479,10 +1486,10 @@ defineExpose({ getList }); padding-bottom: 4px; transition: all 0.3s ease; } -/* Bug #500: 折叠面板展开/收起动画使用 will-change 优化性能 */ +/* Bug #500: 折叠面板动画容器,添加 overflow:hidden 防止展开时内容溢出导致闪烁 */ :deep(.el-collapse-item__wrap) { border: none; - will-change: height; + overflow: hidden; } :deep(.el-collapse-item) { transition: margin 0.2s ease; diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/bloodTtransfusionAapplication.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/bloodTtransfusionAapplication.vue index 79d6f8ce..1fa353fc 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/bloodTtransfusionAapplication.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/bloodTtransfusionAapplication.vue @@ -175,10 +175,9 @@ const hasMatchedFields = computed(() => { }); /** 查询科室 */ -const getLocationInfo = () => { - getOrgList().then((res) => { - orgOptions.value = res.data.records; - }); +const getLocationInfo = async () => { + const res = await getOrgList(); + orgOptions.value = res.data.records; }; const recursionFun = (targetDepartment) => { @@ -199,7 +198,12 @@ const recursionFun = (targetDepartment) => { return name; }; -const handleViewDetail = (row) => { +const handleViewDetail = async (row) => { + // 确保科室数据已加载,以便将 ID 解析为名称 + if (!orgOptions.value || orgOptions.value.length === 0) { + await getLocationInfo(); + } + currentDetail.value = row; // 解析 descJson if (row.descJson) { @@ -220,10 +224,9 @@ const handleViewDetail = (row) => { watch( () => patientInfo.value?.encounterId, - (val) => { + async (val) => { if (val) { - fetchData(); - getLocationInfo(); + await Promise.all([fetchData(), getLocationInfo()]); } else { tableData.value = []; } diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue index c4d1400c..23614584 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/examineApplication.vue @@ -49,15 +49,6 @@ - - - @@ -86,62 +77,18 @@ - - - + - + - + @@ -163,7 +110,7 @@ currentDetail.patientName || '-' }} {{ - getItemName(currentDetail) + currentDetail.name || '-' }} {{ parseStatus(currentDetail.status) @@ -171,7 +118,7 @@ {{ currentDetail.createTime || '-' }} - {{ + {{ currentDetail.prescriptionNo || '-' }} {{ @@ -213,101 +160,6 @@ 关闭 - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 申请项目 - - - - - - - -
-
-
- -
- - -
-