deviceInfo.js 912 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import request from '@/utils/request'
  2. // 查询所有设备列表
  3. export const getDeviceList = () =>
  4. request({
  5. url: '/device/deviceInfo/getList',
  6. method: 'get'
  7. })
  8. //分页查询设备
  9. export const getDeviceFindPageList = (data) =>
  10. request({
  11. url: `/device/deviceInfo/findByPage?conditionJson=&currentPage=${data.currentPage}&size=${data.size}`,
  12. method: 'get'
  13. })
  14. //ID查询
  15. export const getDeviceID = (id) =>
  16. request({
  17. url: `/device/deviceInfo/getById/${id}`,
  18. method: 'get'
  19. })
  20. //设备新增
  21. export const addDevice = (data) =>
  22. request({
  23. url: '/device/deviceInfo/save',
  24. method: 'post',
  25. data
  26. })
  27. //设备修改
  28. export const updateDevice = (data) =>
  29. request({
  30. url: '/device/deviceInfo/updateById',
  31. method: 'post',
  32. data
  33. })
  34. export const deleteDevice = (data) =>
  35. request({
  36. url: '/device/deviceInfo/delete',
  37. method: 'post',
  38. data
  39. })