import type { InspectPlanVO } from './model';
|
|
import type { ID, IDS } from '#/api/common';
|
|
import { commonExport } from '#/api/helper';
|
import { requestClient } from '#/api/request';
|
|
enum Api {
|
inspectPlanExport = '/eims/inspectPlan/export',
|
inspectPlanList = '/eims/inspectPlan/list',
|
root = '/eims/inspectPlan'
|
}
|
|
/**
|
* 查询点检计划列表
|
* @param query
|
* @returns {*}
|
*/
|
|
export function listInspPlan(params?: any) {
|
return requestClient.get<InspectPlanVO[]>(Api.inspectPlanList, { params });
|
}
|
|
|
|
/**
|
* 查询点检计划详细
|
* @param inspectPlanId
|
*/
|
export function getInspPlan(inspectPlanId: ID) {
|
return requestClient.get<InspectPlanVO>(`${Api.root}/${inspectPlanId}`);
|
}
|
|
/**
|
* 新增点检计划
|
* @param data
|
*/
|
export function addInspPlan(data: any) {
|
return requestClient.postWithMsg<void>(Api.root, data);
|
}
|
|
/**
|
* 修改点检计划
|
* @param data
|
*/
|
export function updateInspPlan(data: any) {
|
return requestClient.putWithMsg<void>(Api.root, data);
|
}
|
|
/**
|
* 删除点检计划
|
* @param inspectPlanId
|
*/
|
export function delInspPlan(inspectPlanId: IDS) {
|
return requestClient.deleteWithMsg<void>(`${Api.root}/${inspectPlanId}`);
|
}
|
/**
|
* 导出
|
* @param
|
*/
|
export function inspPlanExport(data: any) {
|
return commonExport(Api.inspectPlanExport, data);
|
}
|