树形结构
请求地址
/api/dep/lists
请求方法
GET
方法说明
获取部门的树形结构
输入信息
无
输入示例
返回信息
| 字段 | 类型 | 说明 |
|---|---|---|
| tree | object | 树形结构 |
| id | bigint | 部门id |
| parent_id | bigint | 父部门id |
| created_id | bigint | 创建人id |
| created_time | datetime | 创建时间 |
| name | bigint | 部门名称 |
| children | array | 子部门信息 |
返回示例
{
"code": 200,
"data": {
"tree": [
{
"id": "339084271870279680",
"parent_id": 0,
"name": "总公司",
"created_time": "2022-02-28 16:39:50",
"created_id": 58,
"children": [
{
"id": "584784889098797056",
"parent_id": "339084271870279680",
"name": "HR人力资源部门",
"created_time": "2024-01-07 16:46:22",
"created_id": 1,
"children": []
},
{
"id": "339091279205892096",
"parent_id": "339084271870279680",
"name": "销售部门",
"created_time": "2022-02-28 17:07:40",
"created_id": 58,
"children": [
{
"id": "339338009553928192",
"parent_id": "339091279205892096",
"name": "销售一部",
"created_time": "2022-03-01 09:28:06",
"created_id": 58,
"children": []
},
{
"id": "339337883619950592",
"parent_id": "339091279205892096",
"name": "销售二部1",
"created_time": "2022-03-01 09:27:36",
"created_id": 58,
"children": []
},
{
"id": "339337488420044800",
"parent_id": "339091279205892096",
"name": "销售三部",
"created_time": "2022-03-01 09:26:01",
"created_id": 58,
"children": []
}
]
}
]
}
]
},
"message": ""
}
作者:admin 创建时间:2024-10-17 16:27
最后编辑:admin 更新时间:2024-10-19 12:15
最后编辑:admin 更新时间:2024-10-19 12:15