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

升级:用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.lryc.cn/news/2403540.html

相关文章:

  • Elasticsearch + Milvus 构建高效知识库问答系统《一》
  • 深入理解 transforms.Normalize():PyTorch 图像预处理中的关键一步
  • leetcode 2434. 使用机器人打印字典序最小的字符串 中等
  • 爆炸仿真的学习日志
  • 【Fiddler抓取手机数据包】
  • [华为eNSP] OSPF综合实验
  • 东芝Toshiba DP-4528AG打印机信息
  • Vue3+Vite中lodash-es安装与使用指南
  • 完美搭建appium自动化环境
  • c++中的输入输出流(标准IO,文件IO,字符串IO)
  • App使用webview套壳引入h5(三)——解决打包为app后在安卓机可物理返回但是在苹果手机无法测滑返回的问题
  • CSS中text-align: justify文本两端对齐
  • 2025年渗透测试面试题总结-ali 春招内推电话1面(题目+回答)
  • C#中的依赖注入
  • Reactor和Proactor
  • 黄晓明新剧《潜渊》定档 失忆三面间谍开启谍战新维度
  • 深入浅出Java ParallelStream:高效并行利器还是隐藏的陷阱?
  • 物联网嵌入式开发实训室建设方案探讨(高职物联网应用技术专业实训室建设)
  • 集成学习三种框架
  • 大数据量高实时性场景下订单生成的优化方案
  • 在UI界面内修改了对象名,在#include “ui_mainwindow.h“没更新
  • ocrapi服务docker镜像使用
  • 使用React+ant Table 实现 表格无限循环滚动播放
  • Podman 和 Docker
  • Neovim - 常用插件,提升体验(三)
  • C++单例模式教学指南
  • SOC-ESP32S3部分:31-ESP-LCD控制器库
  • 如何区分虚拟货币诈骗与经营失败?
  • Flink 高可用集群部署指南
  • 【云安全】以Aliyun为例聊云厂商服务常见利用手段