菜单

57.建模插槽类

下载

建模插槽类

创建插槽

  • 接口描述:传入设备型号id,插槽名称,插槽位置,插槽大小,。

  • URL地址:http://ip:port /wapi/v1/slots

  • 访问方法::Post

  • 请求参数:

    Body参数

参数名 类型 示例值 必填 说明
nodeTypeId Long 26000000132296 型号id
name String 3 插槽名称
x Double 31.2 插槽位置
y Double 84.5
width Double 62.5 插槽大小
height Double 56.5
  • 响应示例:

    {

    "name": "1",

    "x": 25,

    "width": 50,

    "y": 150,

    "angle": 0,

    "subcomponentFields": {

    "id": 1155542,

    "portId": null,

    "slotId": 49000000029604,

    "propertyId": 28000000003729,

    "value": "1",

    "offsetX": 0,

    "offsetY": 0,

    "fontSize": 10,

    "color": "#000000",

    "angle": 0,

    "state": false,

    "bold": false,

    "italic": false,

    "underline": false,

    "fontFamily": null,

    "backgroundColor": null,

    "refPort": false,

    "align": false,

    "justification": true

    },

    "id": 49000000029604,

    "nodeTypeId": 26000000132425,

    "height": 50

    }

修改建模插槽

  • 接口描述:传入建模插槽id和插槽属性修改建插槽。

  • URL地址:http://ip:port /wapi/v1/slots/{slotId}

  • 访问方法::Put

  • 请求参数:

    Path

参数名 类型 示例值 必填 说明
slotId Long 49000000029604 插槽id

Body参数

参数名 类型 示例值 必填 说明
nodeTypeId Long 26000000132296 型号id
name String 3 插槽名称
x Double 211 插槽位置
y Double 71
width Double 62.5 插槽大小
height Double 56.5
  • 响应示例:

{

"code": 200

}

删除建模插槽

  • 接口描述:传入建模插槽iid。删除建模插槽。

  • URL地址:http://ip:port /wapi/v1/ slots /{ slotId }

  • 访问方法::Delete

  • 请求参数:

    Path

参数名 类型 示例值 必填 说明
slotId Long 49000000029604 插槽id
  • 响应示例:

{

"id": 48000000320945,

"nodeTypeId": 26000000132296,

"name": "3",

"x": 212.00882,

"y": 71.50031,

"width": 62.50750045776367,

"height": 56.625443373078156,

"angle": 0,

"refX": 31.25375,

"refY": 0,

"refWidth": 62.50750045776367,

"refHeight": 56.625443373078156,

"refAngle": 0,

"anchorPointX": 0.5,

"anchorPointY": 0.5,

"refPointX": 0.5,

"refPointY": 0.5,

"nodeClassName": null,

"relativeX": 31.253750228881835,

"relativeY": 84.93816505961723,

"hidden": false

}

根据模型获取建模插槽

  • 接口描述:传入模型id,查询此模型内建模插槽。

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

  • 访问方法::Get

  • 请求参数:

    Path

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

    [

    {

    "name": "1",

    "x": 187.37402,

    "width": 50,

    "y": 169.03696,

    "angle": 0,

    "subcomponentFields": {

    "id": 1155542,

    "portId": null,

    "slotId": 49000000029604,

    "propertyId": 28000000003729,

    "value": "1",

    "offsetX": 0,

    "offsetY": 0,

    "fontSize": 10,

    "color": "#000000",

    "angle": 0,

    "state": false,

    "bold": false,

    "italic": false,

    "underline": false,

    "fontFamily": null,

    "backgroundColor": null,

    "refPort": false,

    "align": false,

    "justification": true

    },

    "id": 49000000029604,

    "nodeTypeId": 26000000132425,

    "height": 50

    }

    ]

最近修改: 2025-02-28