device.js 988 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import request from '@/utils/request'
  2. // 查询列表【请填写功能名称】
  3. export function listDevice(query) {
  4. return request({
  5. url: '/system/device/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询详细【请填写功能名称】
  11. export function getDevice(id) {
  12. return request({
  13. url: '/system/device/' + id,
  14. method: 'get'
  15. })
  16. }
  17. // 查询主机
  18. export function getHostByOrgId(orgId) {
  19. return request({
  20. url: '/system/device/getHostByOrgId/' + orgId,
  21. method: 'get'
  22. })
  23. }
  24. // 新增【请填写功能名称】
  25. export function addDevice(data) {
  26. return request({
  27. url: '/system/device',
  28. method: 'post',
  29. data: data
  30. })
  31. }
  32. // 修改【请填写功能名称】
  33. export function updateDevice(data) {
  34. return request({
  35. url: '/system/device',
  36. method: 'put',
  37. data: data
  38. })
  39. }
  40. // 删除【请填写功能名称】
  41. export function delDevice(id) {
  42. return request({
  43. url: '/system/device/' + id,
  44. method: 'delete'
  45. })
  46. }