286 lines
8.7 KiB
Markdown
286 lines
8.7 KiB
Markdown
# 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**:
|
||

|
||
|
||
## 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**:
|
||

|
||
|
||
### 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**:
|
||

|
||
|
||
### 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**:
|
||

|
||
|
||
### 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**:
|
||

|
||
|
||
### 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**:
|
||

|
||
|
||
## 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**:
|
||

|
||
|
||
### 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**:
|
||

|
||
|
||
### 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**:
|
||

|
||
|
||
### 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**:
|
||

|
||
|
||
### 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**:
|
||

|
||
|
||
### 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**:
|
||

|
||
|
||
#### 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**:
|
||

|
||
|
||
### 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**:
|
||

|
||

|
||
|
||
#### 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**:
|
||

|
||
|
||
## 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. |