fault.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import {
  2. request
  3. } from '@/utils/request'
  4. // 获取故障上报统计
  5. export function getFaultCount(params) {
  6. return request({
  7. url: '/rq/stat/main/total',
  8. method: 'get',
  9. params
  10. })
  11. }
  12. // 故障上报列表
  13. export function getFaultList(params) {
  14. return request({
  15. url: '/rq/iot-failure-report/page/app',
  16. method: 'get',
  17. params
  18. })
  19. }
  20. // 故障上报
  21. export function createFault(data) {
  22. return request({
  23. url: '/rq/iot-failure-report/create',
  24. method: 'post',
  25. data: data
  26. })
  27. }
  28. // 故障上报详情
  29. export function getFaultDetail(params) {
  30. return request({
  31. url: '/rq/iot-failure-report/get',
  32. method: 'get',
  33. params
  34. })
  35. }
  36. // 故障上报修改
  37. export function updateFault(data) {
  38. return request({
  39. url: '/rq/iot-failure-report/update',
  40. method: 'put',
  41. data: data
  42. })
  43. }
  44. // 故障上报删除
  45. export function deleteFault(params) {
  46. return request({
  47. url: '/rq/iot-failure-report/delete',
  48. method: 'delete',
  49. params
  50. })
  51. }
  52. /**
  53. * 更新故障上报流程信息
  54. * @param id 故障id
  55. * @param type 维修类型
  56. * @param assigneeUserId 负责人
  57. */
  58. export const updateFaultProcess = (id, type, assigneeUserId) =>
  59. request({
  60. url: '/rq/iot-failure-report/process-info',
  61. method: 'PUT',
  62. params: { id, type, assigneeUserId }
  63. })
  64. /**
  65. * 故障上报审批人列表
  66. */
  67. export const getFailureApprovalList = () =>
  68. request({
  69. url: '/rq/iot-failure-report/get/approval',
  70. method: 'GET',
  71. })