baseProjectIntention.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import request from '@/utils/request'
  2. import qs from 'qs'
  3. export const getBaseProjectIntentions = (params) => {
  4. return new request({
  5. url: './project/baseProjectIntentions/',
  6. method: 'get',
  7. params: params
  8. });
  9. }
  10. export const getBaseProjectIntentionsByPortal = (params) => {
  11. return new request({
  12. url: './project/baseProjectIntentions/getByPortal',
  13. method: 'get',
  14. params: params
  15. });
  16. }
  17. export const get = (id) => {
  18. return new request({
  19. url: './project/baseProjectIntentions/' + id,
  20. method: 'get',
  21. });
  22. }
  23. export function saveOrUpdate(baseProjectIntention, token) {
  24. return new request({
  25. url: './project/baseProjectIntentions',
  26. method: (baseProjectIntention.id ? 'put' : 'post'),
  27. headers: {
  28. token
  29. },
  30. data: {
  31. baseProjectIntention
  32. }
  33. });
  34. }
  35. export function saveOrUpdateByPortal(baseProjectIntention, token,language) {
  36. return new request({
  37. url: './project/baseProjectIntentions/saveByPortal?language='+language,
  38. method: (baseProjectIntention.id ? 'put' : 'post'),
  39. headers: {
  40. token
  41. },
  42. data: {
  43. baseProjectIntention
  44. }
  45. });
  46. }
  47. export function del(id) {
  48. return new request({
  49. url: './project/baseProjectIntentions/' + id,
  50. method: 'delete',
  51. });
  52. }