import request from '@/utils/request'

// 查询故障报修列表
export function listFaultReport(query) {
	return request({
		url: '/device/faultReport/list',
		method: 'get',
		params: query
	});
}

// 查询故障报修详细
export function getFaultReport(orderId) {
	return request({
		url: '/device/faultReport/' + orderId,
		method: 'get'
		});
}

// 新增故障报修
export function addFaultReport(data) {
	return request({
		url: '/device/faultReport',
		method: 'post',
		data: data
	});
}

// 修改故障报修
export function updateFaultReport(data) {
	return request({
		url: '/device/faultReport/edit',
		method: 'put',
		data: data
	});
}

// 删除故障报修
export function delFaultReport(orderId) {
	return request({
		url: '/device/faultReport/' + orderId,
		method: 'delete'
	});
}

// 查询故障报修列表
export function getEquipmentList(query) {
  return request({
    url: '/device/faultReport/getEquipmentList',
    method: 'get',
    params: query
  });
}

// 查询设备类型
export function getEquipmentTypeList() {
  return request({
    url: '/device/faultReport/getEquipmentTypeList',
    method: 'get'
  });
}

// 审核维修工单
export function checkFaultReport(data) {
  return request({
    url: '/device/faultReport/check',
    method: 'put',
    data: data
  });
}
