coopCustomService.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. import request from '@/utils/request'
  2. import {
  3. myRequest
  4. } from '@/api/my-api.js'
  5. import qs from 'qs'
  6. export const getCoopCustomServices = (params) => {
  7. return new request({
  8. url: './project/coopCustomServices/',
  9. method: 'get',
  10. params: params
  11. });
  12. }
  13. export const get = (id) => {
  14. return new request({
  15. url: './project/coopCustomServices/' + id,
  16. method: 'get',
  17. });
  18. }
  19. export function saveOrUpdate(coopCustomService, attachmentIds, statements, dataSource, token) {
  20. return new request({
  21. url: './project/coopCustomServices',
  22. method: (coopCustomService.id ? 'put' : 'post'),
  23. headers: {
  24. token
  25. },
  26. data: {
  27. coopCustomService,
  28. attachmentIds,
  29. statements,
  30. dataSource,
  31. }
  32. });
  33. }
  34. // 新增积分
  35. export function addPointDetailByTaskDict({
  36. taskDict,
  37. // userId,
  38. point
  39. }, token) {
  40. let data = {}
  41. data['token'] = token
  42. data['taskDict'] = taskDict
  43. data['point'] = point
  44. return myRequest({
  45. url: '/uc/umsUserPointDetailss/addPointDetailByTaskDict',
  46. method: 'post',
  47. data: data,
  48. })
  49. }
  50. // 新增成长值
  51. export function completeGrowthValue({
  52. taskDict,
  53. // userId
  54. }, token) {
  55. let data = {}
  56. data['token'] = token
  57. data['taskDict'] = taskDict
  58. return myRequest({
  59. url: '/uc/umsUserGrowthDetailss/addGrowthDetailByTaskDict',
  60. method: 'post',
  61. data: data,
  62. })
  63. }
  64. export function del(id) {
  65. return new request({
  66. url: './project/coopCustomServices/' + id,
  67. method: 'delete',
  68. });
  69. }
  70. export const getByUnitId = (unitId) => {
  71. return new request({
  72. url: './project/coopCustomServices/getCoopCustomByUnitId/' + unitId,
  73. method: 'get',
  74. });
  75. }
  76. export function downloadCoopCustom(params) {
  77. return new request({
  78. url: './project/coopCustomServices/batchDownloadCoopCustom',
  79. method: 'get',
  80. params: params,
  81. responseType: 'blob',
  82. });
  83. }
  84. export const getCustomServiceNameMapByIds = (id) => {
  85. return new request({
  86. url: './project/coopCustomServices/getCustomServiceNameMapByIds/' + id,
  87. method: 'get',
  88. });
  89. }
  90. export const getBaseUnitViews = (language) => {
  91. return new request({
  92. url: './project/coopCustomServices/getUnitViews',
  93. method: 'get',
  94. params: {
  95. language
  96. }
  97. });
  98. }
  99. export const getFiles = (params) => {
  100. return new request({
  101. url: './file/sysAttachmentInfos',
  102. method: 'get',
  103. params: params
  104. });
  105. }