import request from '@/utils/request'

// 修改计划初始化信息
export function initUpdatePlanInfo(data) {
  return request({
    url: '/device/inspectionPlan/initUpdatePlanInfo',
    method: 'post',
    data: data
  });
}

// 查询工作中心
export function getWorkCenter() {
  return request({
    url: '/device/inspectionPlan/getWorkCenter',
    method: 'get'
  });
}

// 查询人员信息
export function getPersonList() {
  return request({
    url: '/device/inspectionPlan/getPersonList',
    method: 'get'
  });
}

// 处理计划-设备信息
export function formatEquItem(data) {
  return request({
    url: '/device/inspectionPlan/formatEquItem',
    method: 'post',
    data: data
  });
}

// 获取设备信息list
export function getEquList(equQuery) {
  return request({
    url: '/device/inspectionPlan/getEquList',
    method: 'get',
    params: equQuery
  });
}

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

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

// 新增计划
export function addPlan(data) {
	return request({
		url: '/device/inspectionPlan',
		method: 'post',
		data: data
	});
}

// 修改计划
export function updatePlan(data) {
	return request({
		url: '/device/inspectionPlan',
		method: 'put',
		data: data
	});
}

// 删除计划
export function delPlan(planId) {
	return request({
		url: '/device/inspectionPlan/' + planId,
		method: 'delete'
	});
}
