index.ts 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  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. getRyHiZjDailyReports: async () => {
  22. return await request.get({ url: `/rq/stat/ry/hiZjDailyReports` })
  23. },
  24. getRyHiXjDailyReports: async () => {
  25. return await request.get({ url: `/rq/stat/ry/hiXjDailyReports` })
  26. },
  27. getOrderYwcb: async (params: any) => {
  28. return await request.get({ url: `/rq/stat/rh/ywcb/` + params })
  29. },
  30. getRigFinished: async () => {
  31. return await request.get({ url: `/rq/stat/ry/dailyReport/rigFinished` })
  32. },
  33. getMainWeek: async () => {
  34. return await request.get({ url: `/rq/stat/main/week` })
  35. },
  36. getMainMonth: async () => {
  37. return await request.get({ url: `/rq/stat/main/month` })
  38. },
  39. getMainTotal: async () => {
  40. return await request.get({ url: `/rq/stat/main/total` })
  41. },
  42. getMainStatus: async () => {
  43. return await request.get({ url: `/rq/stat/main/status` })
  44. },
  45. getInspectDay: async () => {
  46. return await request.get({ url: `/rq/stat/inspect/day` })
  47. },
  48. getInspectWeek: async () => {
  49. return await request.get({ url: `/rq/stat/inspect/week` })
  50. },
  51. getInspectMonth: async () => {
  52. return await request.get({ url: `/rq/stat/inspect/month` })
  53. },
  54. getInspectTotal: async () => {
  55. return await request.get({ url: `/rq/stat/inspect/total` })
  56. },
  57. getInspectStatus: async (params: any) => {
  58. return await request.get({ url: `/rq/stat/inspect/status`, params })
  59. },
  60. getInspectStatuss: async (params: any, dept: any) => {
  61. return await request.get({ url: `/rq/stat/inspect/statuss/` + dept, params })
  62. },
  63. getInspectZjxjCount: async (params?: any) => {
  64. return await request.get({ url: `/rq/stat/home/ry/count/zjxj`, params })
  65. },
  66. getInspectLayerWellCount: async (params?: any) => {
  67. return await request.get({ url: `/rq/stat/rd/device/workloadStatistics`, params })
  68. },
  69. getInspectRate: async (params: any) => {
  70. return await request.get({ url: `/rq/stat/ry/device/totalUtilizationRate`, params })
  71. },
  72. getProject: async (params: any) => {
  73. return await request.get({ url: `/rq/stat/project/` + params })
  74. },
  75. getInspectTodayStatus: async () => {
  76. return await request.get({ url: `/rq/stat/inspect/today/status` })
  77. },
  78. getInspectDeviceStatus: async (params: any) => {
  79. return await request.get({ url: `/rq/stat/inspect/device`, params })
  80. },
  81. getInspectItemStatus: async (params: any) => {
  82. return await request.get({ url: `/rq/iot-inspect-order-detail/status`, params })
  83. },
  84. getMaintenanceDay: async () => {
  85. return await request.get({ url: `/rq/stat/maintenance/day` })
  86. },
  87. getMaintenanceWeek: async () => {
  88. return await request.get({ url: `/rq/stat/maintenance/week` })
  89. },
  90. getMaintenanceMonth: async () => {
  91. return await request.get({ url: `/rq/stat/maintenance/month` })
  92. },
  93. getMaintenanceTotal: async () => {
  94. return await request.get({ url: `/rq/stat/maintenance/total` })
  95. },
  96. getMaintenanceStatus: async (params?: any) => {
  97. return await request.get({ url: `/rq/stat/maintenance/status/` + params })
  98. },
  99. getRhZql: async (params: any) => {
  100. return await request.get({ url: `/rq/stat/year/total/gas/` + params })
  101. },
  102. getRhZqlTotal: async (params: any) => {
  103. return await request.get({ url: `/rq/stat/rh/zql`, params })
  104. },
  105. getRhZqlGases: async (params: any) => {
  106. return await request.get({ url: `/rq/stat/year/total/gases/` + params })
  107. },
  108. getRhZqlToday: async (params: any) => {
  109. return await request.get({ url: `/rq/stat/rh/zql/today/` + params })
  110. },
  111. getRhZqlDaily: async (params: any) => {
  112. return await request.get({ url: `/rq/stat/rh/zql/daily/` + params })
  113. },
  114. getMaintenanceTodayStatus: async () => {
  115. return await request.get({ url: `/rq/stat/maintenance/today/status` })
  116. },
  117. getMaintenanceType: async () => {
  118. return await request.get({ url: `/rq/stat/maintenance/type` })
  119. },
  120. getDeviceInfoChart: async (deviceCode: any, identifier: any, begin: string, end: string) => {
  121. return await request.get({
  122. url:
  123. `/rq/stat/td/chart/` +
  124. deviceCode +
  125. '/' +
  126. identifier +
  127. '?beginTime=' +
  128. begin +
  129. '&endTime=' +
  130. end,
  131. signal: globalController.signal
  132. })
  133. },
  134. getDeviceInfoChartly: async (deviceCode: any, identifier: any, begin: string, end: string) => {
  135. return await request.get({
  136. url:
  137. `/rq/stat/td/chart/ly/` +
  138. deviceCode +
  139. '/' +
  140. identifier +
  141. '?beginTime=' +
  142. begin +
  143. '&endTime=' +
  144. end,
  145. signal: globalController.signal
  146. })
  147. },
  148. getDeviceCount: async (params?: any) => {
  149. return await request.get({ url: `/rq/stat/home/device/count/` + params })
  150. },
  151. getAbnormalDevice: async (params: any) => {
  152. return await request.get({ url: `/rq/stat/inspect/exception/device` + params })
  153. },
  154. getOutliers: async (params: any) => {
  155. return await request.get({ url: `/rq/iot-inspect-order-detail/report/status` + params })
  156. },
  157. getRhRate: async (params: any) => {
  158. return await request.get({ url: `/rq/stat/rh/device/utilizationRate`, params })
  159. },
  160. getRhTotalUtilizationRate: async (params: any) => {
  161. return await request.get({ url: `/rq/stat/rh/device/totalUtilizationRate`, params })
  162. },
  163. getRhSevenDayUtilization: async () => {
  164. return await request.get({ url: `/rq/stat/rh/device/sevenDayUtilization` })
  165. },
  166. getRdSevenDayUtilization: async () => {
  167. return await request.get({ url: `/rq/stat/rd/device/sevenDayUtilization` })
  168. },
  169. getRyRate: async (params: any) => {
  170. return await request.get({ url: `/rq/stat/ry/device/utilizationRate`, params })
  171. },
  172. getRdRate: async (params: any) => {
  173. return await request.get({ url: `/rq/stat/rd/device/utilizationRate`, params })
  174. },
  175. getRhTeamRate: async (params: any) => {
  176. return await request.get({ url: `rq/stat/rh/device/teamUtilizationRate`, params })
  177. },
  178. getRyTeamRate: async (params: any) => {
  179. return await request.get({ url: `rq/stat/ry/device/teamUtilizationRate`, params })
  180. },
  181. getRyProductionBriefs: async (params: any) => {
  182. return await request.get({ url: `/pms/iot-ry-daily-report/productionBriefs`, params })
  183. },
  184. getRyNptCount: async (params: any) => {
  185. return await request.get({ url: `/rq/stat/ry/device/nptCount`, params })
  186. },
  187. getRdNptCount: async (params: any) => {
  188. return await request.get({ url: `/rq/stat/rd/device/productionAbnormality`, params })
  189. },
  190. getRdTeamRate: async (params: any) => {
  191. return await request.get({ url: `rq/stat/rd/device/teamUtilizationRate`, params })
  192. },
  193. getMaintainCount: async (params?: any) => {
  194. return await request.get({ url: `/rq/stat/home/maintain/count/` + params })
  195. },
  196. getMainWorkCount: async () => {
  197. return await request.get({ url: `/rq/stat/home/work/count` })
  198. },
  199. getInspectCount: async () => {
  200. return await request.get({ url: `/rq/stat/home/inspect/count` })
  201. },
  202. getDeviceStatusCount: async (params?: any) => {
  203. return await request.get({ url: `/rq/stat/home/device/status/` + params })
  204. },
  205. getDeviceTypeCount: async (params?: any) => {
  206. return await request.get({ url: `/rq/stat/home/device/type/` + params })
  207. },
  208. getDeptCount: async () => {
  209. return await request.get({ url: `/rq/stat/home/dept` })
  210. },
  211. getSafeCount: async () => {
  212. return await request.get({ url: `/rq/stat/home/safe` })
  213. },
  214. getSafeCount1: async (deptId: number) => {
  215. return await request.get({ url: `/rq/qhse-safe-day/get/dept/` + deptId, params: { deptId } })
  216. },
  217. getMttr: async () => {
  218. return await request.get({ url: `/rq/stat/mttr` })
  219. },
  220. getMaterial: async () => {
  221. return await request.get({ url: `/pms/iot-outbound/materials/top` })
  222. },
  223. getDeptStatistics: async (params: any) => {
  224. return await request.get({ url: `/rq/iot-opeation-fill/getCount`, params })
  225. },
  226. getDevSta: async (params: any) => {
  227. return await request.get({ url: `/rq/iot-opeation-fill/getDeviceCount`, params })
  228. },
  229. getRdWorkload: async (params: any) => {
  230. return await request.get({ url: `/pms/iot-rd-daily-report/summaryStatistics`, params })
  231. },
  232. getRdWorkloadYear: async (params: any) => {
  233. return await request.get({ url: `/pms/iot-rd-daily-report/workloadKanban`, params })
  234. },
  235. getUtilization: async (params: any) => {
  236. return await request.get({ url: `/rq/stat/rd/device/utilizationRates`, params })
  237. },
  238. getWhl: async () => {
  239. return await request.get({ url: `/rq/report/rd/whl` })
  240. },
  241. getDeviceException: async (params: any) => {
  242. return await request.get({ url: `/rq/stat/inspect/exception/device`, params })
  243. },
  244. getStatusException: async (params: any) => {
  245. return await request.get({ url: `/rq/iot-inspect-order-detail/report/status`, params })
  246. },
  247. getProductionException: async (params: any) => {
  248. return await request.get({ url: `/pms/iot-rd-daily-report/abnormalAlert`, params })
  249. },
  250. getConstructionBriefing: async () => {
  251. return await request.get({ url: `/pms/iot-rd-daily-report/constructionBriefing` })
  252. },
  253. getRdRecentWbcs: async () => {
  254. return await request.get({ url: `/rq/stat/recent/wbcs/rd` })
  255. },
  256. // 瑞都看板(新)
  257. // 获取ssoToken
  258. getSsoToken: async () => {
  259. return await request.get({ url: `/rq/iot-fine-report/createSsoToken` })
  260. }
  261. }