菜单

35.节点字段类

下载

节点字段类

创建节点字段

  • 接口描述:传入连线型号id和字段名称,给该节点型号创建字段。

  • URL地址:http://ip:port /wapi/v1/node_properties/{nodeTypeId}

  • 访问方法::Post

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodeTypeId Long 26000000132418 节点型号id

Body参数

参数名 类型 示例值 必填 说明
name String test 字段名
  • 响应示例:

{

"code": 200,

"data": {

"id": 28000000343353,

"nodeTypeId": 26000000132418,

"name": "test",

"defaultValue": null,

"position": 2,

"mandatory": true,

"displayed": null,

"fontSize": 10,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": -15,

"angle": 0,

"anchorPointX": 0,

"anchorPointY": 0,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": false,

"justification": 0,

"snmpOid": null,

"system": false,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

}

}

根据节点型号获取字段

  • 接口描述:传入节点型号id获取此模型型号的所有字段。

  • URL地址:http://ip:port /wapi/v1/node_properties/{nodeTypeId}/node_type_id

  • 访问方法::Get

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodeTypeId Long 26000000132418 节点型号id
  • 响应示例:

{

"totalCount": 2,

"data": [

{

"nodeTypeId": 26000000132418,

"num": 1,

"id": 28000000343344,

"name": "创建者",

"position": 1,

"mandatory": false,

"defaultValue": null,

"hierarchyBrowserLabel": false,

"overridesCount": 0,

"ttrigger": 0,

"lockList": false,

"displayed": false,

"fontColor": "#000000",

"fillColor": null,

"fontSize": 0,

"snmpOid": null,

"justification": "左上角",

"system": true,

"inProperties": true,

"uniqueForThisType": false,

"uniqueForAllTypes": false

},

{

"nodeTypeId": 26000000132418,

"num": 2,

"id": 28000000343345,

"name": "峰值功率KW",

"position": 1,

"mandatory": false,

"defaultValue": "0",

"hierarchyBrowserLabel": false,

"overridesCount": 0,

"ttrigger": 0,

"lockList": false,

"displayed": false,

"fontColor": "#000000",

"fillColor": null,

"fontSize": 0,

"snmpOid": null,

"justification": "左上角",

"system": true,

"inProperties": true,

"uniqueForThisType": false,

"uniqueForAllTypes": false

}

]

}

根据id获取字段

  • 接口描述:传入节点字段id获取对应节点字段数据。

  • URL地址:http://ip:port /wapi/v1/node_properties/{nodePropertyId}

  • 访问方法::Get

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodePropertyId Long 28000000343344 节点字段id
  • 响应示例:

{

"nodeTypeId": 26000000132418,

"num": 1,

"id": 28000000343344,

"name": "创建者",

"position": 1,

"mandatory": false,

"defaultValue": null,

"hierarchyBrowserLabel": false,

"overridesCount": 0,

"ttrigger": 0,

"lockList": false,

"displayed": false,

"fontColor": "#000000",

"fillColor": null,

"fontSize": 0,

"snmpOid": null,

"justification": "左上角",

"system": true,

"inProperties": true,

"uniqueForThisType": false,

"uniqueForAllTypes": false

}

删除节点字段

  • 接口描述:传入节点字段id删除对应节点字段数据。

  • URL地址:http://ip:port /wapi/v1/node_properties/{nodePropertyId}

  • 访问方法::Delete

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodePropertyId Long 28000000343344 节点字段id
  • 响应示例:

{

"code": 200

}

修改节点字段

  • 接口描述:传入节点字段id和字段属性,修改该字段。

  • URL地址:http://ip:port /wapi/v1/node_properties/{ nodePropertyId}

  • 访问方法::Put

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodePropertyId Long 28000000343344 节点字段id

Body参数

参数名 类型 示例值 必填 说明
name String test 字段名
defaultValue String 100 字段默认值
displayed Bool true 默认显示
fontSize Double 20.0 字段文字大小
fontColor String #eb1a1a 字段文字颜色
isSystem Bool false 是否系统字段
offsetX Double 10.0 字段文字x,y偏移位置
offsetY Double 10.0
  • 响应示例:

{

"nodeTypeId": 26000000132418,

"num": 1,

"id": 28000000343344,

"name": "test",

"position": 1,

"mandatory": false,

"defaultValue": “100”,

"hierarchyBrowserLabel": false,

"overridesCount": 0,

"ttrigger": 0,

"lockList": false,

"displayed": false,

"fontColor": "#000000",

"fillColor": null,

"fontSize": 0,

"snmpOid": null,

"justification": "左上角",

"system": true,

"inProperties": true,

"uniqueForThisType": false,

"uniqueForAllTypes": false

}

依据节点名称获取字段

  • 接口描述:传入节点型号id和节点字段名称获取对应字段。

  • URL地址:http://ip:port/wapi/v1/node_properties/{nodeTypeId}/node_type_id/{propertyName}/property_name

  • 访问方法::Get

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodeTypeId Long 27000000000204 连线类型id
propertyName String 名称 字段名
  • 响应示例:

{

"id": 28000000343347,

"nodeTypeId": 26000000132418,

"name": "名称",

"defaultValue": null,

"position": 1,

"mandatory": null,

"displayed": null,

"fontSize": null,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0.0,

"offsetY": 0.0,

"angle": 0,

"anchorPointX": 1,

"anchorPointY": 1,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": null,

"justification": 0,

"snmpOid": null,

"system": true,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

}

给每个型号创建字段

  • 接口描述:传入连节点段名称,给nvisual系统内所有节点型号创建这个名称的字段,已有此名称字段的型号会跳过,不会重复生成。

  • URL地址:http://ip:port/wapi/v1/node_properties/everyNodes/{nodePropertyName}

  • 访问方法::Post

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
propertyName String 名称 字段名
  • 响应示例:

{

"code": 200

}

修改字段排列顺序

  • 接口描述:传入节点字段id和顺序位置,修改该字段所在型号的顺序位置。

  • URL地址:http://ip:port/wapi/v1/node_properties/{nodePropertyId}/position/{position}

  • 访问方法::Put

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
nodePropertyId Long 28000000343344 字段id
position integer 2 字段顺序
  • 响应示例:

{

"id": 28000000343344,

"nodeTypeId": 26000000132418,

"name": "创建者",

"defaultValue": null,

"position": 1,

"mandatory": null,

"displayed": null,

"fontSize": null,

"fontColor": "#000000",

"notEditable": false,

"offsetX": 0,

"offsetY": 0,

"angle": 0,

"anchorPointX": 1,

"anchorPointY": 1,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": null,

"justification": 0,

"snmpOid": null,

"system": true,

"inProperties": true,

"typeField": false,

"uniqueForThisType": null,

"uniqueForAllTypes": null

}

批量查询对象字段

  • 接口描述:传入对象id列表,对象分类id,批量查询对象字段列表。

  • URL地址:http://ip:port/wapi/v1/batch_modification/form

  • 访问方法::Post

  • 请求参数:

    Body参数

参数名 类型 示例值 必填 说明
objectIds List<Long> [24749000725656, 24749000725655] 对象id列表
typegroupId integer 7 1是节点,7是设备,8是机柜,13是线缆
  • 响应示例:

{ "data": [ { "ID": 24749000725656, "名称": "C1", "创建者": null, "峰值功率KW": "0", "效果": null, "生命周期": null, "监测状态": null, "维护人": null, "重量Kg": "0", "图层": null, "坐标": null, "光缆数量": null, "施工时间": null, "板卡": null, "重量": null, "IP": null, "经纬度": null, "longitude": null, "latitude": null, "地址": null }, { "ID": 24749000725655, "名称": "B1", "创建者": null, "峰值功率KW": "0", "效果": null, "生命周期": null, "监测状态": null, "维护人": null, "重量Kg": "0", "图层": null, "坐标": null, "光缆数量": null, "施工时间": null, "板卡": null, "重量": null, "IP": null, "经纬度": null, "longitude": null, "latitude": null, "地址": null } ],

"totalCount":7

}

最近修改: 2025-02-27