index.ts 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. }