Rights assignment and management mode: Roles are assigned to employees and rights are bound to roles.

Assign roles to users:

Request the role list, render the role information to the role shell through the for loop, then click the corresponding role button according to the user ID, add the role.

Role Information:Close shell layer: 2 methods

2. Add, delete, modify and check permission list:

Obtain the user permission list and perform the following operations: add, delete (delete the interface according to the id), and modify the user permissionUse Element’s tree structure: First call methods to convert the data to a tree, because the tree’s data structure requires it.

Show add button judgment: only explicit at level 1

On: Button configuration

Add permissions :(add permissions and edit permissions are written in the same ok button method) first verify the form and then call the add interface

Note: There are also two cases of adding permissions.

Edit permission: call the edit permission interface, the content of the permission will be written back to the edit shell layer

Confirm button :(add permissions and edit permissions are written in the same confirm button method) the form form is also validated first and then the add interface is called

Finally cancel the button to close the shell layer and other operations

Show or edit the title of the ammo layer:

Assign rights to roles:

Ideas:

1. Click Assign permission, pop-up out, send all permission requests, obtain permission list data, convert data into tree, render it to the pop-up layer, and write back the permission data owned by the right according to the ID

2 Click OK, send the request, and assign the permission to the role

Check box: Parent and child are not related

Write back the permission data owned by the right:

Click OK: call the method of el-tree, use ref binding for processing, and obtain all selected permission data. Click OK to invoke the interface and assign permissions to roles

Four front-end access applications – page access and menus

A foreshadowing I wrote earlier: ReturnKey points:

5 Merge static routes and dynamic routes