configuration.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // 设备组态API接口
  2. // 文件路径: src/api/device/configuration.js
  3. import request from '@/utils/request'
  4. // 查询设备组态列表
  5. export function getDeviceConfigurationList(query) {
  6. return request({
  7. url: '/device/configuration/list',
  8. method: 'get',
  9. params: query
  10. })
  11. }
  12. // 获取设备详细信息
  13. export function getDeviceConfiguration(deviceCode) {
  14. return request({
  15. url: '/device/configuration/' + deviceCode,
  16. method: 'get'
  17. })
  18. }
  19. // 获取设备点位列表
  20. export function getDevicePoints(deviceCode) {
  21. return request({
  22. url: '/device/configuration/points/' + deviceCode,
  23. method: 'get'
  24. })
  25. }
  26. // 获取点位详细信息
  27. export function getPointDetail(pointCode) {
  28. return request({
  29. url: '/device/configuration/point/' + pointCode,
  30. method: 'get'
  31. })
  32. }
  33. // 获取点位实时数据
  34. export function getPointRealTimeData(pointCode) {
  35. return request({
  36. url: '/device/configuration/point/realtime/' + pointCode,
  37. method: 'get'
  38. })
  39. }
  40. // 获取点位历史数据
  41. export function getPointHistoryData(query) {
  42. return request({
  43. url: '/device/configuration/point/history',
  44. method: 'get',
  45. params: query
  46. })
  47. }
  48. // 发送控制指令
  49. export function sendControlCommand(data) {
  50. return request({
  51. url: '/device/configuration/control',
  52. method: 'post',
  53. data: data
  54. })
  55. }
  56. // 获取设备组态图
  57. export function getDeviceSchema(deviceCode) {
  58. return request({
  59. url: '/device/configuration/schema/' + deviceCode,
  60. method: 'get'
  61. })
  62. }
  63. // 获取点位告警信息
  64. export function getPointAlarms(pointCode) {
  65. return request({
  66. url: '/device/configuration/point/alarms/' + pointCode,
  67. method: 'get'
  68. })
  69. }
  70. // 获取点位控制记录
  71. export function getPointControlRecords(pointCode) {
  72. return request({
  73. url: '/device/configuration/point/controls/' + pointCode,
  74. method: 'get'
  75. })
  76. }