index.ts 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. import request from '@/config/axios'
  2. let globalController = new AbortController()
  3. export const cancelAllRequests = async () => {
  4. globalController.abort()
  5. globalController = new AbortController()
  6. }
  7. // 设备台账 API
  8. export const IotStatApi = {
  9. getCompleteRate: async (params) => {
  10. return await request.get({ url: `/pms/iot-rh-daily-report/completeRate`, params })
  11. },
  12. getMainDay: async () => {
  13. return await request.get({ url: `/rq/stat/main/day` })
  14. },
  15. getOrderSeven: async (params: any) => {
  16. return await request.get({ url: `/rq/stat/rh/order/` + params })
  17. },
  18. getRepairRigWork: async (params: any) => {
  19. return await request.get({ url: `/rq/stat/ry/dailyReport/` + params })
  20. },
  21. getOrderYwcb: async (params: any) => {
  22. return await request.get({ url: `/rq/stat/rh/ywcb/` + params })
  23. },
  24. getRigFinished: async () => {
  25. return await request.get({ url: `/rq/stat/ry/dailyReport/rigFinished` })
  26. },
  27. getMainWeek: async () => {
  28. return await request.get({ url: `/rq/stat/main/week` })
  29. },
  30. getMainMonth: async () => {
  31. return await request.get({ url: `/rq/stat/main/month` })
  32. },
  33. getMainTotal: async () => {
  34. return await request.get({ url: `/rq/stat/main/total` })
  35. },
  36. getMainStatus: async () => {
  37. return await request.get({ url: `/rq/stat/main/status` })
  38. },
  39. getInspectDay: async () => {
  40. return await request.get({ url: `/rq/stat/inspect/day` })
  41. },
  42. getInspectWeek: async () => {
  43. return await request.get({ url: `/rq/stat/inspect/week` })
  44. },
  45. getInspectMonth: async () => {
  46. return await request.get({ url: `/rq/stat/inspect/month` })
  47. },
  48. getInspectTotal: async () => {
  49. return await request.get({ url: `/rq/stat/inspect/total` })
  50. },
  51. getInspectStatus: async (params: any) => {
  52. return await request.get({ url: `/rq/stat/inspect/status`, params })
  53. },
  54. getInspectStatuss: async (params: any, dept: any) => {
  55. return await request.get({ url: `/rq/stat/inspect/statuss/` + dept, params })
  56. },
  57. getInspectZjxjCount: async () => {
  58. return await request.get({ url: `/rq/stat/home/ry/count/zjxj` })
  59. },
  60. getProject: async (params: any) => {
  61. return await request.get({ url: `/rq/stat/project/` + params })
  62. },
  63. getInspectTodayStatus: async () => {
  64. return await request.get({ url: `/rq/stat/inspect/today/status` })
  65. },
  66. getInspectDeviceStatus: async (params: any) => {
  67. return await request.get({ url: `/rq/stat/inspect/device`, params })
  68. },
  69. getInspectItemStatus: async (params: any) => {
  70. return await request.get({ url: `/rq/iot-inspect-order-detail/status`, params })
  71. },
  72. getMaintenanceDay: async () => {
  73. return await request.get({ url: `/rq/stat/maintenance/day` })
  74. },
  75. getMaintenanceWeek: async () => {
  76. return await request.get({ url: `/rq/stat/maintenance/week` })
  77. },
  78. getMaintenanceMonth: async () => {
  79. return await request.get({ url: `/rq/stat/maintenance/month` })
  80. },
  81. getMaintenanceTotal: async () => {
  82. return await request.get({ url: `/rq/stat/maintenance/total` })
  83. },
  84. getMaintenanceStatus: async (params: any) => {
  85. return await request.get({ url: `/rq/stat/maintenance/status/` + params })
  86. },
  87. getRhZql: async (params: any) => {
  88. return await request.get({ url: `/rq/stat/year/total/gas/` + params })
  89. },
  90. getRhZqlGases: async (params: any) => {
  91. return await request.get({ url: `/rq/stat/year/total/gases/` + params })
  92. },
  93. getRhZqlToday: async (params: any) => {
  94. return await request.get({ url: `/rq/stat/rh/zql/today/` + params })
  95. },
  96. getRhZqlDaily: async (params: any) => {
  97. return await request.get({ url: `/rq/stat/rh/zql/daily/` + params })
  98. },
  99. getMaintenanceTodayStatus: async () => {
  100. return await request.get({ url: `/rq/stat/maintenance/today/status` })
  101. },
  102. getMaintenanceType: async () => {
  103. return await request.get({ url: `/rq/stat/maintenance/type` })
  104. },
  105. getDeviceInfoChart: async (deviceCode: any, identifier: any, begin: string, end: string) => {
  106. return await request.get({
  107. url:
  108. `/rq/stat/td/chart/` +
  109. deviceCode +
  110. '/' +
  111. identifier +
  112. '?beginTime=' +
  113. begin +
  114. '&endTime=' +
  115. end,
  116. signal: globalController.signal
  117. })
  118. },
  119. getDeviceCount: async (params: any) => {
  120. return await request.get({ url: `/rq/stat/home/device/count/` + params })
  121. },
  122. getAbnormalDevice: async (params: any) => {
  123. return await request.get({ url: `/rq/stat/inspect/exception/device` + params })
  124. },
  125. getOutliers: async (params: any) => {
  126. return await request.get({ url: `/rq/iot-inspect-order-detail/report/status` + params })
  127. },
  128. getRhRate: async (params: any) => {
  129. return await request.get({ url: `/rq/stat/rh/device/utilizationRate`, params })
  130. },
  131. getRyRate: async (params: any) => {
  132. return await request.get({ url: `/rq/stat/ry/device/utilizationRate`, params })
  133. },
  134. getRdRate: async (params: any) => {
  135. return await request.get({ url: `/rq/stat/rd/device/utilizationRate`, params })
  136. },
  137. getRhTeamRate: async (params: any) => {
  138. return await request.get({ url: `rq/stat/rh/device/teamUtilizationRate`, params })
  139. },
  140. getRyTeamRate: async (params: any) => {
  141. return await request.get({ url: `rq/stat/ry/device/teamUtilizationRate`, params })
  142. },
  143. getRdTeamRate: async (params: any) => {
  144. return await request.get({ url: `rq/stat/rd/device/teamUtilizationRate`, params })
  145. },
  146. getMaintainCount: async (params: any) => {
  147. return await request.get({ url: `/rq/stat/home/maintain/count/` + params })
  148. },
  149. getMainWorkCount: async () => {
  150. return await request.get({ url: `/rq/stat/home/work/count` })
  151. },
  152. getInspectCount: async () => {
  153. return await request.get({ url: `/rq/stat/home/inspect/count` })
  154. },
  155. getDeviceStatusCount: async (params: any) => {
  156. return await request.get({ url: `/rq/stat/home/device/status/` + params })
  157. },
  158. getDeviceTypeCount: async (params: any) => {
  159. return await request.get({ url: `/rq/stat/home/device/type/` + params })
  160. },
  161. getDeptCount: async () => {
  162. return await request.get({ url: `/rq/stat/home/dept` })
  163. },
  164. getSafeCount: async () => {
  165. return await request.get({ url: `/rq/stat/home/safe` })
  166. },
  167. getMttr: async () => {
  168. return await request.get({ url: `/rq/stat/mttr` })
  169. },
  170. getMaterial: async () => {
  171. return await request.get({ url: `/pms/iot-outbound/materials/top` })
  172. },
  173. getDeptStatistics: async (params: any) => {
  174. return await request.get({ url: `/rq/iot-opeation-fill/getCount`, params })
  175. },
  176. getDevSta: async (params: any) => {
  177. return await request.get({ url: `/rq/iot-opeation-fill/getDeviceCount`, params })
  178. },
  179. getRdWorkload: async (params: any) => {
  180. return await request.get({ url: `/pms/iot-rd-daily-report/summaryStatistics`, params })
  181. },
  182. getRdWorkloadYear: async (params: any) => {
  183. return await request.get({ url: `/pms/iot-rd-daily-report/workloadKanban`, params })
  184. },
  185. getUtilization: async (params: any) => {
  186. return await request.get({ url: `/rq/stat/rd/device/utilizationRates`, params })
  187. },
  188. getWhl: async () => {
  189. return await request.get({ url: `/rq/report/rd/whl` })
  190. }
  191. }