import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { EnteralNutritionTemplateVO, EnteralNutritionTemplateForm, EnteralNutritionTemplateQuery } from '@/api/parameter/basicPublicTemplate/enteralNutritionTemplate/types'; /** * 查询肠内处方模板列表 * @param query * @returns {*} */ export const listEnteralNutritionTemplate = (query?: EnteralNutritionTemplateQuery): AxiosPromise => { return request({ url: '/parameter/basicPublicTemplate/enteralNutritionTemplate/list', method: 'get', params: query }); }; /** * 查询肠内处方模板详细 * @param id */ export const getEnteralNutritionTemplate = (id: string | number): AxiosPromise => { return request({ url: '/parameter/basicPublicTemplate/enteralNutritionTemplate/' + id, method: 'get' }); }; /** * 新增肠内处方模板 * @param data */ export const addEnteralNutritionTemplate = (data: EnteralNutritionTemplateForm) => { return request({ url: '/parameter/basicPublicTemplate/enteralNutritionTemplate', method: 'post', data: data }); }; /** * 修改肠内处方模板 * @param data */ export const updateEnteralNutritionTemplate = (data: EnteralNutritionTemplateForm) => { return request({ url: '/parameter/basicPublicTemplate/enteralNutritionTemplate', method: 'put', data: data }); }; /** * 删除肠内处方模板 * @param id */ export const delEnteralNutritionTemplate = (id: string | number | Array) => { return request({ url: '/parameter/basicPublicTemplate/enteralNutritionTemplate/' + id, method: 'delete' }); };