From 18fc2e326f650090aa5775ec104baf8161497c95 Mon Sep 17 00:00:00 2001 From: zichun Date: Fri, 15 May 2026 18:07:58 +0800 Subject: [PATCH] feat(frontend): UserFormPage (create + edit) + 子组件 + 路由接入 --- frontend/src/pages/users/UserFormFields.tsx | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/src/pages/users/UserFormPage.test.tsx | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/src/pages/users/UserFormPage.tsx | 198 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/src/pages/users/UserPermissionPanel.tsx | 35 +++++++++++++++++++++++++++++++++++ frontend/src/router/index.tsx | 30 ++++++++++++++++++++++-------- 5 files changed, 421 insertions(+), 8 deletions(-) create mode 100644 frontend/src/pages/users/UserFormFields.tsx create mode 100644 frontend/src/pages/users/UserFormPage.test.tsx create mode 100644 frontend/src/pages/users/UserFormPage.tsx create mode 100644 frontend/src/pages/users/UserPermissionPanel.tsx diff --git a/frontend/src/pages/users/UserFormFields.tsx b/frontend/src/pages/users/UserFormFields.tsx new file mode 100644 index 0000000..3d500a5 --- /dev/null +++ b/frontend/src/pages/users/UserFormFields.tsx @@ -0,0 +1,75 @@ +import { Form, Input, Select, Checkbox } from 'antd'; +import { USER_TYPE_OPTIONS, LANGUAGE_OPTIONS, EMPLOYEE_OPTIONS } from './usersConstants'; + +interface Props { + mode: 'create' | 'edit'; + disabled?: boolean; +} + +export default function UserFormFields({ mode, disabled = false }: Props) { + return ( + <> + + + + + + + + + + + + + + 允许修改 + + + +