index.ts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import request from '@/utils/request';
  2. import { AxiosPromise } from 'axios';
  3. import { EnteralNutritionTemplateVO, EnteralNutritionTemplateForm, EnteralNutritionTemplateQuery } from '@/api/parameter/basicPublicTemplate/enteralNutritionTemplate/types';
  4. /**
  5. * 查询肠内处方模板列表
  6. * @param query
  7. * @returns {*}
  8. */
  9. export const listEnteralNutritionTemplate = (query?: EnteralNutritionTemplateQuery): AxiosPromise<EnteralNutritionTemplateVO[]> => {
  10. return request({
  11. url: '/parameter/basicPublicTemplate/enteralNutritionTemplate/list',
  12. method: 'get',
  13. params: query
  14. });
  15. };
  16. /**
  17. * 查询肠内处方模板详细
  18. * @param id
  19. */
  20. export const getEnteralNutritionTemplate = (id: string | number): AxiosPromise<EnteralNutritionTemplateVO> => {
  21. return request({
  22. url: '/parameter/basicPublicTemplate/enteralNutritionTemplate/' + id,
  23. method: 'get'
  24. });
  25. };
  26. /**
  27. * 新增肠内处方模板
  28. * @param data
  29. */
  30. export const addEnteralNutritionTemplate = (data: EnteralNutritionTemplateForm) => {
  31. return request({
  32. url: '/parameter/basicPublicTemplate/enteralNutritionTemplate',
  33. method: 'post',
  34. data: data
  35. });
  36. };
  37. /**
  38. * 修改肠内处方模板
  39. * @param data
  40. */
  41. export const updateEnteralNutritionTemplate = (data: EnteralNutritionTemplateForm) => {
  42. return request({
  43. url: '/parameter/basicPublicTemplate/enteralNutritionTemplate',
  44. method: 'put',
  45. data: data
  46. });
  47. };
  48. /**
  49. * 删除肠内处方模板
  50. * @param id
  51. */
  52. export const delEnteralNutritionTemplate = (id: string | number | Array<string | number>) => {
  53. return request({
  54. url: '/parameter/basicPublicTemplate/enteralNutritionTemplate/' + id,
  55. method: 'delete'
  56. });
  57. };