From 34ec8fb0b149703efb00df57afab56e043e94a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=8A=B2=E6=9D=BE?= Date: Wed, 17 Jul 2019 20:34:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8B=93=E6=89=91=E5=9B=BE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha接口文档.md | 460 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 458 insertions(+), 2 deletions(-) diff --git a/nezha接口文档.md b/nezha接口文档.md index b313348..fb29b0e 100644 --- a/nezha接口文档.md +++ b/nezha接口文档.md @@ -3236,7 +3236,6 @@ id |Integer |R |id name |String |R |设置名称,唯一索引 typeId |Integer |R |类别id params |String |R |类别定义的参数,多个逗号分隔,参数内逗号需要转义 -viewLevel |String |R |1:用户组,2:系统内全部人员,3:无限制,默认2 remark |String |R |备注 i18nCode |String |R | name i18n code值 nodeGroupIds |Integer[] |R |节点组id @@ -3250,7 +3249,6 @@ nodeIds |Integer[] |R |节点id "name": "eeee", "typeId": 1, "params": "1,'a',3", - "viewLevel": "1", "remark": "", "i18nCode": "", "nodeGroupIds": [1,2,3], @@ -4166,6 +4164,464 @@ data |Object |R |  ``` +### 2.5 拓扑 + +#### 2.5.1 拓扑图配置 + +##### 2.5.1.1 拓扑图列表查询 + +- **接口说明:** 拓扑图列表查询 +- **接口地址:** /topo/list +- **请求方式:** GET + +###### 请求参数 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +id |Integer |O |拓扑图id +systemId |Integer |O |业务系统id + +示例: + +``` +GET /topo/list?systemId=3 +``` + +###### 返回结果 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +code |int |R |响应码,详见 附录A +msg |string |R |  +data |Object |R |  + list |Object[] |R |  +  id |Integer |R |主键 +  name |String |R |拓扑图名称 +  systemId |Integer |R |业务系统ID +  width |Integer |R |图片宽度 +  height |Integer |R |图片高度 +  class |String |R |样式 +  opTime |Date |R |创建时间 +  operator |Integer |R |创建人 +  remarks |String |R |备注 + +示例: + +``` +{ + "code": 200, + "msg": "success", + "data": { + "list": [{ + "id": 1, + "name": "", + "systemId": 1, + "width": 1, + "height": 1, + "class": "", + "opTime": "2019-07-10 10:10:10", + "operator": 1, + "remarks": "", + "delFlag": "" + }] + } +} +``` + +##### 2.4.1.2 拓扑图详情查询 + +- **接口说明:** 拓扑图详情查询,查出所有点、线 +- **接口地址:** /mission/detail +- **请求方式:** GET + +###### 请求参数 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +id |Integer |O |拓扑图id + +示例: + +``` +GET /usergroup/detail?id=2 +``` + +###### 返回结果 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +code |int |R |响应码,详见 附录A +msg |string |R |  +data |Object |R |  + id |Integer |R |主键 + name |String |R |拓扑图名称 + systemId |Integer |R |业务系统ID + width |Integer |R |图片宽度 + height |Integer |R |图片高度 + class |String |R |样式 + opTime |Date |R |创建时间 + operator |Integer |R |创建人 + remarks |String |R |备注 + topoNodes |Object[] |R |拓扑节点 +  id |Integer |R |拓扑节点id +  img |String |R |字典表code值,code,sys_dict 表关联,字典type=topo-img +  type |Integer |R |NODE类型 1:节点组,2:节点,3:其它 4:topo +  typeId |Integer |R |NODE对应的节点组或节点ID 当:TYPE = 1时,为节点组ID,TYPE = 2时,为节点ID,TYPE =3 时,无意义 type=4时 topo +  x |Integer |R |横坐标 +  y |Integer |R |纵坐标 +  width |Integer |R |图片宽度 +  height |Integer |R |图片高度 +  text |String |R |NODE提示文本信息 +  class |String |R |样式 +  threshold |String |R |阀值 + topoLines |Object[] |R |拓扑连线 +  id |Integer |R |主键 +  src |Integer |R |线起点 TOPO_NODE_INFO 表的ID +  dest |Integer |R |线终点 TOPO_NODE_INFO 表的ID +  class |String |R |线的样式 +  text |String |R |线条文本内容 +  topoId |Integer |R |TOPO图ID 与TOPO_INFO关联 + +示例: + +``` +{ + "code": 200, + "msg": "success", + "data": { + "id": 1, + "name": "", + "systemId": 1, + "width": 1, + "height": 1, + "class": "", + "opTime": "2019-07-10 10:10:10", + "operator": 1, + "remarks": "", + "topoNodes": [{ + "id": 1, + "img": "", + "topoId": 1, + "type": 1, + "typeId": 1, + "x": 1, + "y": 1, + "width": 1, + "height": 1, + "text": "", + "class": "", + "threshold": "" + }], + "topoLines": [{ + "id": 1, + "src": 1, + "dest": 1, + "class": "", + "text": "", + "topoId": 1 + }] + } +} +``` + +##### 2.4.1.3 拓扑图节点新增 + +- **接口说明:** 拓扑图节点新增 +- **接口地址:** /topo/saveNode +- **请求方式:** POST + +###### 请求参数 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +img |String |R |字典表code值,code,sys_dict 表关联,字典type=topo-img +topoId |Integer |R |topo图ID 与TOPO_INFO关联 +type |Integer |R |NODE类型 1:节点组,2:节点,3:其它 4:topo +typeId |Integer |R |NODE对应的节点组或节点ID 当:TYPE = 1时,为节点组ID,TYPE = 2时,为节点ID,TYPE =3 时,无意义 type=4时 topo +x |Integer |R |横坐标 +y |Integer |R |纵坐标 +width |Integer |R |图片宽度 +height |Integer |R |图片高度 +text |String |R |NODE提示文本信息 +class |String |R |样式 +threshold |String |R |阀值 + +示例: + +``` +{ + "img": "", + "topoId": 1, + "type": 1, + "typeId": 1, + "x": 1, + "y": 1, + "width": 1, + "height": 1, + "text": "", + "class": "", + "threshold": "" +} +``` + +###### 返回结果 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +code |int |R |响应码,详见 附录A +msg |string |R |  + +示例: + +``` +{ + "code": 200/xxx, + "msg": "success" +} +``` + +##### 2.4.1.4 拓扑图节点修改 + +- **接口说明:** 拓扑图节点修改 +- **接口地址:** /topo/updateNode +- **请求方式:** PUT + +###### 请求参数 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +id |Integer |R |id +type |Integer |R |NODE类型 1:节点组,2:节点,3:其它 4:topo +typeId |Integer |R |NODE对应的节点组或节点ID 当:TYPE = 1时,为节点组ID,TYPE = 2时,为节点ID,TYPE =3 时,无意义 type=4时 topo +x |Integer |R |横坐标 +y |Integer |R |纵坐标 +width |Integer |R |图片宽度 +height |Integer |R |图片高度 +text |String |R |NODE提示文本信息 +class |String |R |样式 +threshold |String |R |阀值 + +示例: + +``` +{ + "id": 1, + "type": 1, + "typeId": 1, + "x": 1, + "y": 1, + "width": 1, + "height": 1, + "text": "", + "class": "", + "threshold": "" +} +``` + +##### 2.4.1.5 拓扑图节点删除 + +- **接口说明:** 拓扑图节点删除 +- **接口地址:** /topo/deleteNode +- **请求方式:** DELETE + +###### 请求参数 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +id |Integer |R |id + +示例: + +``` +{ + "id": 35 +} +``` + +###### 返回结果 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +code |int |R |响应码,详见 附录A +msg |string |R |  + +示例: + +``` +{ + "code": 200, + "msg": "success" +} +``` + +##### 2.4.1.6 拓扑图连线新增 + +- **接口说明:** 拓扑图连线新增 +- **接口地址:** /topo/saveLine +- **请求方式:** POST + +###### 请求参数 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +src |Integer |R |线起点 TOPO_NODE_INFO 表的ID +dest |Integer |R |线终点 TOPO_NODE_INFO 表的ID +class |String |R |线的样式 +text |String |R |线条文本内容 +topoId |Integer |R |TOPO图ID 与TOPO_INFO关联 + +示例: + +``` +{ + "src": 1, + "dest": 1, + "class": "", + "text": "", + "topoId": 1 +} +``` + +###### 返回结果 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +code |int |R |响应码,详见 附录A +msg |string |R |  + +示例: + +``` +{ + "code": 200/xxx, + "msg": "success" +} +``` + +##### 2.4.1.7 拓扑图连线修改 + +- **接口说明:** 拓扑图节点修改 +- **接口地址:** /topo/updateLine +- **请求方式:** PUT + +###### 请求参数 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +id |Integer |R |id +src |Integer |R |线起点 TOPO_NODE_INFO 表的ID +dest |Integer |R |线终点 TOPO_NODE_INFO 表的ID +class |String |R |线的样式 +text |String |R |线条文本内容 + +示例: + +``` +{ + "id": 1, + "src": 1, + "dest": 1, + "class": "", + "text": "" +} +``` + +###### 返回结果 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +code |int |R |响应码,详见 附录A +msg |string |R |  + +示例: + +``` +{ + "code": 200/xxx, + "msg": "success" +} +``` + +##### 2.4.1.8 拓扑图连线删除 + +- **接口说明:** 拓扑图节点删除 +- **接口地址:** /topo/deleteLine +- **请求方式:** DELETE + +###### 请求参数 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +id |Integer |R |id + +示例: + +``` +{ + "id": 35 +} +``` + +###### 返回结果 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +code |int |R |响应码,详见 附录A +msg |string |R |  + +示例: + +``` +{ + "code": 200, + "msg": "success" +} +``` + +##### 2.4.1.8 拓扑节点静态图片列表查询 + +- **接口说明:** 拓扑节点静态图片列表查询 +- **接口地址:** /topo/imgList +- **请求方式:** GET + +###### 请求参数 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- + +示例: + +``` +GET /topo/imgList +``` + +###### 返回结果 + +参数名称 |类型 |出现要求 |描述 +:---- |:--- |:------ |:--- +code |int |R |响应码,详见 附录A +msg |string |R |  +data |Object |R |  + list |Object[] |R |  +  code |String |R |字典表的code +  code |String |R |字典表的value,图片地址 + +示例: + +``` +{ + "code": 200, + "msg": "success", + "data": { + "list": [{ + "code": "img1", + "value": "/static/img/xxx" + }] + } +} +``` + + ## 3 附录A 响应码说明 响应码 |说明