diff --git a/.trellis/spec/hyb-oa/frontend-react-vite-design.md b/.trellis/spec/hyb-oa/frontend-react-vite-design.md index 45eadce5..94b1cca7 100644 --- a/.trellis/spec/hyb-oa/frontend-react-vite-design.md +++ b/.trellis/spec/hyb-oa/frontend-react-vite-design.md @@ -1192,12 +1192,18 @@ training or permission-maintenance surfaces: - `个人设置` default content is personal profile, password/security, notification preference and Enterprise WeChat binding. Organization, report line and role summary may be folded under `账号详情`; permission code lists - and full employee dossier fields stay out of the default view. + and full employee dossier fields stay out of the default view. Do not add a + default `查看员工档案` / employee-maintenance jump from the ordinary profile + page; profile fields are read-only personal context, while dossier + maintenance belongs to `人员` / `管理`. - Keep account settings separate from admin configuration. `个人设置` may show personal profile, password/security, notification preferences and Enterprise WeChat binding only. Organization maintenance, role assignment, approval rules, feature flags, master data, audit logs, employee maintenance and system configuration belong under `管理`, not the ordinary profile route. +- Mobile `我的` and `个人设置` must not expose an admin matrix or raw internal + labels. Hide `管理入口` / `人员管理` / `组织架构` / `系统设置` from mobile `我的`, + and map account status plus role codes to Chinese labels before display. **Why**: Small teams need fewer default decisions. Persistent onboarding and permission-heavy profile pages make ordinary users inspect system internals diff --git a/.trellis/tasks/05-30-profile-settings-boundary/task.json b/.trellis/tasks/05-30-profile-settings-boundary/task.json index 60ce99d9..da897bd4 100644 --- a/.trellis/tasks/05-30-profile-settings-boundary/task.json +++ b/.trellis/tasks/05-30-profile-settings-boundary/task.json @@ -3,7 +3,7 @@ "name": "profile-settings-boundary", "title": "个人设置与管理配置边界重构", "description": "重构个人设置、移动我的和管理配置入口边界:个人只放个人资料/安全/通知/企微绑定,管理能力统一进管理。", - "status": "planning", + "status": "in_progress", "dev_type": null, "scope": "frontend-page-redesign", "package": null, diff --git a/client/src/pages/MobileMePage.tsx b/client/src/pages/MobileMePage.tsx index 919d1fa3..2ee42c2c 100644 --- a/client/src/pages/MobileMePage.tsx +++ b/client/src/pages/MobileMePage.tsx @@ -53,14 +53,6 @@ function MobileActionLink({ export function MobileMePage() { const { me, permissions, refreshMe, logout } = useAuth(); - const canAccessAdmin = hasAnyPermission(permissions, [ - "*", - "system.settings", - "system.users", - "masterdata.manage", - "notification.channel.manage", - "integration.manage", - ]); const canAccessAssets = hasAnyPermission(permissions, ["asset.view_own", "asset.view_all", "asset.manage", "asset.transfer", "asset.inventory"]); const canAccessProjects = hasAnyPermission(permissions, ["project.view_own", "project.view_all", "project.manage"]); const canAccessPurchase = hasAnyPermission(permissions, [...MOBILE_PURCHASE_PERMISSIONS]); @@ -115,17 +107,14 @@ export function MobileMePage() {
- - {me?.id ? ( - - ) : null} +
- +
- + {canAccessPurchase ? : null} @@ -135,16 +124,6 @@ export function MobileMePage() {
- {canAccessAdmin ? ( - -
- - - -
-
- ) : null} - - -
-
- {me?.status === "active" ? "active" : me?.status ?? "unknown"} - {(me?.roleCodes ?? []).map((role) => ( - {role} - ))} -
-

角色和权限由管理员统一维护。

-
+ +
+ + 查看组织和角色 + 展开 + +
+
+
账号状态
+
{accountStatusLabel(me?.status)}
+
+
+
组织归属
+
{me?.departmentId ? "已关联组织" : "待管理员维护"}
+
+
+
直属汇报关系
+
{me?.directManagerId ? "已维护" : "待管理员维护"}
+
+
+
角色
+
{roleLabels.length ? roleLabels.join("、") : "员工"}
+
+
+

组织、角色和权限由管理员在管理入口统一维护。

+
diff --git a/client/src/pages/ProfilePage.tsx b/client/src/pages/ProfilePage.tsx index 985090c5..b8b36f54 100644 --- a/client/src/pages/ProfilePage.tsx +++ b/client/src/pages/ProfilePage.tsx @@ -53,7 +53,7 @@ function roleLabel(roleCode: string) { hr: "人事", manager: "审批人", }; - return labels[roleCode] ?? roleCode; + return labels[roleCode] ?? "其他角色"; } function resolveProfileError(error: unknown) { @@ -109,21 +109,14 @@ export function ProfilePage() { {accountStatusLabel(me?.status)}} />
- 查看员工档案 - - ) : null - } + title="个人资料" + description="只展示本人基础信息。如需调整组织、岗位或角色,由管理员在管理入口维护。" >
@@ -145,6 +138,18 @@ export function ProfilePage() {
+ +
+
+
账号密码
+

修改密码需要输入当前密码;忘记密码时请从登录页找回。

+
+ +
+
+