6.1 KiB
Menu Management
1. Function Overview
The Menu Management module is used to configure the system's menu structure, supporting menu configuration for both the backend management and PDA terminals. It enables menu CRUD operations, sorting, and permission association.
Core Functions:
- Menu Tree Structure Management: Supports creation, editing, and deletion of multi-level menus
- Menu Category Management: Distinguishes between admin (backend) and PDA module menus
- Menu Status Control: Supports enabling/disabling menu operations
- Menu Sorting: Supports drag-and-drop sorting to adjust menu display order
- Menu Permission Association: New menus are automatically associated with the super admin role
- Menu Navigation Property: Controls whether menus are displayed in the navigation bar
2. Term Explanation
2.1.1 Menu-related Terms
| Term | Definition | Description |
|---|---|---|
| Top-level Menu | Menu node without parent menu | Serves as root node of menu tree |
| Sub-menu | Menu node with parent menu | Supports multi-level nesting |
| Module | System module to which menu belongs | admin (backend), pda (PDA terminal) |
| Navigation Property | Whether menu is displayed in navigation bar | Visible (1) or Hidden (0) |
| Link Type | Type of menu link | Module (0) or External Link (1) |
| Open Method | Link opening method | Current window (_self) or New window (_blank) |
3. Menu Management Operations
3.1 Menu Query
Query Conditions:
| Query Condition | Description |
|---|---|
| Module | Select backend (admin) or PDA module |
| Status | Filter enabled or disabled menus |
| Navigation Property | Filter visible or hidden menus |
| Menu Depth | Control expansion level of menu tree |
Operation Steps:
- Go to [System Settings] → [Menu Management] → [Menu Configuration]
- Select query conditions in the top query area
- Click [Query] button to get menu list
- Click [Reset] button to clear query conditions
3.2 Add Menu
Operation Steps:
- Go to [System Settings] → [Menu Management] → [Menu Configuration]
- Click [Add Top-level Menu] button, or click [Add] button on existing menu to add sub-menu
- Fill in menu form information
- Click [OK] to complete addition
Field Description:
| Field | Description | Required |
|---|---|---|
| Parent Menu | Select parent menu; no selection means top-level menu | No |
| Name | Display name of menu | Yes |
| Alias | Alias identifier for menu; required for API-type menus | No |
| Icon | Menu icon, can be selected or customized | No |
| Sort | Sort order number; smaller value means higher priority | Yes |
| Navigation | Controls whether menu is displayed in navigation bar | Yes |
| Link Type | Module (0) or External Link (1) | Yes |
| Open Method | Current window or New window | Yes |
| URL | Menu link address | No |
| Parameters | Link parameters | No |
| Remarks | Remarks for menu | No |
[Tip] When adding a menu, the system automatically associates it with the super admin role.
3.3 Edit Menu
Operation Steps:
- Click the menu node to edit in the menu tree
- Modify menu information in the right form
- Click [Modify] button to save changes
[Note] Menu names cannot be duplicated within the same module.
3.4 Delete Menu
Operation Steps:
- Find the menu to delete in the menu tree
- Click [Delete] button on the right side of the menu
- Click [OK] in the confirmation dialog
[Important] If the menu or its child menus are being used by roles, deletion is not allowed.
3.5 Enable/Disable Menu
Operation Steps:
- Find the menu to operate in the menu tree
- Click [Disable] or [Enable] button on the right side of the menu
- Click [OK] in the confirmation dialog
[Note] Status switching affects the menu and all its child menus.
3.6 Menu Sorting
Operation Steps:
- Drag menu node to target position in the menu tree
- System automatically saves sorting result
Supported Drag Operations:
- Drag to front or back of sibling menus
- Drag to other menus as sub-menu
7. Data Flow Diagram
flowchart TD
A[User Request] --> B{Is Super Admin?}
B -->|Yes| C[Query All Menus]
B -->|No| D[Query Role-associated Menus]
C --> E[Return Menu List]
D --> E
E --> F[Frontend Renders Tree Structure]
F --> G[User Operation]
G --> H{Operation Type}
H -->|Add| I[Validate Name Uniqueness]
H -->|Edit| J[Validate Name Uniqueness]
H -->|Delete| K[Check Role Usage]
H -->|Status Switch| L[Check Role Usage]
I --> M[Save Menu Data]
J --> M
K --> N{Is Being Used?}
L --> N
N -->|Yes| O[Show Error Message]
N -->|No| P[Execute Operation]
M --> Q[Associate Super Admin]
Q --> R[Return Result]
P --> R
O --> R
8. Notes
[Important] Before deleting or disabling a menu, ensure it is not used by any role; otherwise, the operation will fail.
[Tip] It is recommended to regularly organize the menu structure to maintain clarity and logic of the menu tree.
[Note] Smaller menu sort values appear first; default value is 50.





