buildTaskApi.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. import http from '../scan/httpUtil'
  2. const baseUrl = '/api';
  3. /**
  4. * info: 查询统计数量(查询总数量不传参数,查询已完成数量TaskState=0,查询未找到TaskState=-1,查询未验证TaskState=1)
  5. * @param {Filters:string} param 查询参数
  6. * @param {*} success 成功的回调函数
  7. *
  8. */
  9. export function queryTaskCount(param, success) {
  10. let url = `${baseUrl}/datacenter/scan-task-base/count`;
  11. http.postJson(url, param, success)
  12. }
  13. /*************************模型任务接口****************************/
  14. //创建模型任务
  15. export function createModelTask(param, success) {
  16. let url = `${baseUrl}/datacenter/model-scan-task/create`;
  17. http.postJson(url, param, success)
  18. }
  19. //根据id删除模型任务
  20. export function deleteModelTask(param, success) {
  21. let url = `${baseUrl}/datacenter/model-scan-task/delete`;
  22. http.postJson(url, param, success)
  23. }
  24. //查询模型任务
  25. export function queryModelTask(param, success) {
  26. let url = `${baseUrl}/datacenter/model-scan-task/page-query`;
  27. http.postJson(url, param, success)
  28. }
  29. //更新模型任务
  30. export function updateModelTask(param, success) {
  31. let url = `${baseUrl}/datacenter/model-scan-task/update`;
  32. http.postJson(url, param, success)
  33. }
  34. //查询设备分类
  35. export function queryModelCategory(param, success) {
  36. let url = `${baseUrl}/datacenter/model-scan-task/model-category-query`;
  37. http.postJson(url, param, success)
  38. }
  39. //查询模型文件夹和文件
  40. export function queryModelFile(param, success) {
  41. let url = `${baseUrl}/datacenter/model-scan-task/model-file-query`;
  42. http.postJson(url, param, success)
  43. }
  44. /*************************设备台账任务接口****************************/
  45. //创建设备台账任务
  46. export function createDeviceTask(param, success) {
  47. let url = `${baseUrl}/datacenter/equip-scan-task/create`;
  48. http.postJson(url, param, success)
  49. }
  50. //根据id删除设备台账任务
  51. export function deleteDeviceTask(param, success) {
  52. let url = `${baseUrl}/datacenter/equip-scan-task/delete`;
  53. http.postJson(url, param, success)
  54. }
  55. //查询设备台账任务
  56. export function queryDeviceTask(param, success) {
  57. let url = `${baseUrl}/datacenter/equip-scan-task/page-query`;
  58. http.postJson(url, param, success)
  59. }
  60. //更新设备台账任务
  61. export function updateDeviceTask(param, success) {
  62. let url = `${baseUrl}/datacenter/equip-scan-task/update`;
  63. http.postJson(url, param, success)
  64. }
  65. //查询设备分类
  66. export function queryDeviceCategory(param, success) {
  67. let url = `${baseUrl}/datacenter/equip-scan-task/equip-category-query`;
  68. http.postJson(url, param, success)
  69. }
  70. //查询:根据模型空间ID查询设备信息
  71. export function queryModelDiglog(param, success) {
  72. // let query = ''
  73. // listId.map(item => {
  74. // query += `listId=${item}&`
  75. // })
  76. // let url = `${baseUrl}/datacenter/model-scan-task/equip-query?${query}`;
  77. // http.postJson(url, param, success)
  78. let url = `${baseUrl}/datacenter/model-scan-task/equip-query`;
  79. http.postJson(url, param, success)
  80. }
  81. /*************************资产台账任务接口****************************/
  82. //统计数量
  83. export function countAssetsTask(param, success) {
  84. let url = `${baseUrl}/datacenter/property-scan-task/count`;
  85. http.postJson(url, param, success)
  86. }
  87. //创建设备台账任务
  88. export function createAssetsTask(param, success) {
  89. let url = `${baseUrl}/datacenter/property-scan-task/create`;
  90. http.postJson(url, param, success)
  91. }
  92. //根据id删除设备台账任务
  93. export function deleteAssetsTask(param, success) {
  94. let url = `${baseUrl}/datacenter/property-scan-task/delete`;
  95. http.postJson(url, param, success)
  96. }
  97. //查询设备台账任务
  98. export function queryAssetsTask(param, success) {
  99. let url = `${baseUrl}/datacenter/property-scan-task/page-query`;
  100. http.postJson(url, param, success)
  101. }
  102. //更新设备台账任务
  103. export function updateAssetsTask(param, success) {
  104. let url = `${baseUrl}/datacenter/property-scan-task/update`;
  105. http.postJson(url, param, success)
  106. }
  107. //查询设备族
  108. export function queryAssetsFamily(param, success) {
  109. let url = `${baseUrl}/datacenter/property-scan-task/property-category-query`;
  110. http.postJson(url, param, success)
  111. }