From 396a6e5b8bc78f5362d6a7fb59b7fa8fb38ce2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=90=A6?= Date: Sat, 8 Aug 2026 10:33:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=88=E5=81=A5=E5=BA=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E3=80=81VIP=E3=80=81=E5=8C=BB=E7=94=9F=E7=AB=AF=E5=81=A5?= =?UTF-8?q?=E5=BA=B7=E4=BF=A1=E6=81=AF=E5=AF=BC=E5=85=A5=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cursor/rules/Code-Standards.mdc | 31 ++ apps/web-antd/src/components/vip/VipGate.vue | 31 +- .../WxUserPatientDetailModal.vue | 8 + apps/web-antd/src/utils/vip.ts | 104 +++++-- .../chat/components/PrescriptionModal.vue | 45 ++- .../components/PatientInfoDrawer.vue | 113 ++++++- .../views/doctor/doctor-reception/index.vue | 54 ++-- .../medical-record/MedicalRecordPanel.vue | 108 ++++++- .../components/HistoryImportModal.vue | 138 +++++++++ .../utils/mapHealthInquiryToMrHistory.ts | 116 ++++++++ .../doctor/patient-management/api/index.ts | 2 + .../components/PatientDetailModal.vue | 100 +++++++ .../src/views/system/vip/feature/api/index.ts | 14 + .../feature/components/bind-levels-modal.vue | 281 ++++++++++++++++++ .../src/views/system/vip/feature/index.vue | 84 +++++- 15 files changed, 1150 insertions(+), 79 deletions(-) create mode 100644 apps/web-antd/src/views/doctor/medical-record/components/HistoryImportModal.vue create mode 100644 apps/web-antd/src/views/doctor/medical-record/utils/mapHealthInquiryToMrHistory.ts create mode 100644 apps/web-antd/src/views/system/vip/feature/components/bind-levels-modal.vue diff --git a/.cursor/rules/Code-Standards.mdc b/.cursor/rules/Code-Standards.mdc index 4836f59c..cdd0c377 100644 --- a/.cursor/rules/Code-Standards.mdc +++ b/.cursor/rules/Code-Standards.mdc @@ -107,6 +107,37 @@ alwaysApply: true - 上一部分代码和下一部分代码中间空行不超过 2 行 +## VIP 功能判断(PC 管理端强制) + +- **判断方法**:统一用 `#/utils/vip` 的 `hasVipPermission` / `useVipPermission` / `VIP_FEATURE` 常量 +- **显隐组件**:模板包一层 ``(`#/components/vip/VipGate.vue`) +- 接诊/复诊/开方:**必须传履约诊所 vip**(`get-current-store-type` 的 `vip`),禁止只靠登录态判断门店权益 +- 显式传 `null` 表示「尚无履约诊所权益」,**不会**回落登录态;不传第二参才用 `userInfo.vip` +- 禁止在业务页再手写 `permissions.indexOf('medical_record')` 或复制一套 VIP 拉取逻辑 + +## 暗色模式适配(PC 管理端强制) + +后台支持亮/暗主题切换,**新增或改样式时必须同时适配暗色**,禁止只按白底写死颜色。 + +### 优先用法(推荐) + +- 颜色、边框、背景一律用主题 CSS 变量,例如: + - 文字:`hsl(var(--foreground))` / `hsl(var(--muted-foreground))` + - 背景:`hsl(var(--background))` / `hsl(var(--card, var(--background)))` / `hsl(var(--muted) / 0.25)` + - 边框:`hsl(var(--border))` + - 强调/选中:`hsl(var(--primary))`、`hsl(var(--primary) / 0.1)` + - 警告:`hsl(var(--warning))`、`hsl(var(--warning) / 0.12)`(参考 `AiDisclaimerBanner.vue`) +- **禁止**业务样式写死 `#fff`、`#000`、`#0f172a`、`#f8fafc`、`#64748b` 等仅适合亮色的色值 +- **禁止**用 `:global(.dark)` 改全局变量以免污染整站配色 +- 优先「一套变量样式自动跟主题」,避免再写一套 `.dark .xxx { ... }`;仅当变量无法表达(如图片反色、特殊阴影)才用局部 `.dark .xxx`(且必须 `scoped`) + +### 自检清单 + +- 弹窗 / 抽屉 / 卡片 / 预览对照区:在暗色下背景、文字、边框对比度可读 +- 选中态、成功/导入高亮:用 `--primary` 透明度,不要写死浅绿底 `#f0faf8` +- 表格空态、分割线、次要文案:用 `--muted` / `--muted-foreground` / `--border` +- 改完后切换暗色主题肉眼过一遍,不要只测亮色 + ## Vben 组件使用规范 ### VbenModal(来自 @vben/common-ui) diff --git a/apps/web-antd/src/components/vip/VipGate.vue b/apps/web-antd/src/components/vip/VipGate.vue index e756500a..9bd26652 100644 --- a/apps/web-antd/src/components/vip/VipGate.vue +++ b/apps/web-antd/src/components/vip/VipGate.vue @@ -1,20 +1,30 @@ +