139 lines
2.8 KiB
TypeScript
139 lines
2.8 KiB
TypeScript
import { LngBStationLngPageModel, LngBStationLngPageParams, LngBStationLngPageResult } from './model/LngStationModel';
|
||
import { defHttp } from '/@/utils/http/axios';
|
||
import { ErrorMessageMode } from '/#/axios';
|
||
|
||
enum Api {
|
||
Page = '/mdm/lngStation/page',
|
||
List = '/mdm/lngStation/list',
|
||
Info = '/mdm/lngStation/info',
|
||
LngBStationLng = '/mdm/lngStation',
|
||
|
||
|
||
|
||
Enable = '/mdm/lngStation/enable',
|
||
Disable= '/mdm/lngStation/disable',
|
||
|
||
DataLog = '/mdm/lngStation/datalog',
|
||
}
|
||
|
||
/**
|
||
* @description: 查询LngBStationLng分页列表
|
||
*/
|
||
export async function getLngBStationLngPage(params: LngBStationLngPageParams, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.get<LngBStationLngPageResult>(
|
||
{
|
||
url: Api.Page,
|
||
params,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
/**
|
||
* @description: 获取LngBStationLng信息
|
||
*/
|
||
export async function getLngBStationLng(id: String, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.get<LngBStationLngPageModel>(
|
||
{
|
||
url: Api.Info,
|
||
params: { id },
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
/**
|
||
* @description: 新增LngBStationLng
|
||
*/
|
||
export async function addLngBStationLng(lngBStationLng: Recordable, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.post<boolean>(
|
||
{
|
||
url: Api.LngBStationLng,
|
||
params: lngBStationLng,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
/**
|
||
* @description: 更新LngBStationLng
|
||
*/
|
||
export async function updateLngBStationLng(lngBStationLng: Recordable, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.put<boolean>(
|
||
{
|
||
url: Api.LngBStationLng,
|
||
params: lngBStationLng,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
/**
|
||
* @description: 删除LngBStationLng(批量删除)
|
||
*/
|
||
export async function deleteLngBStationLng(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.delete<boolean>(
|
||
{
|
||
url: Api.LngBStationLng,
|
||
data: ids,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
|
||
/**
|
||
* @description: 启用数据LngBStationLng
|
||
*/
|
||
export async function enableLngBStationLng(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.post<boolean>(
|
||
{
|
||
url: Api.Enable,
|
||
data: ids,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
/**
|
||
* @description: 作废数据LngBStationLng
|
||
*/
|
||
export async function disableLngBStationLng(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.post<boolean>(
|
||
{
|
||
url: Api.Disable,
|
||
data: ids,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
|
||
|
||
/**
|
||
* @description: 获取数据日志LngBStationLng
|
||
*/
|
||
export async function getDataLogLngBStationLng(id: string, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.post<boolean>(
|
||
{
|
||
url: Api.Datalog,
|
||
data: id,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
} |