import request from '@/utils/request'

// 查询故障项目列表
export function listBreakdown(query) {
	return request({
		url: '/tpm/repair/breakdown/list',
		method: 'get',
		params: query
	})
}

// 查询故障项目详细
export function getBreakdown(id) {
	return request({
		url: '/tpm/repair/breakdown/' + id,
		method: 'get'
	})
}

// 新增故障项目
export function addBreakdown(data) {
	return request({
		url: '/tpm/repair/breakdown',
		method: 'post',
		data: data
	})
}

// 修改故障项目
export function updateBreakdown(data) {
	return request({
		url: '/tpm/repair/breakdown',
		method: 'put',
		data: data
	})
}

// 删除故障项目
export function delBreakdown(id) {
	return request({
		url: '/tpm/repair/breakdown/' + id,
		method: 'delete'
	})
}