菜单

26.连线字段类

下载

连线字段类

创建连线字段

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

  • URL地址:http://ip:port /wapi/v1/link_properties/{linkTypeId}

  • 访问方法::Post

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
linkTypeId Long 27000000000204 连线型号id

Body参数

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

{

"code": 200,

"data": {

"id": 29000000031608,

"linkTypeId": 27000000000204,

"name": "test",

"defaultValue": null,

"position": 1,

"mandatory": false,

"displayed": null,

"fontSize": 10,

"fontColor": "#000000",

"offsetX": 0,

"offsetY": -15,

"angle": 0,

"bold": false,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": false,

"typeField": false,

"justification": 0,

"uprightAlignment": null,

"system": false,

"inProperties": true,

"uniqueForThisType": null,

"uniqueForAllTypes": null

}

}

根据连线型号获取字段

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

  • URL地址:http://ip:port /wapi/v1/link_properties/{linkTypeId}/link_type_id

  • 访问方法::Get

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
linkTypeId Long 27000000000204 连线类型id
  • 响应示例:

[

{

"id": 29000000031599,

"linkTypeId": 27000000000204,

"name": "名称",

"defaultValue": null,

"position": 1,

"mandatory": null,

"displayed": null,

"fontSize": null,

"fontColor": "#000000",

"offsetX": 0.0,

"offsetY": 0.0,

"angle": 0,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 1,

"lockList": null,

"typeField": false,

"justification": 1,

"uprightAlignment": null,

"system": false,

"inProperties": true,

"uniqueForThisType": null,

"uniqueForAllTypes": null

}

]

根据id获取字段

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

  • URL地址:http://ip:port /wapi/v1/link_properties/{linkPropertyId}

  • 访问方法::Get

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
linkPropertyId Long 29000000031599 连线字段id
  • 响应示例:

[

{

"id": 29000000031599,

"linkTypeId": 27000000000204,

"name": "名称",

"defaultValue": null,

"position": 1,

"mandatory": null,

"displayed": null,

"fontSize": null,

"fontColor": "#000000",

"offsetX": 0.0,

"offsetY": 0.0,

"angle": 0,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 1,

"lockList": null,

"typeField": false,

"justification": 1,

"uprightAlignment": null,

"system": false,

"inProperties": true,

"uniqueForThisType": null,

"uniqueForAllTypes": null

}

]

删除连线字段

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

  • URL地址:http://ip:port /wapi/v1/link_properties/{linkPropertyId}

  • 访问方法::Delete

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
linkPropertyId Long 29000000031599 连线字段id
  • 响应示例:

{

"code": 200

}

修改连线字段

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

  • URL地址:http://ip:port /wapi/v1/link_properties/{linkPropertyId}

  • 访问方法::Put

  • 请求参数:

    Path参数

参数名 类型 示例值 必填 说明
linkPropertyId Long 29000000031599 连线字段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
  • 响应示例:

{

"id": 29000000031599,

"linkTypeId": 27000000000204,

"name": "名称",

"defaultValue": null,

"position": 1,

"mandatory": null,

"displayed": null,

"fontSize": null,

"fontColor": "#eb1a1a",

"offsetX": 0,

"offsetY": 0,

"angle": 0,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": null,

"typeField": false,

"justification": 0,

"uprightAlignment": null,

"system": false,

"inProperties": true,

"uniqueForThisType": null,

"uniqueForAllTypes": null

}

连线型号和名称获取字段

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

  • URL地址:http://ip:port/wapi/v1/link_properties/{linkTypeId}/link_type_id/{propertyName}/property_name

  • 访问方法::Get

  • 请求参数:

    Path参数

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

{

"id": 29000000031599,

"linkTypeId": 27000000000204,

"name": "名称",

"defaultValue": null,

"position": 1,

"mandatory": null,

"displayed": null,

"fontSize": null,

"fontColor": "#eb1a1a",

"offsetX": 0,

"offsetY": 0,

"angle": 0,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": null,

"typeField": false,

"justification": 0,

"uprightAlignment": null,

"system": false,

"inProperties": true,

"uniqueForThisType": null,

"uniqueForAllTypes": null

}

给每个型号创建字段

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

  • URL地址:http://ip:port/wapi/v1/link_properties/everyLinks/{linkPropertyName}

  • 访问方法::Post

  • 请求参数:

    Path参数

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

{

"code": 200

}

修改字段排列顺序

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

  • URL地址:http://ip:port/wapi/v1/link_properties/{linkPropertyId}/position/{position}

  • 访问方法::Put

  • 请求参数:

    Path参数

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

{

"id": 29000000031599,

"linkTypeId": 27000000000204,

"name": "名称",

"defaultValue": null,

"position": 1,

"mandatory": null,

"displayed": null,

"fontSize": null,

"fontColor": "#eb1a1a",

"offsetX": 0,

"offsetY": 0,

"angle": 0,

"bold": null,

"italic": null,

"underline": null,

"fontFamily": null,

"fillColor": null,

"align": 0,

"lockList": null,

"typeField": false,

"justification": 0,

"uprightAlignment": null,

"system": false,

"inProperties": true,

"uniqueForThisType": null,

"uniqueForAllTypes": null

}

最近修改: 2025-02-27