当前位置: 首页 > news >正文

升级:用vue canvas画一个能源监测设备和设备的关系监测图!

用vue canvas画一个能源电表和设备的监测图-CSDN博客

上一篇文章,我是用后端的数据来画出监测图。这次我觉的,用前端来控制数据,更爽。

本期实现功能:

1,得到监测设备和设备的数据,然后进行存库

2,得到监测设备和设备的关系流程图,然后可以生成图片

3,后期对设备进行监测,可以得知设备的正常状态或者是异常状态。

先上图片:

用法:

1.用户根据自己的监测设备和普通设备位置。在画布上绘出。

2.当用户绘制完后,导出数据则可获得所有的监测设备数据,设备数据,以及流程数据。

3.数据展示

{"devices": [{"id": "device-1748911468928","name": "F2层打印机","type": "normal","position": {"x": 682,"y": 492},"connections": [],"all": {"id": "device-1748911468928","type": "normal","name": "F2层打印机","position": {"x": 682,"y": 492},"size": {"width": 60,"height": 60},"connections": []}},{"id": "device-1748911470171","name": "F2层电表","type": "metering","position": {"x": 462,"y": 337},"connections": ["device-1748911476354","device-1748911468928"],"all": {"id": "device-1748911470171","type": "metering","name": "F2层电表","position": {"x": 462,"y": 337},"size": {"width": 60,"height": 60},"connections": ["device-1748911476354","device-1748911468928"]}},{"id": "device-1748911476354","name": "F2层跑步机","type": "normal","position": {"x": 685,"y": 337},"connections": [],"all": {"id": "device-1748911476354","type": "normal","name": "F2层跑步机","position": {"x": 685,"y": 337},"size": {"width": 60,"height": 60},"connections": []}},{"id": "device-1748911477587","name": "总电表","type": "metering","position": {"x": 254,"y": 214},"connections": ["device-1748911478408","device-1748911470171"],"all": {"id": "device-1748911477587","type": "metering","name": "总电表","position": {"x": 254,"y": 214},"size": {"width": 60,"height": 60},"connections": ["device-1748911478408","device-1748911470171"]}},{"id": "device-1748911478008","name": "大厅设备","type": "normal","position": {"x": 692,"y": 77},"connections": [],"all": {"id": "device-1748911478008","type": "normal","name": "大厅设备","position": {"x": 692,"y": 77},"size": {"width": 60,"height": 60},"connections": []}},{"id": "device-1748911478408","name": "大厅电表","type": "metering","position": {"x": 451,"y": 83},"connections": ["device-1748911478008"],"all": {"id": "device-1748911478408","type": "metering","name": "大厅电表","position": {"x": 451,"y": 83},"size": {"width": 60,"height": 60},"connections": ["device-1748911478008"]}}],"connections": [{"from": "device-1748911477587","to": "device-1748911478408","all": {"id": "conn-1748911650304","from": "device-1748911477587","to": "device-1748911478408","points": []}},{"from": "device-1748911477587","to": "device-1748911470171","all": {"id": "conn-1748911652725","from": "device-1748911477587","to": "device-1748911470171","points": []}},{"from": "device-1748911478408","to": "device-1748911478008","all": {"id": "conn-1748911655187","from": "device-1748911478408","to": "device-1748911478008","points": []}},{"from": "device-1748911470171","to": "device-1748911476354","all": {"id": "conn-1748911657504","from": "device-1748911470171","to": "device-1748911476354","points": []}},{"from": "device-1748911470171","to": "device-1748911468928","all": {"id": "conn-1748911660458","from": "device-1748911470171","to": "device-1748911468928","points": []}}]
}

4.根据数据,进行存库。type代表类型。connections则代表的每个设备之间的关系。

5.在来一张本地保存的图片:

6.后期根据设备的状态,来动态的修改设备的图片。来展示出设备的异常状态和正常状态。

7.这样,设备管理部分就可以轻松搞定了。

欢迎各位大佬点评。

点点关注点点赞。

有需要代码的,留言或者私信。

http://www.lqws.cn/news/89533.html

相关文章:

  • Qt 仪表盘源码分享
  • Electron桌面应用下,在拍照、展示pdf等模块时,容易导致应用白屏
  • 不确定性分析在LEAP能源-环境系统建模中的整合与应用
  • 【QT】QString 与QString区别
  • 基于LEAP模型在能源环境发展、碳排放建模预测及分析中实践应用
  • 【QT】`QTextCursor::insertText()`中插入彩色文本
  • qt 事件顺序
  • Kafka集群部署(docker容器方式)SASL认证(zookeeper)
  • QT常用控件(1)
  • 便捷高效能源服务触手可及,能耗监测系统赋能智能建筑与智慧城市
  • uefi和legacy有什么区别_从几方面分析uefi和legacy的区别
  • C#学习12——预处理
  • 服装产品属性描述数据集(19197条),AI智能体知识库收集~
  • Qwen与Llama分词器核心差异解析
  • 从Java的JDK源码中学设计模式之装饰器模式
  • Rust 学习笔记:关于 Cargo 的练习题
  • 大宽带怎么做
  • 软件评测师 案例真题笔记
  • 05 APP 自动化- Appium 单点触控 多点触控
  • Bash shell四则运算
  • AD转嘉立创EDA
  • n8n 自动化平台 Docker 部署教程(附 PostgreSQL 与更新指南)
  • impala中更改公网ip为内网ip
  • 深入解析 Java 中的 synchronized:从使用到底层原理的全面详解
  • LRC and VIP
  • 数据挖掘顶刊《IEEE Transactions on Knowledge and Data Engineering》2025年5月研究热点都有些什么?
  • SQL思路解析:窗口滑动的应用
  • MyBatis 的动态 SQL
  • 华为数据之道 精读——【173页】读书笔记【附全文阅读】
  • 机器学习实战36-基于遗传算法的水泵调度优化项目研究与代码实现