Files
geg-gas-web/src/api/dayPlan/Demand/index.ts
‘huanghaiixia’ e97ba3bcfb 客户需求
2026-01-16 17:28:00 +08:00

115 lines
2.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { LngPngDemandPageModel, LngPngDemandPageParams, LngPngDemandPageResult } from './model/DemandModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/dayPlan/demand/page',
List = '/dayPlan/demand/list',
Info = '/dayPlan/demand/info',
LngPngDemand = '/dayPlan/demand',
Export = '/dayPlan/demand/export',
DataLog = '/dayPlan/demand/datalog',
}
/**
* @description: 查询LngPngDemand分页列表
*/
export async function getLngPngDemandPage(params: LngPngDemandPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngPngDemandPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取LngPngDemand信息
*/
export async function getLngPngDemand(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngPngDemandPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增LngPngDemand
*/
export async function addLngPngDemand(lngPngDemand: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.LngPngDemand,
params: lngPngDemand,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新LngPngDemand
*/
export async function updateLngPngDemand(lngPngDemand: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.LngPngDemand,
params: lngPngDemand,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除LngPngDemand批量删除
*/
export async function deleteLngPngDemand(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.LngPngDemand,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 导出LngPngDemand
*/
export async function exportLngPngDemand(
params?: object,
mode: ErrorMessageMode = 'modal'
) {
return defHttp.download(
{
url: Api.Export,
method: 'GET',
params,
responseType: 'blob',
},
{
errorMessageMode: mode,
},
);
}