Files
HF-MES-manual/en/system_settings/user_management.md
2026-05-12 01:46:34 +08:00

286 lines
8.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# User Management
## 1. Function Overview
The User Management module is used to manage system user accounts and role permissions, enabling user CRUD operations, role assignment, password management, and permission configuration.
**Core Functions:**
- User Account Management: Create, edit, delete user accounts
- User Status Control: Enable/disable user accounts
- Role Management: Create, edit, delete roles (user groups)
- Permission Assignment: Assign menu and API permissions to roles
- Password Management: Change password, reset password
**Function Screenshot**:
![User Management Function Screenshot](/public/image_en/user_management/图片:用户管理功能截图.png)
## 2. Term Explanation
#### 2.1.1 User Management Terms
| Term | Definition | Description |
|------|------------|-------------|
| User Group/Role | Permission group to which user belongs | Users with the same role have the same permissions |
| Pass ID | User's identification number | Used for access control and other scenarios |
| Super Admin | System's highest permission role | Default has all menu permissions |
## 3. Role Management
### 3.1 Role List Query
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| Status | Filter enabled or disabled roles |
**Operation Steps:**
1. Go to [System Settings] → [User Management] → [Role]
2. Select status condition in the top query area
3. Click [Query] button to get role list
**Function Screenshot**:
![Role Management Query Function Screenshot](/public/image_en/user_management/图片:角色管理查询功能截图.png)
### 3.2 Add Role
**Operation Steps:**
1. Click [Add Role] button
2. Fill in role name and description
3. Set role status
4. Click [OK] to complete addition
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Name | Role name, such as "Admin", "Regular User" | Yes |
| Description | Detailed description of role | No |
| Status | Enabled or disabled | Yes |
**[Tip]** Role names cannot be duplicated.
**Function Screenshot**:
![Role Management Add Function Screenshot](/public/image_en/user_management/图片:角色管理新增功能截图.png)
### 3.3 Edit Role
**Operation Steps:**
1. Click the role to edit in the role list
2. Modify role information
3. Click [OK] to save changes
**Function Screenshot**:
![Role Management Edit Function Screenshot](/public/image_en/user_management/图片:角色管理编辑功能截图.png)
### 3.4 Delete Role
**Operation Steps:**
1. Find the role to delete in the role list
2. Click [Delete] button
3. Click [OK] in the confirmation dialog
**[Important]** If there are users under the role, the role cannot be deleted.
**Function Screenshot**:
![Role Management Delete Function Screenshot](/public/image_en/user_management/图片:角色管理删除功能截图.png)
### 3.5 Permission Assignment
**Operation Steps:**
1. Click [Permission Configuration] button in the role list
2. Select menus and APIs to assign in the permission configuration page
3. Click [OK] to save permission configuration
**[Tip]** Permission configuration will overwrite all existing permissions of the role.
**Function Screenshot**:
![Role Management Permission Assignment Function Screenshot](/public/image_en/user_management/图片:角色管理权限分配功能截图.png)
## 4. User Management
### 4.1 User List Query
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| Account | Fuzzy query by username |
| Name | Fuzzy query by nickname |
| User Group | Filter by role |
| Status | Filter enabled or disabled users |
**Function Screenshot**:
![User Management Query Function Screenshot](/public/image_en/user_management/图片:用户管理查询功能截图.png)
### 4.2 Add User
**Operation Steps:**
1. Click [Add User] button
2. Fill in user information
3. Set user group and status
4. Click [OK] to complete addition
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Account | User login account | Yes |
| Name | User nickname or real name | Yes |
| Pass ID | User's identification number | No |
| Password | User login password | Yes |
| Confirm Password | Enter password again for confirmation | Yes |
| User Group | Select role to which user belongs | Yes |
| Status | Enabled or disabled | Yes |
**[Note]** The two password entries must be identical. Deleted or disabled user groups cannot be selected.
**Function Screenshot**:
![User Management Add Function Screenshot](/public/image_en/user_management/图片:用户管理新增功能截图.png)
### 4.3 Edit User
**Operation Steps:**
1. Click the user to edit in the user list
2. Modify user information
3. Click [OK] to save changes
**[Note]** You cannot disable your own account.
**Function Screenshot**:
![User Management Edit Function Screenshot](/public/image_en/user_management/图片:用户管理编辑功能截图.png)
### 4.4 Delete User
**Operation Steps:**
1. Find the user to delete in the user list
2. Click [Delete] button
3. Click [OK] in the confirmation dialog
**[Important]** You cannot delete your own account.
**Function Screenshot**:
![User Management Delete Function Screenshot](/public/image_en/user_management/图片:用户管理删除功能截图.png)
### 4.5 Batch Operations
**Supported Batch Operations:**
- Batch Delete: Select multiple users and click [Batch Delete]
- Batch Enable/Disable: Select multiple users and click [Batch Enable] or [Batch Disable]
**Function Screenshot**:
![User Management Batch Operation Function Screenshot](/public/image_en/user_management/图片:用户管理批量操作功能截图.png)
### 4.6 Password Management
#### Change Password
**Operation Steps:**
1. Move mouse to username in the top right corner, click [Change Password] button in the dropdown
2. Enter old password and new password
3. Click [OK] to complete change
**Function Screenshot**:
![User Management Change Password Function Screenshot](/public/image_en/user_management/图片:用户管理修改密码功能截图.png)
#### Reset Password
**Operation Steps:**
1. Click [Reset Password] button in the user list
2. Click [OK] in the confirmation dialog
3. Password will be reset to default password "123456"
**Function Screenshot**:
![User Management Reset Password Function Screenshot](/public/image_en/user_management/图片:用户管理重置密码功能截图.png)
### 4.7 User Data Import/Export
#### Import User Data
**Operation Steps:**
1. Click [Download Import Template] to get the import template file
2. Fill in user data according to template format
3. Upload the filled Excel file
4. Click [Import] to complete batch import
**Import Template Fields:**
| Field | Description | Required |
|-------|-------------|----------|
| Account | User login account | Yes |
| Name | User nickname | Yes |
| Pass ID | User identification number | No |
| Password | User password | Yes |
| Status | Enabled or disabled | Yes |
| User Group | Role name to which user belongs | Yes |
**Function Screenshot**:
![User Management Import Function Screenshot](/public/image_en/user_management/图片:用户管理导入功能截图.png)
![Excel Template](/public/image_en/user_management/图片EXCEL模板.png)
#### Export User Data
**Operation Steps:**
1. Set query conditions to filter users to export
2. Click [Export] button
3. System generates export task in background
4. Get export file in download management
**Function Screenshot**:
![User Management Export Function Screenshot](/public/image_en/user_management/图片:用户管理导出功能截图.png)
## 5. Operation Logic Flowchart
```mermaid
flowchart TD
A[User Management] --> B[Add User]
A --> C[Edit User]
A --> D[Delete User]
A --> E[Change Password]
B --> F{Validate Username Uniqueness}
F -->|Exists| G[Show Error]
F -->|Not Exists| H{Validate Password Consistency}
H -->|Inconsistent| I[Show Error]
H -->|Consistent| J{Validate Role Validity}
J -->|Invalid| K[Show Error]
J -->|Valid| L[Save User Data]
C --> M{Validate Username Uniqueness}
M -->|Duplicate| N[Show Error]
M -->|Unique| O{Disable Self?}
O -->|Yes| P[Show Error]
O -->|No| Q[Update User Data]
D --> R{Delete Self?}
R -->|Yes| S[Show Error]
R -->|No| T[Delete User and Reorder]
E --> U{Validate Password Consistency}
U -->|Inconsistent| V[Show Error]
U -->|Consistent| W{Same as Old Password?}
W -->|Same| X[Show Error]
W -->|Different| Y[Update Password]
```
## 6. Notes
**[Important]** Users cannot delete or disable their own accounts.
**[Note]** Before deleting or disabling a role, ensure there are no associated users under the role.
**[Tip]** When importing user data, if the username already exists, that row of data will be skipped.