index.uts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /**
  2. * 工分接口
  3. */
  4. import { request } from '@/utils/request'
  5. /**
  6. * 查询工单工分列表
  7. */
  8. export const listOrderScores = (query: UTSJSONObject | null): Promise<any> => {
  9. return request({
  10. url: '/gxt/orderScore/list',
  11. method: 'GET',
  12. data: query
  13. })
  14. }
  15. /**
  16. * 查询工单工分统计信息
  17. */
  18. export const getOrderScoreStatistics = (query: UTSJSONObject | null): Promise<any> => {
  19. return request({
  20. url: '/gxt/orderScore/statistics',
  21. method: 'GET',
  22. data: query
  23. })
  24. }
  25. /**
  26. * 查询工单详情(包含工分信息)
  27. * @param orderType 工单类型
  28. * @param orderId 工单ID
  29. */
  30. export const getOrderScoreDetail = (orderType: string, orderId: string): Promise<any> => {
  31. return request({
  32. url: '/gxt/orderScore/' + orderType + '/' + orderId,
  33. method: 'GET'
  34. })
  35. }
  36. /**
  37. * 查询移动端工单工分列表(支持关键词搜索)
  38. */
  39. export const listMobileOrderScores = (query: UTSJSONObject | null): Promise<any> => {
  40. return request({
  41. url: '/gxt/orderScore/mobile/list',
  42. method: 'GET',
  43. data: query
  44. })
  45. }
  46. /*
  47. * 获取待评分工单列表
  48. * @param page 页码
  49. * @param rows 每页数量
  50. */
  51. export const listMyRate = (query: UTSJSONObject | null): Promise<any> => {
  52. let url = '/mobile/order/listMyRate'
  53. return request({
  54. url: url,
  55. method: 'GET',
  56. data: query
  57. })
  58. }
  59. /**
  60. * 提交工单自评
  61. */
  62. export const submitSelfEvaluation = (data: UTSJSONObject): Promise<any> => {
  63. return request({
  64. url: '/gxt/orderScore/selfEvaluation',
  65. method: 'PUT',
  66. data: data
  67. })
  68. }
  69. /**
  70. * 提交工单复评
  71. */
  72. export const submitReEvaluation = (data: UTSJSONObject): Promise<any> => {
  73. return request({
  74. url: '/gxt/orderScore/review',
  75. method: 'PUT',
  76. data: data
  77. })
  78. }
  79. /**
  80. * 获取检修类型选项
  81. */
  82. export const getMaintenanceTypes = (): Promise<any> => {
  83. return request({
  84. url: '/gxt/scoreproject/list',
  85. method: 'GET'
  86. })
  87. }
  88. /**
  89. * 根据风机型号获取维保类型选项
  90. */
  91. export const listInspectionTypesByFanType = (fanType: string): Promise<any> => {
  92. return request({
  93. url: '/gxt/fanInspectionScore/inspectionTypes/' + fanType,
  94. method: 'GET'
  95. })
  96. }