unitPersonnel.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import request from '@/utils/request'
  2. import qs from 'qs'
  3. export const getUnitPersonnelById = (id) => {
  4. return new request({
  5. url: './uc/unitPersonnelInformations/' + id,
  6. method: 'get',
  7. });
  8. }
  9. export function saveOrUpdate(unitPersonnelInformation,token) {
  10. return new request({
  11. url: './uc/unitPersonnelInformations',
  12. method: (unitPersonnelInformation.id ? 'put' : 'post'),
  13. headers: {
  14. token
  15. },
  16. data: {
  17. unitPersonnelInformation,
  18. }
  19. });
  20. }
  21. export function del(id) {
  22. return new request({
  23. url: './uc/unitPersonnelInformations/' + id,
  24. method: 'delete',
  25. });
  26. }
  27. export const getUnitPersonnelInformation = (params) => {
  28. return new request({
  29. url: './uc/unitPersonnelInformations/getUnitPersonnelInfos',
  30. method: 'get',
  31. params:params
  32. });
  33. }
  34. export const getUnitInfo = (params) => {
  35. return new request({
  36. url: './uc/unitPersonnelInformations/getUnitInfo',
  37. method: 'get',
  38. params:params
  39. });
  40. }
  41. export const addUnit = (unitPersonnelInformation) =>{
  42. return new request({
  43. url: './uc/unitPersonnelInformations/addUnit',
  44. method: 'get',
  45. params:unitPersonnelInformation
  46. });
  47. }