2、保养计划
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import type { MaintainPlanVO, MaintainPlanForm, MaintainPlanQuery } from './model';
|
||||
|
||||
import type { ID, IDS } from '#/api/common';
|
||||
import type { PageResult } from '#/api/common';
|
||||
|
||||
import { commonExport } from '#/api/helper';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 查询保养计划列表
|
||||
* @param params
|
||||
* @returns 保养计划列表
|
||||
*/
|
||||
export function maintainPlanList(params?: MaintainPlanQuery) {
|
||||
return requestClient.get<PageResult<MaintainPlanVO>>('/property/maintainPlan/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出保养计划列表
|
||||
* @param params
|
||||
* @returns 保养计划列表
|
||||
*/
|
||||
export function maintainPlanExport(params?: MaintainPlanQuery) {
|
||||
return commonExport('/property/maintainPlan/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询保养计划详情
|
||||
* @param id id
|
||||
* @returns 保养计划详情
|
||||
*/
|
||||
export function maintainPlanInfo(id: ID) {
|
||||
return requestClient.get<MaintainPlanVO>(`/property/maintainPlan/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保养计划
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function maintainPlanAdd(data: MaintainPlanForm) {
|
||||
return requestClient.postWithMsg<void>('/property/maintainPlan', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新保养计划
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function maintainPlanUpdate(data: MaintainPlanForm) {
|
||||
return requestClient.putWithMsg<void>('/property/maintainPlan', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除保养计划
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function maintainPlanRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/property/maintainPlan/${id}`);
|
||||
}
|
Reference in New Issue
Block a user