datacenter.ts 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. /**
  2. * 数据中台通用接口文档
  3. */
  4. import httputils from "@/api/httputils";
  5. const baseApi = "/datacenter";
  6. // 创建项目
  7. export function projectCreate(postParams: any): any {
  8. return httputils.postJson(`${baseApi}/object/project/create`, postParams);
  9. }
  10. // 查询项目信息
  11. export function projectQuery(postParams: any): any {
  12. return httputils.postJson(`${baseApi}/object/project/query`, postParams);
  13. }
  14. // 更新项目信息
  15. export function projectUpdate(postParams: any): any {
  16. return httputils.postJson(`${baseApi}/object/project/update`, postParams);
  17. }
  18. // 查询建筑信息
  19. export function buildingQuery(postParams: any): any {
  20. return httputils.postJson(`${baseApi}/object/building/query`, postParams);
  21. }
  22. // 查询建筑信息
  23. export function floorQuery(postParams: any): any {
  24. return httputils.postJson(`${baseApi}/object/floor/query`, postParams);
  25. }
  26. // 字典查询
  27. export function dictCategoryQuery(postParams: any): any {
  28. return httputils.postJson(`${baseApi}/dict/category`, postParams);
  29. }
  30. // 查询项目下类型的信息点-->编辑器 空间功能类型 列表-->自己转成树
  31. export function dictQuery(postParams: any): any {
  32. // postParams:{
  33. // "filters": "code='roomFuncType'",
  34. // "type": "FunctionZone"
  35. // }
  36. return httputils.postJson(`${baseApi}/dict/query`, postParams);
  37. }
  38. // 查询空间实例
  39. export function PartiInstancQuery(postParams: any): any {
  40. // postParams:{
  41. // "filters": "code='roomFuncType'",
  42. // "type": "FunctionZone"
  43. // }
  44. return httputils.postJson(`${baseApi}/object/zone/query`, postParams);
  45. }
  46. // 查询设备信息
  47. export function queryEquip(postParams: any): any {
  48. return httputils.postJson(`${baseApi}/object/equip/query`, postParams)
  49. }
  50. // 根据id删除设备信息
  51. export function deleteEquip(postParams: any): any {
  52. return httputils.postJson(`${baseApi}/object/equip/delete`, postParams)
  53. }
  54. // 创建设备信息
  55. export function createEquip(postParams: any): any {
  56. return httputils.postJson(`${baseApi}/object/equip/create`, postParams)
  57. }
  58. // 统计所有的设备类型
  59. export function allDevices(postParams: any) {
  60. return httputils.postJson(`${baseApi}/dict/category`, postParams)
  61. }
  62. // 更新设备信息
  63. export function updateEquip(postParams: any): any {
  64. return httputils.postJson(`${baseApi}/object/equip/update`, postParams)
  65. }
  66. // 导出设备
  67. export function exportEquip(getParams: any): any {
  68. return httputils.getDownload(`${baseApi}/object/equip/export`, getParams)
  69. }
  70. // 查询系统信息
  71. export function querySystem(postParams: any): any {
  72. return httputils.postJson(`${baseApi}/object/system/query`, postParams)
  73. }
  74. // 查询空间信息
  75. export function queryZone(postParams: any): any {
  76. return httputils.postJson(`${baseApi}/object/zone/query`, postParams)
  77. }
  78. // 查询元空间信息
  79. export function queryIspace(postParams: any): any {
  80. return httputils.postJson(`${baseApi}/object/ispace/query`, postParams)
  81. }
  82. // 创建空间
  83. export function createZone(postParams: any): any {
  84. return httputils.postJson(`${baseApi}/object/zone/create`, postParams)
  85. }
  86. // 更新空间
  87. export function updateZone(postParams: any): any {
  88. return httputils.postJson(`${baseApi}/object/zone/update`, postParams)
  89. }
  90. // 更新空间
  91. export function deleteZone(postParams: any): any {
  92. return httputils.postJson(`${baseApi}/object/zone/delete`, postParams)
  93. }
  94. // 查询设备统计
  95. export function queryCount(postParams: any): any {
  96. return httputils.postJson(`${baseApi}/object/equip/count`, postParams)
  97. }
  98. // 查询系统统计
  99. export function queryCountSystem(postParams: any): any {
  100. return httputils.postJson(`${baseApi}/object/system/count`, postParams)
  101. }
  102. // 创建系统信息
  103. export function createSystem(postParams: any): any {
  104. return httputils.postJson(`${baseApi}/object/system/create`, postParams)
  105. }
  106. // 更新系统信息
  107. export function updateSystem(postParams: any): any {
  108. return httputils.postJson(`${baseApi}/object/system/update`, postParams)
  109. }
  110. // 查询空间信息
  111. export function zoneQuery(postParams: any): any {
  112. return httputils.postJson(`${baseApi}/object/zone/query`, postParams)
  113. }
  114. // 查询空间统计
  115. export function queryCountSpace(postParams: any): any {
  116. return httputils.postJson(`${baseApi}/object/zone/count`, postParams)
  117. }
  118. // 查询关系总览
  119. export function relationshipOverview(postParams: any): any {
  120. return httputils.postJson(`${baseApi}/rel/graphic/overview`, postParams)
  121. }
  122. // 查询关系数量
  123. export function relationshipCount(postParams: any): any {
  124. return httputils.postJson(`${baseApi}/rel/graphic/query/count`, postParams)
  125. }
  126. // 查看关系相关的数据类型
  127. export function relToType(getParams: any) {
  128. return httputils.getJson(`${baseApi}/rel/graphic/relToType`, getParams)
  129. }
  130. // 查询关系数据
  131. export function relManualQuery(postParams: any) {
  132. return httputils.postJson(`${baseApi}/rel/manual/query`, postParams)
  133. }
  134. // 添加关系数据
  135. export function relAdd(postParams: any) {
  136. return httputils.postJson(`${baseApi}/rel/manual/add`, postParams)
  137. }
  138. // 删除关系数据
  139. export function relDel(postParams: any) {
  140. return httputils.postJson(`${baseApi}/rel/manual/del`, postParams)
  141. }
  142. // 关系计算
  143. export function relationCalc(postParams: any) {
  144. const url = `${baseApi}/relation-calc${postParams.requestUrl}?objectTypes=${postParams.objectTypes}&graphCode=${postParams.graphCode}&relType=${postParams.relType}`
  145. return httputils.postJson(url, {})
  146. }
  147. // 更新计算时间
  148. export function updateCalcTime(getParams: any) {
  149. const url = `${baseApi}/rel/graphic/updateCalcTime?graphCode=${getParams.graphCode}&relType=${getParams.relType}&computingTime=${getParams.computingTime}`
  150. return httputils.getJson(url, {})
  151. }
  152. // execl上传
  153. export function importGrahpic(postParams: any) {
  154. return httputils.postJson(`${baseApi}/rel/graphic/import`, postParams)
  155. }
  156. // 导出Execl
  157. export function exportGraphic(getParams: any) {
  158. const url = `${baseApi}/rel/graphic/export`
  159. return httputils.getJson(url, getParams)
  160. }