From 76831c99a78b7af2ba6ff23efa962a3e45b85209 Mon Sep 17 00:00:00 2001 From: kylinhao Date: Mon, 11 Apr 2022 15:18:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=A5=E5=8F=A3=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/protocol.md | 64 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/docs/protocol.md b/docs/protocol.md index dd894bf7..3b2f2ec3 100644 --- a/docs/protocol.md +++ b/docs/protocol.md @@ -71,3 +71,67 @@ ## PilotGo server http API 协议 +### 部门管理 API +#### 新增部门 +描述:向部门管理树中添加新的部门 +请求方法:POST +url:/machinemanager/adddepart +请求参数: +类型:json(form) +字段描述: +|名称|类型|说明|是否必须|备注| +|-|-|-|-|-| +|PID|string|上一级部门ID|y|| +|ParentDepart|string|上一级部门名称|y|| +|Depart|string|部门名称|y|| + +示例: +```json +{ + "code": 200, + "data": null, + "msg": "部门信息入库成功" +} +``` +#### 部门信息 +描述:获取全部部门信息 +请求方法:GET +url:/machinemanager/departinfo +请求参数:无 + + +响应结果: +类型:json +字段: +|名称|类型|说明|是否必须|备注| +|-|-|-|-|-| +|label|string|部门名称|y|| +|id|int|部门id|y|| +|pid|int|上级部门id|y|| +|children|[]MachineNode|下一级部门节点|y|| + +示例: +```json +{ + "code": 200, + "data": { + "label": "xx", + "id": 1, + "pid": 0, + "children": [ + { + "label": "", + "id": 2, + "pid": 1, + "children": null + }, + { + "label": "xx", + "id": 3, + "pid": 1, + "children": null + } + ] + } +} +``` \ No newline at end of file -- Gitee