statistic.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. import { request } from "@/utils/request";
  2. import { getDeptId } from "@/utils/auth";
  3. // <editor-fold desc="首页统计">
  4. /**
  5. * 获取设备数
  6. */
  7. export const getDeviceCount = () =>
  8. request({
  9. url: '/rq/stat/home/device/count/undefined',
  10. method: 'GET',
  11. })
  12. /**
  13. * 获取维修工单数
  14. */
  15. export const getMaintainCount = () =>
  16. request({
  17. url: '/rq/stat/home/maintain/count/undefined',
  18. method: 'GET',
  19. })
  20. /**
  21. * 获取运行记录未/填报数
  22. */
  23. export const getPendingCount = (params) =>
  24. request({
  25. url: '/rq/iot-opeation-fill/getCount',
  26. method: 'GET',
  27. params,
  28. })
  29. /**
  30. * 获取保养工单数
  31. */
  32. export const getMaintenanceCount = () =>
  33. request({
  34. url: '/rq/stat/maintenance/status/undefined',
  35. method: 'GET',
  36. })
  37. /**
  38. * 获取巡检工单数
  39. */
  40. export const getInspectCount = (params) =>
  41. request({
  42. url: '/rq/stat/inspect/statuss/'+getDeptId(), // deptId
  43. method: 'GET',
  44. params,
  45. })
  46. /**
  47. * 获取MTTR 平均解决时间
  48. */
  49. export const getMTTR = () =>
  50. request({
  51. url: '/rq/stat/mttr',
  52. method: 'GET',
  53. })
  54. /**
  55. * 获取库存预警物料数量
  56. */
  57. export const getStockWarningCount = () =>
  58. request({
  59. url: '/rq/stat/home/safe',
  60. method: 'GET',
  61. })
  62. /**
  63. * 获取设备状态统计
  64. */
  65. export const getDeviceStatusStatistic = () =>
  66. request({
  67. url: '/rq/stat/home/device/status/undefined',
  68. method: 'GET',
  69. })
  70. /**
  71. * 获取设备类别TOP5
  72. */
  73. export const getDeviceTypeCount = () =>
  74. request({
  75. url: '/rq/stat/home/device/type/yf',
  76. method: 'GET',
  77. })
  78. /**
  79. * 获取近一周用户活跃度
  80. */
  81. export const getWeeklyUserActivity = () =>
  82. request({
  83. url: '/rq/stat/home/dept',
  84. method: 'GET',
  85. })
  86. /**
  87. * 获取工单数量统计
  88. */
  89. export const getWorkOrderCount = () =>
  90. request({
  91. url: '/rq/stat/rh/order/'+getDeptId(), // deptId
  92. method: 'GET',
  93. })
  94. // </editor-fold>
  95. // <editor-folder desc="维修统计">
  96. /**
  97. * 获取当天维修统计
  98. */
  99. export const getTodayRepairStatistic = () =>
  100. request({
  101. url: '/rq/stat/main/day',
  102. method: 'GET',
  103. })
  104. /**
  105. * 获取近一周维修统计
  106. */
  107. export const getWeeklyRepairStatistic = () =>
  108. request({
  109. url: '/rq/stat/main/week',
  110. method: 'GET',
  111. })
  112. /**
  113. * 获取近一月维修统计
  114. */
  115. export const getMonthlyRepairStatistic = () =>
  116. request({
  117. url: '/rq/stat/main/month',
  118. method: 'GET',
  119. })
  120. /**
  121. * 获取总维修统计
  122. */
  123. export const getTotalRepairStatistic = () =>
  124. request({
  125. url: '/rq/stat/main/total',
  126. method: 'GET',
  127. })
  128. /**
  129. * 获取维修数据统计
  130. */
  131. export const getOtherRepairStatistic = () =>
  132. request({
  133. url: '/rq/stat/main/status',
  134. method: 'GET',
  135. })
  136. // </editor-folder>
  137. // <editor-folder desc="保养统计">
  138. /**
  139. * 获取昨日保养统计
  140. */
  141. export const getYesterdayMaintenanceStatistic = () =>
  142. request({
  143. url: '/rq/stat/maintenance/day',
  144. method: 'GET',
  145. })
  146. /**
  147. * 获取近一周保养统计
  148. */
  149. export const getWeeklyMaintenanceStatistic = () =>
  150. request({
  151. url: '/rq/stat/maintenance/week',
  152. method: 'GET',
  153. })
  154. /**
  155. * 获取近一月保养统计
  156. */
  157. export const getMonthlyMaintenanceStatistic = () =>
  158. request({
  159. url: '/rq/stat/maintenance/month',
  160. method: 'GET',
  161. })
  162. /**
  163. * 获取总保养统计
  164. */
  165. export const getTotalMaintenanceStatistic = () =>
  166. request({
  167. url: '/rq/stat/maintenance/total',
  168. method: 'GET',
  169. })
  170. /**
  171. * 获取保养工单状态数据统计
  172. */
  173. export const getMaintenanceStatusStatistic = () =>
  174. request({
  175. url: '/rq/stat/maintenance/status/undefined',
  176. method: 'GET',
  177. })
  178. /**
  179. * 获取今日保养工单状态数据统计
  180. */
  181. export const getMaintenanceTodayStatusStatistic = () =>
  182. request({
  183. url: '/rq/stat/maintenance/today/status',
  184. method: 'GET',
  185. })
  186. /**
  187. * 获取保养工单类型数据统计
  188. */
  189. export const getMaintenanceTypeStatistic = () =>
  190. request({
  191. url: '/rq/stat/maintenance/type',
  192. method: 'GET',
  193. })
  194. // </editor-folder>
  195. // <editor-folder desc="巡检统计">
  196. /**
  197. * 获取昨日巡检统计
  198. */
  199. export const getYesterdayInspectionStatistic = () =>
  200. request({
  201. url: '/rq/stat/inspect/day',
  202. method: 'GET',
  203. })
  204. /**
  205. * 获取近一周巡检统计
  206. */
  207. export const getWeeklyInspectionStatistic = () =>
  208. request({
  209. url: '/rq/stat/inspect/week',
  210. method: 'GET',
  211. })
  212. /**
  213. * 获取近一月巡检统计
  214. */
  215. export const getMonthlyInspectionStatistic = () =>
  216. request({
  217. url: '/rq/stat/inspect/month',
  218. method: 'GET',
  219. })
  220. /**
  221. * 获取总巡检统计
  222. */
  223. export const getTotalInspectionStatistic = () =>
  224. request({
  225. url: '/rq/stat/inspect/total',
  226. method: 'GET',
  227. })
  228. /**
  229. * 获取巡检工单状态数据统计
  230. */
  231. export const getInspectionStatusStatistic = () =>
  232. request({
  233. url: '/rq/stat/inspect/status',
  234. method: 'GET',
  235. })
  236. /**
  237. * 获取今日巡检工单状态数据统计
  238. */
  239. export const getInspectionTodayStatusStatistic = () =>
  240. request({
  241. url: '/rq/stat/inspect/today/status',
  242. method: 'GET',
  243. })
  244. // </editor-folder>