From 415a76af4917340450dcc5ab827a20f747bb3356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Thu, 14 May 2026 05:05:25 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#493:=20=E3=80=90=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99-=E4=B8=B4?= =?UTF-8?q?=E5=BA=8A=E5=8C=BB=E5=98=B1-=E6=A3=80=E9=AA=8C=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E3=80=91=E9=A1=B9=E7=9B=AE=E6=9C=AA=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E7=A7=91=E5=AE=A4=E6=97=B6=EF=BC=8C=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E6=89=8B=E5=8A=A8=E9=80=89=E6=8B=A9=E5=8F=91=E5=BE=80?= =?UTF-8?q?=E7=A7=91=E5=AE=A4=E5=90=8E=E4=BB=8D=E6=8A=A5=E9=94=99=E4=B8=94?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=A2=AB=E6=B8=85=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原因:projectWithDepartment 函数在 watch 触发时(type=1)若项目未配置执行科室, 立即弹出"未找到项目执行的科室"错误,干扰用户操作;且提交时(type=2)的错误提示 分支没有区分"用户已手动选择"和"用户未选择"两种情况。 修复:将 findItem 未找到时的错误弹窗限制在 type=2(提交)且用户未手动选择科室时触发, type=1(选择项目变化)时仅清空科室字段让用户自行选择,不再弹窗阻断。 --- .../components/order/applicationForm/laboratoryTests.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/laboratoryTests.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/laboratoryTests.vue index 72a5eff38..0441d7497 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/laboratoryTests.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/laboratoryTests.vue @@ -256,12 +256,16 @@ const projectWithDepartment = (selectProjectIds, type) => { if (type === 2 && manualDept) { form.targetDepartment = manualDept; isRelease = true; - } else { + } else if (type === 2 && !manualDept) { + // 提交时用户未手动选择科室,才提示错误 isRelease = false; ElMessage({ type: 'error', message: '未找到项目执行的科室', }); + } else { + // type=1(选择项目变化)时,不弹窗,仅清空科室让用户自行选择 + isRelease = false; } } if (findItem && isRelease) {