From ef59a574a92614eab10ded878f2ff533af5f905f Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Fri, 29 May 2026 01:49:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(#570):=20=E8=AF=B7=E4=BF=AE=E5=A4=8D=20Bug?= =?UTF-8?q?=20#570=EF=BC=9A[=E4=B8=80=E8=88=AC]=20[=E9=97=A8=E8=AF=8A?= =?UTF-8?q?=E9=A2=84=E7=BA=A6=E6=8C=82=E5=8F=B7]=20=E6=82=A3=E8=80=85?= =?UTF-8?q?=E9=A2=84=E7=BA=A6=E6=88=90=E5=8A=9F=E5=90=8E=E7=9A=84=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF=E4=B8=BA=E2=80=9C?= =?UTF-8?q?=E5=B7=B2=E9=94=81=E5=AE=9A=E2=80=9D=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E2=80=9C=E5=B7=B2=E9=A2=84=E7=BA=A6=E2=80=9D?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=95=B0=E6=8D=AE=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: - 后端将预约成功后的槽位状态设为 `LOCKED(2)`,但前端 `SlotStatusDescriptions` 将 `2` 映射为 `"已锁定"`,导致: - 页面显示为 `"已锁定"` 而非正确的 `"已预约"` - 状态筛选栏按 `"已预约"` 过滤时匹配不到数据 - ### 修改内容(2 个文件,+3/-4 行) - `src/utils/medicalConstants.js`** — 状态映射修正 - `SlotStatus.LOCKED` 注释:`已锁定` → `已预约(预约后未签到)` - `SlotStatusDescriptions[2]`:`'已锁定'` → `'已预约'` - `SlotStatusClassMap`:删除不再使用的 `'已锁定': 'status-locked'`(表中已有 `'已预约': 'status-booked'`) - `src/views/appoinmentmanage/outpatientAppointment/index.vue`** — 提示文案更新 - 预约成功提示:从 `"预约成功,号源已锁定。患者到院签到时需缴费取号。"` 改为 `"预约成功,请提醒患者按时到院签到取号。"` - ### 验证 - `eslint` 对修改文件检查通过,无新错误 - 修改范围精准,仅涉及状态字符串映射,不影响其他逻辑 修复: - Bug #570 --- openhis-ui-vue3/src/utils/medicalConstants.js | 5 ++--- .../views/appoinmentmanage/outpatientAppointment/index.vue | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/openhis-ui-vue3/src/utils/medicalConstants.js b/openhis-ui-vue3/src/utils/medicalConstants.js index 7b3dd923c..79ddb4222 100755 --- a/openhis-ui-vue3/src/utils/medicalConstants.js +++ b/openhis-ui-vue3/src/utils/medicalConstants.js @@ -181,7 +181,7 @@ export const SlotStatus = { AVAILABLE: 0, /** 已预约 */ BOOKED: 1, - /** 已锁定 */ + /** 已预约(预约后未签到) */ LOCKED: 2, /** 已签到 / 已取号 */ CHECKED_IN: 3, @@ -195,7 +195,7 @@ export const SlotStatus = { export const SlotStatusDescriptions = { 0: '未预约', 1: '已取号', - 2: '已锁定', + 2: '已预约', 3: '已取号', 4: '已停诊', }; @@ -209,7 +209,6 @@ export const SlotStatusClassMap = { '已取号': 'status-checked', '已停诊': 'status-cancelled', '已取消': 'status-cancelled', - '已锁定': 'status-locked', }; /** diff --git a/openhis-ui-vue3/src/views/appoinmentmanage/outpatientAppointment/index.vue b/openhis-ui-vue3/src/views/appoinmentmanage/outpatientAppointment/index.vue index c321cb7fb..35bf0f3e2 100755 --- a/openhis-ui-vue3/src/views/appoinmentmanage/outpatientAppointment/index.vue +++ b/openhis-ui-vue3/src/views/appoinmentmanage/outpatientAppointment/index.vue @@ -847,7 +847,7 @@ export default { // 重新加载号源数据,确保显示最新状态 this.onSearch(); - ElMessage.success('预约成功,号源已锁定。患者到院签到时需缴费取号。'); + ElMessage.success('预约成功,请提醒患者按时到院签到取号。'); }).catch(error => { console.error('预约失败:', error); });