index.ts 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. import request from '@/config/axios'
  2. // 巡检工单 VO
  3. export interface IotInspectOrderVO {
  4. id: number // 主键id
  5. inspectOrderTitle: string // 巡检工单名
  6. inspectOrderCode: string // 巡检工单编码
  7. status: string // 巡检工单状态
  8. remark: string // 备注
  9. deptId: number // 部门id
  10. deviceIds: string // 设备id
  11. details: []
  12. }
  13. // 巡检工单 API
  14. export const IotInspectOrderApi = {
  15. // 查询巡检工单分页
  16. getIotInspectOrderPage: async (params: any) => {
  17. return await request.get({ url: `/rq/iot-inspect-order/page`, params })
  18. },
  19. getIotInspectDeviceStatusPage: async (params: any) => {
  20. return await request.get({ url: `/rq/iot-inspect-order/device`, params })
  21. },
  22. getDeviceIotInspectOrderPage: async (params: any) => {
  23. return await request.get({ url: `/rq/iot-inspect-order/device/page`, params })
  24. },
  25. // 查询巡检工单详情
  26. getIotInspectOrder: async (id: number): Promise<IotInspectOrderVO> => {
  27. return await request.get({ url: `/rq/iot-inspect-order/get?id=` + id })
  28. },
  29. orderReason: async (params: {}): Promise<any> => {
  30. return await request.post({ url: `/rq/iot-inspect-order/ignore`, params })
  31. },
  32. getIotInspectOrderDetail: async (id: number) => {
  33. return await request.get({ url: `/rq/iot-inspect-order/get/details?id=` + id })
  34. },
  35. // 新增巡检工单
  36. createIotInspectOrder: async (data: IotInspectOrderVO) => {
  37. return await request.post({ url: `/rq/iot-inspect-order/create`, data })
  38. },
  39. // 修改巡检工单
  40. updateIotInspectOrder: async (data: IotInspectOrderVO) => {
  41. return await request.put({ url: `/rq/iot-inspect-order/update`, data })
  42. },
  43. // 删除巡检工单
  44. deleteIotInspectOrder: async (id: number) => {
  45. return await request.delete({ url: `/rq/iot-inspect-order/delete?id=` + id })
  46. },
  47. // 导出巡检工单 Excel
  48. exportIotInspectOrder: async (params) => {
  49. return await request.download({ url: `/rq/iot-inspect-order/export-excel`, params })
  50. },
  51. //填写巡检工单
  52. writeIotInspectOrder: async (data: any, orderId) => {
  53. return await request.post({ url: `/rq/iot-inspect-order/write/` + orderId, data })
  54. },
  55. // 报表统计相关接口
  56. // 巡检工单列表
  57. getIotInspectOrderList: async (params: any) => {
  58. return await request.get({ url: `/rq/iot-inspect-order/report/stat`, params })
  59. },
  60. // 异常设备数量
  61. getIotInspectOrderExceptionDeviceCount: async (params: any) => {
  62. return await request.get({ url: `/rq/stat/inspect/exception/device`, params })
  63. },
  64. // 巡检异常点数量
  65. getIotInspectOrderExceptionPointCount: async (params: any) => {
  66. return await request.get({ url: `/rq/iot-inspect-order-detail/report/status`, params })
  67. },
  68. // 设备状态接口
  69. getInspectItemStatus: async (params: any) => {
  70. return await request.get({ url: `/rq/stat/report/inspect/status`, params })
  71. },
  72. // 故障上报
  73. // 状态接口
  74. getFaultReportStatus: async (params: any) => {
  75. return await request.get({ url: `/rq/report/failure/status`, params })
  76. },
  77. // 列表接口
  78. getFaultReportList: async (params: any) => {
  79. return await request.get({ url: `/rq/report/failure/page`, params })
  80. },
  81. // 异常设备列表
  82. getExceptionDeviceList: async (params: any) => {
  83. return await request.get({ url: `/rq/iot-inspect-order/exception/device`, params })
  84. },
  85. // 导出巡检报表 Excel
  86. exportInspectReport: async (params) => {
  87. return await request.download({ url: `/rq/iot-inspect-order/report/export-excel`, params })
  88. },
  89. // 异常巡检点导出 Excel
  90. exportExceptionPointInspectReport: async (params) => {
  91. return await request.download({
  92. url: `/rq/iot-inspect-order/report/exception/item/export-excel`,
  93. params
  94. })
  95. },
  96. // 异常设备导出 Excel
  97. exportExceptionDeviceInspectReport: async (params) => {
  98. return await request.download({
  99. url: `/rq/iot-inspect-order/report/exception/device/export-excel`,
  100. params
  101. })
  102. },
  103. // 故障报表导出 Excel
  104. exportFaultReport: async (params) => {
  105. return await request.download({ url: `/rq/report/failure/report/export-excel`, params })
  106. }
  107. }