You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.5 KiB
TypeScript

import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { PlanInfoVO, PlanInfoForm, PlanInfoQuery } from '@/api/mes/planInfo/types';
/**
*
* @param query
* @returns {*}
*/
export const listPlanInfo = (query?: PlanInfoQuery): AxiosPromise<PlanInfoVO[]> => {
return request({
url: '/mes/planInfo/list',
method: 'get',
params: query
});
};
/**
*
* @param planId
*/
export const getPlanInfo = (planId: string | number): AxiosPromise<PlanInfoVO> => {
return request({
url: '/mes/planInfo/' + planId,
method: 'get'
});
};
/**
*
* @param data
*/
export const addPlanInfo = (data: PlanInfoForm) => {
return request({
url: '/mes/planInfo',
method: 'post',
data: data
});
};
/**
*
* @param data
*/
export const updatePlanInfo = (data: PlanInfoForm) => {
return request({
url: '/mes/planInfo',
method: 'put',
data: data
});
};
/**
*
* @param planId
*/
export const delPlanInfo = (planId: string | number | Array<string | number>) => {
return request({
url: '/mes/planInfo/' + planId,
method: 'delete'
});
};
/**
*
* @param query
* @returns {*}
*/
export function getPlanInfoList (query) {
return request({
url: '/mes/planInfo/getPlanInfoList',
method: 'get',
params: query
});
};