door.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. import { request } from "@/utils/request";
  2. /**
  3. * 门禁接口集合
  4. * @method Select 列表查询
  5. * @method Update 列表修改
  6. * @method Insert 列表新增
  7. * @method Delete 列表删除
  8. * @method RecordInsert 记录列表新增
  9. * @method RecordSelect 记录列表查询
  10. * @method control 开门
  11. */
  12. export function doorApi() {
  13. return {
  14. Select: (data) => {
  15. return request({
  16. url: `/service-eg/egDevice/page`,
  17. method: 'POST',
  18. data,
  19. });
  20. },
  21. Update: (data) => {
  22. return request({
  23. url: `/service-eg/egDevice`,
  24. method: 'PUT',
  25. data,
  26. });
  27. },
  28. Insert: (data) => {
  29. return request({
  30. url: `/service-eg/egDevice`,
  31. method: 'POST',
  32. data,
  33. });
  34. },
  35. Delete: (data) => {
  36. return request({
  37. url: `/service-eg/egDevice/` + data,
  38. method: 'DELETE',
  39. });
  40. },
  41. RecordInsert: (data) => {
  42. return request({
  43. url: `/service-eg/egRecord`,
  44. method: 'POST',
  45. data,
  46. });
  47. },
  48. MyPage: (data) => {
  49. return request({
  50. url: `/service-eg/egDevice/wePage`,
  51. method: 'POST',
  52. data,
  53. });
  54. },
  55. RecordSelect: (data) => {
  56. return request({
  57. url: `/service-eg/egRecord/page`,
  58. method: 'POST',
  59. data,
  60. });
  61. },
  62. control: (data) => {
  63. return request({
  64. url: `/service-eg/egDevice/control`,
  65. method: 'GET',
  66. data,
  67. });
  68. },
  69. };
  70. }
  71. //门禁设备心跳接口
  72. export function egDeviceHeartbeat(data) {
  73. return request({
  74. url: '/service-eg/egDeviceHeartbeat/escalation',
  75. method: 'POST',
  76. data
  77. })
  78. }