setLabel.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. import request from '@/utils/request'
  2. // 查询标签列表
  3. export function listTable(query) {
  4. return request({
  5. url: '/center-monitor/SetLabel/getSetLabelList',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 新增标签
  11. export function addLabel(data) {
  12. return request({
  13. url: '/center-monitor/SetLabel/addLabel',
  14. method: 'post',
  15. data: data
  16. })
  17. }
  18. // 修改标签
  19. export function updateLabel(data) {
  20. return request({
  21. url: '/center-monitor/SetLabel/updateLabel',
  22. method: 'post',
  23. data: data
  24. })
  25. }
  26. // 删除标签
  27. export function deleteLabel(id) {
  28. return request({
  29. url: '/center-monitor/SetLabel/deleteLabel/' + id,
  30. method: 'delete'
  31. })
  32. }
  33. // 查询标签修改页
  34. export function getlabel(id) {
  35. return request({
  36. url: '/center-monitor/SetLabel/getLabels/' + id,
  37. method: 'get',
  38. })
  39. }
  40. // 设置标签页查询
  41. export function Searchtags(name) {
  42. return request({
  43. url: '/center-monitor/SetLabel/Searchtags/' + name,
  44. method: 'get',
  45. })
  46. }
  47. // 查询摄像头设备列表
  48. export function listdevice(query) {
  49. return request({
  50. url: '/center-monitor/SetLabel/getdevice',
  51. method: 'get',
  52. params: query
  53. })
  54. }
  55. // 添加摄像头
  56. export function addCamera(data) {
  57. return request({
  58. url: '/center-monitor/SetLabel/addCamera',
  59. method: 'post',
  60. data: data
  61. })
  62. }
  63. // 根据标签id查询摄像头设备列表
  64. export function getCameraByLabelId(query) {
  65. return request({
  66. url: '/center-monitor/SetLabel/getCameraByLabelId',
  67. method: 'get',
  68. params: query
  69. })
  70. }
  71. // 根据标签id和摄像头id删除
  72. export function removeCameraByLabelId(data) {
  73. return request({
  74. url: '/center-monitor/SetLabel/removeCameraByLabelId',
  75. method: 'delete',
  76. params: data
  77. })
  78. }
  79. // 获取大华摄像头的预置点
  80. export function getPresetPoints(channelId) {
  81. return request({
  82. url: '/center-monitor/DahuaController/getPresetPoints?channelId=' + channelId,
  83. method: 'get'
  84. })
  85. }
  86. // 选择预置点
  87. export function updatePresetPoint(data) {
  88. return request({
  89. url: '/center-monitor/SetLabel/updatePresetPoint',
  90. method: 'post',
  91. data: data
  92. })
  93. }
  94. // 根据标签子表id和设备id查询预置点信息
  95. export function getCameraByIdAndDeviceId(query) {
  96. return request({
  97. url: '/center-monitor/SetLabel/getCameraByIdAndDeviceId',
  98. method: 'get',
  99. params: query
  100. })
  101. }