- 项目文档
- Demo演示
- 鉴权模块
- 开放能力模块
- 通用模块
- 服务器模块
- 系统模块
- 参数配置信息
- 部门信息
- 字典数据信息
- 字典类型信息
- 日志管理
- 菜单信息
- 通知公告信息
- 岗位信息
- 个人信息
- 角色信息
- 用户信息
部门树结构列表(指定角色)
GET
/system/dept/tree/role/{roleId}
需登录
请求参数
Path 参数
roleId
string
角色ID
示例值:
{% mock 'increment' %}
Header 参数
Authorization
string
授权令牌
默认值:
{{token_prefix}} {{token_access}}
Referer
string
必需
默认值:
{{referer}}
User-Agent
string
用户浏览器代理
默认值:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6261.95 Safari/537.36
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://m1.apifoxmock.com/m1/1551143-0-default/system/dept/tree/role/{% mock '\''increment'\'' %}' \
--header 'Authorization;' \
--header 'Referer;' \
--header 'User-Agent;'
返回响应
🟢200成功
application/json
Body
code
integer
必需
msg
string
必需
data
object
必需
depts
array [object {3}]
部门节点
checkedKeys
array[string]
已选ID数组
示例
{
"code": 200,
"msg": "成功",
"data": {
"depts": [
{
"id": 100,
"label": "MASK科技",
"children": [
{
"id": 101,
"label": "XX总公司",
"children": [
{
"id": 103,
"label": "研发部门",
"children": []
},
{
"id": 104,
"label": "市场部门",
"children": []
},
{
"id": 105,
"label": "测试部门",
"children": []
},
{
"id": 106,
"label": "财务部门",
"children": []
},
{
"id": 107,
"label": "运维部门",
"children": []
}
]
},
{
"id": 102,
"label": "XX分公司",
"children": [
{
"id": 108,
"label": "市场部门",
"children": []
},
{
"id": 109,
"label": "财务部门",
"children": []
}
]
}
]
}
],
"checkedKeys": []
}
}
修改于 2025-02-23 10:54:27