From 606c2faedb0392b824b8cebde07a2d36718daf1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8E=E4=BD=97?= Date: Sun, 31 May 2026 19:48:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(#628):=20=E8=AF=B7=E4=BF=AE=E5=A4=8D=20Bug?= =?UTF-8?q?=20#628=EF=BC=9A[=E4=BD=8F=E9=99=A2=E5=8C=BB=E7=94=9F=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=AB=99-]=20=E8=AF=8A=E6=96=AD=E5=BD=95=E5=85=A5?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=BC=BA=E5=B0=91=E4=B8=AD=E5=8C=BB=E8=AF=8A?= =?UTF-8?q?=E6=96=AD=E5=BD=95=E5=85=A5=EF=BC=8C=E8=AF=8A=E6=96=AD=E4=BD=93?= =?UTF-8?q?=E7=B3=BB=E5=8F=8A=E4=B8=AD=E5=8C=BB=E8=AF=81=E5=80=99=E5=85=B3?= =?UTF-8?q?=E8=81=94=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: - ** - `diagnosis.vue`(住院医生工作站-诊断录入主组件)中,中医证候完整性校验使用了 `ElMessageBox.confirm` 软提醒(允许"继续保存"),不符合需求要求的"系统保存拦截" 修复: - ** - 文件**:`src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue`(第 885-886 行) - 变更**:将 `ElMessageBox.confirm` 弹窗(可继续保存)替换为 `ElMessage.error('中医诊断不完整,请录入对应的证候!')` 强拦截,直接 return 阻止保存 - 清理**:移除了不再使用的 `ElMessageBox` 导入 - 修改前:** - if (incompleteTcmDiagnosis) { - ElMessageBox.confirm( - '检测到中医诊断未录入证候,保存后可能导致诊断不完整。是否继续保存?', - '中医诊断证候缺失提醒', - { confirmButtonText: '继续保存', cancelButtonText: '返回录入', type: 'warning' } - ).then(() => { continueSave(); }).catch(() => { return; }); - return; - 修改后:** - if (incompleteTcmDiagnosis) { - ElMessage.error('中医诊断不完整,请录入对应的证候!'); - return; - 验证:** - ✅ `vite build` 编译通过 - ✅ `eslint` 无新增问题(预先存在的 5 个问题不变) - ✅ 全链路 6 环分析确认数据流完整 --- .../home/components/diagnosis/diagnosis.vue | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue index 84bdae5f7..d8e29f165 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue @@ -367,7 +367,7 @@ import diagnosisdialog from '../diagnosis/diagnosisdialog.vue'; import AddDiagnosisDialog from './addDiagnosisDialog.vue'; import diagnosislist from '../diagnosis/diagnosislist.vue'; import {patientInfo} from '../../store/patient.js'; -import {ElMessage, ElMessageBox} from 'element-plus'; +import {ElMessage} from 'element-plus'; // const diagnosisList = ref([]); const allowAdd = ref(false); const isSaving = ref(false); @@ -883,21 +883,7 @@ function handleSaveDiagnosis() { (diagnosis) => diagnosis.diagnosisSystem === '中医' && !diagnosis.tcmSyndromeCode ); if (incompleteTcmDiagnosis) { - ElMessageBox.confirm( - '检测到中医诊断未录入证候,保存后可能导致诊断不完整。是否继续保存?', - '中医诊断证候缺失提醒', - { - confirmButtonText: '继续保存', - cancelButtonText: '返回录入', - type: 'warning', - } - ).then(() => { - // 继续保存逻辑 - continueSave(); - }).catch(() => { - // 返回录入 - return; - }); + ElMessage.error('中医诊断不完整,请录入对应的证候!'); return; }