device.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import request from '@/utils/request'
  2. import { parseStrEmpty } from "@/utils/ruoyi";
  3. // 查询列表【请填写功能名称】
  4. export function listDevice(query) {
  5. return request({
  6. url: '/system/device/list',
  7. method: 'get',
  8. params: query
  9. })
  10. }
  11. export function listIdName(query) {
  12. return request({
  13. url: '/system/device/listidname',
  14. method: 'get',
  15. params: query
  16. })
  17. }
  18. // 查询详细【请填写功能名称】
  19. export function getDevice(id) {
  20. return request({
  21. url: '/system/device/' + id,
  22. method: 'get'
  23. })
  24. }
  25. // 查询主机
  26. export function getHostByOrgId(orgId) {
  27. return request({
  28. url: '/system/device/getHostByOrgId/'+ orgId.id,
  29. method: 'get'
  30. })
  31. }
  32. export function downInCharge() {
  33. return request({
  34. url: '/system/device/downInChargeOfTemplate',
  35. method: 'get'
  36. })
  37. }
  38. // 新增【请填写功能名称】
  39. export function addDevice(data) {
  40. return request({
  41. url: '/system/device',
  42. method: 'post',
  43. data: data
  44. })
  45. }
  46. // 修改【请填写功能名称】
  47. export function updateDevice(data) {
  48. return request({
  49. url: '/system/device',
  50. method: 'put',
  51. data: data
  52. })
  53. }
  54. // 删除【请填写功能名称】
  55. export function delDevice(id) {
  56. return request({
  57. url: '/system/device/' + id,
  58. method: 'delete'
  59. })
  60. }
  61. // 查询主机
  62. export function getDictTree() {
  63. return request({
  64. url: '/system/dictionary/list',
  65. method: 'get'
  66. })
  67. }