连线 scada-link
2026年7月20日大约 5 分钟
连线 scada-link
组态连线:拓扑线(挂图元端口)或自由线,支持流动动画、路径动画符号与立体管道模式(line-style: pipe)。
放在
scada-2d的pieces里;图元用场景坐标geo-x/y/w/h。
在线演示
① 流动 / 路径动画——自上而下:flow 水流 / beads 水珠 / arrow 箭头 三种流动动画,以及 droplet 水滴 / gear 齿轮 两种路径动画符号(沿线行进、随向旋转):
② 走线方式与途径点——line 直线 / polyline 折线(经 waypoints 途径点)/ curve 曲线,均为自由端连线:
③ 立体管道(line-style: "pipe",对照组态王)——同心分层描边出圆柱观感,线宽即管径;折线途径点自动画弯头节点圆、两端画法兰;流动层贴合管芯内腔:
属性
| 属性 | 名称 | 类型 | 默认 | 说明 |
|---|---|---|---|---|
from-node | string | — | ||
from-port | string | — | ||
to-node | string | — | ||
to-port | string | — | ||
from-x | number | — | ||
from-y | number | — | ||
to-x | number | — | ||
to-y | number | — | ||
waypoints | json | — | ||
router | 走线 | select | polyline | 可选:line / polyline / curve |
line-style | 线型 | select | line | 可选:line / pipe |
stroke | 线色 | color | — | |
line-width | 线宽 | number(unit=px,min=1) | 2 | |
pipe-joints | 弯头/法兰 | boolean | true | |
arrow | 箭头 | boolean | true | |
dash | 虚线 | boolean | false | |
flow | 流动动画 | boolean | false | |
flow-style | 样式 | select | flow | 可选:flow / beads / dot / arrow / waterdrop / pulse |
flow-direction | 方向 | select | forward | 可选:forward / reverse |
flow-color | 流动色 | color | — | |
flow-speed | 流速 | number(min=0.1,max=20,step=0.1) | 1.5 | |
flow-glow | 辉光 | boolean | false | |
marker | 移动符号 | boolean | false | |
marker-shape | 符号 | select | arrow | 可选:arrow / triangle / chevron / dot / ring / square / diamond / star / droplet / bolt / box / flame / gear / svg |
marker-svg | SVG 图形 | scada-marker-svg | — | |
marker-svg-path | string | — | ||
marker-svg-els | string | — | ||
marker-svg-viewbox | string | — | ||
marker-svg-src | string | — | ||
marker-size | 符号大小 | number(unit=px,min=4,max=200) | 14 | |
marker-count | 数量 | number(min=1,max=12,step=1) | 3 | |
marker-speed | 速度 | number(min=0.1,max=20,step=0.1) | 1.4 | |
marker-color | 符号色 | color | — | |
marker-rotate | 随向旋转 | boolean | true | |
marker-keep-upright | 防止颠倒 | boolean | false | |
marker-direction | 方向 | select | forward | 可选:forward / reverse |
marker-offset-x | 沿线偏移 | number(unit=px,min=-500,max=500) | 0 | |
marker-offset-y | 垂直偏移 | number(unit=px,min=-500,max=500) | 0 | |
row-row-filter-mode-id | 选择数据规则 | select(condition) | — | |
data-enabled | 启用 | boolean | false | |
data-key | 测点键 | select(editable) | — | |
mock-enabled | 编辑预览Mock | boolean | false | |
mock-value | Mock值 | string | — | |
flow-by-value | 按值流动 | boolean | false | 按测点启停流动;同时控制路径动画符号(停机时符号一并停) |
flow-rules | 流动规则 | string(textarea,rows=4) | run|1=on stop|0=off back|-1=reverse | |
flow-map-by-value | 按值流速映射 | boolean | false | |
flow-map-signed | 值符号定方向 | boolean | true | |
flow-in-min | 输入下限 | number | 0 | |
flow-in-max | 输入上限 | number | 100 | |
flow-speed-min | 流速下限 | number(min=0.1,max=20,step=0.1) | 0.5 | |
flow-speed-max | 流速上限 | number(min=0.1,max=20,step=0.1) | 6 |
事件
| 触发器 | 名称 | 配在哪 | payload |
|---|---|---|---|
scada-link-click | 点击连线 | scada-2d 组件的 options.interactions | 连线信息 |
事件写在组态组件上而非图元上;动作可用
scadaWritePoint(写测点,value填toggle可点管线开/关流)、scadaSetOption(改图元选项)及全部通用动作,见事件交互。
示例
{
"uid": "l1",
"type": "scada-link",
"options": {
"from-node": "n_pump", "from-port": "e",
"to-node": "n_tank", "to-port": "w",
"router": "polyline",
"flow": true, "flow-style": "flow"
}
}延伸阅读:组态 SCADA 子系统(结构 / 主题 / 测点数据模型 / 形状库)· 数据系统 · 事件交互。