From 9f9107544ff5baf8795ce87f95a7195d0f563725 Mon Sep 17 00:00:00 2001 From: zzh <1368735060@qq.com> Date: Thu, 24 Sep 2026 11:16:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=94=A8=E6=88=B7=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E5=AF=86=E7=A0=81=E3=80=81=E9=A1=B6=E6=A0=8F?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=89=93=E5=8D=B0=E6=8E=A7=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E7=A6=81=E7=94=A8=20outline=20=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 补齐系统用户重置密码入口与网盘下载提示;规范禁止 type=outline;顺带修复揽收单下游预报后刷新列表。 Co-authored-by: Cursor --- .cursor/rules/frontend-design-spec.mdc | 1 + docs/前端页面设计规范.md | 11 +- src/api/rbac/internal-user.ts | 9 ++ src/components/UserEditDrawer/index.vue | 152 ++++++++++++++++++- src/components/top-nav/index.vue | 22 ++- src/locale/en-US.ts | 6 + src/locale/zh-CN.ts | 6 + src/views/order/pickupOrder/index.vue | 2 +- src/views/system/organization/user/index.vue | 1 + 9 files changed, 204 insertions(+), 6 deletions(-) diff --git a/.cursor/rules/frontend-design-spec.mdc b/.cursor/rules/frontend-design-spec.mdc index d7f2097..bbe5f88 100644 --- a/.cursor/rules/frontend-design-spec.mdc +++ b/.cursor/rules/frontend-design-spec.mdc @@ -20,6 +20,7 @@ alwaysApply: true ### 组件 - 按钮 32px 高,border-radius 4px,间距 8px +- **禁止** `a-button type="outline"`(Arco 默认描边与主题不搭);主操作用 `primary` / `app-btn-primary-soft`,查询用 `app-btn-search`,次要用默认按钮或抽屉内软按钮 - 优先 FormPro、TablePro、ModalPro、CustomList、HandsontablePro ### 表单 diff --git a/docs/前端页面设计规范.md b/docs/前端页面设计规范.md index 2c28194..9c8e554 100644 --- a/docs/前端页面设计规范.md +++ b/docs/前端页面设计规范.md @@ -197,12 +197,17 @@ font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", ### 5.1 按钮 -- 高度:`32px`,`border-radius: 4px` +- 高度:`32px`,`border-radius: 4px`(抽屉/卡片内软操作可用 `12px`,与亚克力面板一致) - 图标按钮:`32px × 32px` 正方形 - **相邻按钮间距**:统一 `8px` - 使用 `a-space :size="8"` 或 `gap: 8px` / `gap: var(--app-button-gap)` - 适用于工具栏、表格操作列、弹窗底部按钮组 -- 主操作使用 `type="primary"` +- **推荐用法** + - 主操作:`type="primary"`,或工具栏新增用 `app-btn-primary-soft` + - 查询:`app-btn-search` + - 次要/取消:默认 `a-button`(无 type)或抽屉内与面板同风格的软按钮 + - 表格行内操作:优先图标按钮 / `type="text"`(见操作列规范) +- **禁止**:Arco `type="outline"` 默认描边按钮(灰硬边框、白底,与主题亚克力/软主色体系完全不搭)。新页面与改版时一律不要使用;次要操作改用上文推荐样式。 ### 5.2 输入类(Input / Select / Picker) @@ -541,7 +546,7 @@ const { t } = useI18n(); - [ ] 白卡片与 **`.list-wrap`** 内边距勿重复叠加(推荐白卡片 `padding: 0` + 分区 padding) - [ ] **`.list-wrap`**:`padding: 16px`、`flex: 1; min-height: 0`;需测高时 `ref` 挂在本层 - [ ] 工具栏使用 `table-toolbar`、`toolbar-left`、`toolbar-right`,工具栏 **`padding: 16px 16px 0`** -- [ ] 按钮、输入框符合全局样式(高度、圆角) +- [ ] 按钮、输入框符合全局样式(高度、圆角);未使用 `type="outline"` 描边按钮 - [ ] 使用主题色变量,不硬编码 `#1d7281` - [ ] 弹窗 / 抽屉使用 ModalPro / DrawerPro + useModal - [ ] 表单使用 FormPro 或统一 label/span diff --git a/src/api/rbac/internal-user.ts b/src/api/rbac/internal-user.ts index c59ca70..aac2b17 100644 --- a/src/api/rbac/internal-user.ts +++ b/src/api/rbac/internal-user.ts @@ -7,6 +7,10 @@ function internalUserListUrl() { return resolveAdminApiPath('/rbac/user/internal-list') } +function resetPasswordUrl() { + return resolveAdminApiPath('/rbac/user/reset-password') +} + /** 内部用户列表(排除纯客户账号),响应结构与 UserDtoPagedResultDto 兼容 */ export async function getInternalUserList(params: { keyword?: string @@ -18,4 +22,9 @@ export async function getInternalUserList(params: { return res.data } +/** 管理员重置用户密码(无需旧密码) */ +export async function resetUserPassword(id: string, newPassword: string): Promise { + await axiosInstance.post(resetPasswordUrl(), { newPassword }, { params: { id } }) +} + export type { UserDto } diff --git a/src/components/UserEditDrawer/index.vue b/src/components/UserEditDrawer/index.vue index d59d935..aa49f67 100644 --- a/src/components/UserEditDrawer/index.vue +++ b/src/components/UserEditDrawer/index.vue @@ -51,6 +51,16 @@ +
+ +
+ + +

+ {{ + t('system.user.modal.resetPasswordContentSingle', { + account: formState.account || t('system.user.drawer.accountFallback'), + }) + }} +

+ + + + + + + + +