import request from '@/utils/request'

// 查询保养计划列表
export function listUpkeepPlan(query) {
	return request({
		url: '/device/upkeepPlan/list',
		method: 'get',
		params: query
	});
}

// 查询保养计划详细
export function getUpkeepPlan(planId) {
	return request({
		url: '/device/upkeepPlan/' + planId,
		method: 'get'
		});
}

// 新增保养计划
export function addUpkeepPlan(data) {
	return request({
		url: '/device/upkeepPlan',
		method: 'post',
		data: data
	});
}

// 修改保养计划
export function updateUpkeepPlan(data) {
	return request({
		url: '/device/upkeepPlan',
		method: 'put',
		data: data
	});
}

// 删除保养计划
export function delUpkeepPlan(planId) {
	return request({
		url: '/device/upkeepPlan/' + planId,
		method: 'delete'
	});
}
