123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- 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<NutritionVO[]> => {
- return request({
- url: '/system/nutrition/list',
- method: 'get',
- params: query
- });
- };
- /**
- * 查询肠内营养详细
- * @param id
- */
- export const getEnteralNutrition = (id: string | number): AxiosPromise<NutritionVO> => {
- 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<string | number>) => {
- return request({
- url: '/system/nutrition/' + id,
- method: 'delete'
- });
- };
|