系统管理 角色权限管理 - Aladdin-GIS/XiShiGIS GitHub Wiki
1、获得角色表的记录
请求地址: Role/GetAll?
请求方式: post
输入:
名称 | 类型 | 注释 | 默认值 |
---|---|---|---|
start | int | 起始页 | 0 |
limit | int | 页数 | 10 |
order | string | 排序字段 | null |
sort | string | 排序方式 | null |
search | string | 过滤条件 | null |
输出:
名称 | 类型 | 注释 | 默认值 |
---|---|---|---|
total | int | 记录总数 | |
rows | object | 数据 | |
msg | string | 信息 | |
success | bool | 成功/失败 | |
code | int | 代码 | 200 |
2、通过角色ID获得权限菜单
请求地址: Menu/GetPowerByRID
请求方式: post
输入:
名称 | 类型 | 注释 | 默认值 |
---|---|---|---|
id | int | 角色ID | 0 |
输出:
名称 | 类型 | 注释 | 默认值 |
---|---|---|---|
total | int | 记录总数 | |
rows | object | 数据 | |
msg | string | 信息 | |
success | bool | 成功/失败 | |
code | int | 代码 | 200 |
3、添加角色
请求地址: Role/Add
请求方式: post
输入:
名称 | 类型 | 注释 | 默认值 |
---|---|---|---|
R_NAME | string | 名称 | null |
R_REMARK | string | 备注 | null |
R_ID | int | 角色ID | null |
输出:
名称 | 类型 | 注释 | 默认值 |
---|---|---|---|
total | int | 记录总数 | |
rows | object | 数据 | |
msg | string | 信息 | |
success | bool | 成功/失败 | |
code | int | 代码 | 200 |
4、修改角色
请求地址: Role/Modify
请求方式: post
输入:
名称 | 类型 | 注释 | 默认值 |
---|---|---|---|
R_NAME | string | 名称 | null |
R_REMARK | string | 备注 | null |
R_ID | int | 角色ID | null |
输出:
名称 | 类型 | 注释 | 默认值 |
---|---|---|---|
total | int | 记录总数 | |
rows | object | 数据 | |
msg | string | 信息 | |
success | bool | 成功/失败 | |
code | int | 代码 | 200 |
5、删除角色
请求地址: Role/Delete?ids=1,2,3,...
请求方式: get
输入:
名称 | 类型 | 注释 | 默认值 |
---|---|---|---|
ids | string | 角色ID字符串组 | 0 |
输出:
名称 | 类型 | 注释 | 默认值 |
---|---|---|---|
total | int | 记录总数 | |
rows | object | 数据 | |
msg | string | 信息 | |
success | bool | 成功/失败 | |
code | int | 代码 | 200 |
6、分配权限
请求地址: RoleMenu/Add
请求方式: get
输入:
名称 | 类型 | 注释 | 默认值 |
---|---|---|---|
ids | string | 菜单ID组 | null |
rid | int | 角色ID | null |
输出:
名称 | 类型 | 注释 | 默认值 |
---|---|---|---|
total | int | 记录总数 | |
rows | object | 数据 | |
msg | string | 信息 | |
success | bool | 成功/失败 | |
code | int | 代码 | 200 |
7、根据角色获得用户数据
请求地址: User/GetUserByRID
请求方式: get
输入:
名称 | 类型 | 注释 | 默认值 |
---|---|---|---|
id | int | 角色ID | null |
输出:
名称 | 类型 | 注释 | 默认值 |
---|---|---|---|
total | int | 记录总数 | |
rows | object | 数据 | |
msg | string | 信息 | |
success | bool | 成功/失败 | |
code | int | 代码 | 200 |