import request from '@/utils/request'

// 查询检测点列表
export function listCheckpoints(query) {
  return request({
    url: '/check/checkpoints/list',
    method: 'get',
    params: query
  })
}

// 查询检测点详细
export function getCheckpoints(checkId) {
  return request({
    url: '/check/checkpoints/' + checkId,
    method: 'get'
  })
}

// 新增检测点
export function addCheckpoints(data) {
  return request({
    url: '/check/checkpoints',
    method: 'post',
    data: data
  })
}

// 修改检测点
export function updateCheckpoints(data) {
  return request({
    url: '/check/checkpoints',
    method: 'put',
    data: data
  })
}

// 删除检测点
export function delCheckpoints(checkId) {
  return request({
    url: '/check/checkpoints/' + checkId,
    method: 'delete'
  })
}

//送审审核
export function approveCheckpoints(data) {
  return request({
    url: '/check/checkpoints/toApprove',
    method: 'put',
    data: data
  })
}

//送审审核
export function approveCheckpointsAll(data) {
  return request({
    url: '/check/checkpoints/approveAll',
    method: 'post',
    data: data
  })
}
