89 lines
1.8 KiB
TypeScript
89 lines
1.8 KiB
TypeScript
|
|
import { LngPngApproPageModel, LngPngApproPageParams, LngPngApproPageResult } from './model/PngApproModel';
|
|||
|
|
import { defHttp } from '/@/utils/http/axios';
|
|||
|
|
import { ErrorMessageMode } from '/#/axios';
|
|||
|
|
|
|||
|
|
enum Api {
|
|||
|
|
Page = '/dayPlan/pngAppro/page',
|
|||
|
|
List = '/dayPlan/pngAppro/list',
|
|||
|
|
Info = '/dayPlan/pngAppro/info',
|
|||
|
|
LngPngAppro = '/dayPlan/pngAppro',
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* @description: 查询LngPngAppro分页列表
|
|||
|
|
*/
|
|||
|
|
export async function getLngPngApproPage(params: LngPngApproPageParams, mode: ErrorMessageMode = 'modal') {
|
|||
|
|
return defHttp.get<LngPngApproPageResult>(
|
|||
|
|
{
|
|||
|
|
url: Api.Page,
|
|||
|
|
params,
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
errorMessageMode: mode,
|
|||
|
|
},
|
|||
|
|
);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* @description: 获取LngPngAppro信息
|
|||
|
|
*/
|
|||
|
|
export async function getLngPngAppro(id: String, mode: ErrorMessageMode = 'modal') {
|
|||
|
|
return defHttp.get<LngPngApproPageModel>(
|
|||
|
|
{
|
|||
|
|
url: Api.Info,
|
|||
|
|
params: { id },
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
errorMessageMode: mode,
|
|||
|
|
},
|
|||
|
|
);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* @description: 新增LngPngAppro
|
|||
|
|
*/
|
|||
|
|
export async function addLngPngAppro(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') {
|
|||
|
|
return defHttp.post<boolean>(
|
|||
|
|
{
|
|||
|
|
url: Api.LngPngAppro,
|
|||
|
|
params: lngPngAppro,
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
errorMessageMode: mode,
|
|||
|
|
},
|
|||
|
|
);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* @description: 更新LngPngAppro
|
|||
|
|
*/
|
|||
|
|
export async function updateLngPngAppro(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') {
|
|||
|
|
return defHttp.put<boolean>(
|
|||
|
|
{
|
|||
|
|
url: Api.LngPngAppro,
|
|||
|
|
params: lngPngAppro,
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
errorMessageMode: mode,
|
|||
|
|
},
|
|||
|
|
);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* @description: 删除LngPngAppro(批量删除)
|
|||
|
|
*/
|
|||
|
|
export async function deleteLngPngAppro(ids: string[], mode: ErrorMessageMode = 'modal') {
|
|||
|
|
return defHttp.delete<boolean>(
|
|||
|
|
{
|
|||
|
|
url: Api.LngPngAppro,
|
|||
|
|
data: ids,
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
errorMessageMode: mode,
|
|||
|
|
},
|
|||
|
|
);
|
|||
|
|
}
|