import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { NutritionVO, NutritionForm, NutritionQuery } from '@/api/system/nutrition/types'; /** * 查询肠内营养列表 * @param query * @returns {*} */ export const listEnteralNutrition = (query?: NutritionQuery): AxiosPromise => { return request({ url: '/system/nutrition/list', method: 'get', params: query }); }; /** * 查询肠内营养详细 * @param id */ export const getEnteralNutrition = (id: string | number): AxiosPromise => { return request({ url: '/system/nutrition/' + id, method: 'get' }); }; /** * 新增肠内营养 * @param data */ export const addEnteralNutrition = (data: NutritionForm) => { return request({ url: '/system/nutrition', method: 'post', data: data }); }; /** * 修改肠内营养 * @param data */ export const updateEnteralNutrition = (data: NutritionForm) => { return request({ url: '/system/nutrition', method: 'put', data: data }); }; /** * 删除肠内营养 * @param id */ export const delEnteralNutrition = (id: string | number | Array) => { return request({ url: '/system/nutrition/' + id, method: 'delete' }); };