From 3c4e30c2275f63fdf0480665400a99a4de4811b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Mon, 17 Aug 2026 03:26:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(user-select-modal):=20=E4=B8=93=E5=8C=BA?= =?UTF-8?q?=E7=99=BD=E5=90=8D=E5=8D=95=E6=89=8B=E6=9C=BA=E5=8F=B7=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E4=B8=8D=E8=84=B1=E6=95=8F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - UserSelectModal.vue 中候选行手机号由 u.mobile 改为 u.phone || u.mobile || '-' - 表格列手机号由 dataIndex: 'mobile' 改为 dataIndex: 'phone' - 表格列 customRender 实现回退到 record.mobile 显示真实号码 - 无需后端改动,只需重新构建 admin 前端进行部署 --- .workbuddy/memory/2026-08-17.md | 6 ++++++ src/views/special/zone/components/UserSelectModal.vue | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.workbuddy/memory/2026-08-17.md b/.workbuddy/memory/2026-08-17.md index c67693f..f68fd9f 100644 --- a/.workbuddy/memory/2026-08-17.md +++ b/.workbuddy/memory/2026-08-17.md @@ -135,3 +135,9 @@ - 改动:`src/views/special/zone/components/UserSelectModal.vue` 外层容器由 `` 改为 ``,内部搜索/候选/已添加列表逻辑原样保留,props/emits(`visible`/`sectionId`/`update:visible`) 不变。 - `index.vue` 中 `` 调用方式无需改动(与商品抽屉同为右侧弹出)。 - 部署:重新构建 admin 前端(npm run dev 热更新或 build)即可,无需后端改动。 + +## 专区白名单手机号改为不脱敏 +- 需求:专区「白名单」抽屉里手机号不要脱敏显示。 +- 根因:系统 User 实体 `mobile` 是 `@TableField(exist=false)` 的脱敏字段(`getMobile()` 返回 `DesensitizedUtil.mobilePhone(phone)`);`phone` 才是 DB 真实号码,无 `@JsonIgnore`、无全局脱敏 → 接口同时返回 `phone`(真实) 与 `mobile`(脱敏)。 +- 改动:`UserSelectModal.vue` 两处展示由 `u.mobile` 改为 `u.phone`(候选行 `u.phone || u.mobile || '-'`;表格列 `dataIndex:'phone'` + `customRender` 回退 `record.mobile`),后端无需改动。 +- 部署:重新构建 admin 前端即可。 diff --git a/src/views/special/zone/components/UserSelectModal.vue b/src/views/special/zone/components/UserSelectModal.vue index 3b89a67..9e6410f 100644 --- a/src/views/special/zone/components/UserSelectModal.vue +++ b/src/views/special/zone/components/UserSelectModal.vue @@ -36,7 +36,7 @@ style="display: flex; align-items: center; padding: 4px 0; gap: 8px; border-bottom: 1px solid #f0f0f0;" > {{ u.realName || '-' }} - {{ u.mobile || '-' }} + {{ u.phone || u.mobile || '-' }} {{ u.nickname || '' }} + 添加 @@ -99,7 +99,7 @@ const columns = [ { title: 'ID', dataIndex: 'userId', key: 'userId', align: 'center', width: 80 }, { title: '姓名', dataIndex: 'realName', key: 'realName', align: 'center' }, - { title: '手机号码', dataIndex: 'mobile', key: 'mobile', align: 'center' }, + { title: '手机号码', dataIndex: 'phone', key: 'phone', align: 'center', customRender: ({ text, record }: any) => text || record.mobile || '-' }, { title: '昵称', dataIndex: 'nickname', key: 'nickname', align: 'center' }, { title: '所属部门', dataIndex: 'organizationName', key: 'organizationName', align: 'center' }, { title: '操作', key: 'action', align: 'center', width: 90 }