import type { MaintPlanVO } from './model';
|
|
import type { ID, IDS } from '#/api/common';
|
|
import { commonExport } from '#/api/helper';
|
import { requestClient } from '#/api/request';
|
|
enum Api {
|
maintPlanExport = '/eims/maintPlan/export',
|
maintPlanList = '/eims/maintPlan/list',
|
root = '/eims/maintPlan'
|
}
|
|
/**
|
* 查询保养计划列表
|
* @param query
|
* @returns {*}
|
*/
|
|
export function listMaintPlan(params?: any) {
|
return requestClient.get<MaintPlanVO[]>(Api.maintPlanList, { params });
|
}
|
|
/**
|
* 查询保养计划详细
|
* @param maintPlanId
|
*/
|
export function getMaintPlan(maintPlanId: ID) {
|
return requestClient.get<MaintPlanVO>(`${Api.root}/${maintPlanId}`);
|
}
|
|
/**
|
* 新增保养计划
|
* @param data
|
*/
|
export function addMaintPlan(data: any) {
|
return requestClient.postWithMsg<void>(Api.root, data);
|
}
|
|
/**
|
* 修改保养计划
|
* @param data
|
*/
|
export function updateMaintPlan(data: any) {
|
return requestClient.putWithMsg<void>(Api.root, data);
|
}
|
|
/**
|
* 删除保养计划
|
* @param maintPlanId
|
*/
|
export function delMaintPlan(maintPlanId: IDS) {
|
return requestClient.deleteWithMsg<void>(`${Api.root}/${maintPlanId}`);
|
}
|
/**
|
* 导出
|
* @param
|
*/
|
export function maintPlanExport(data: any) {
|
return commonExport(Api.maintPlanExport, data);
|
}
|