import request from '@/utils/request'

// 查询检测任务列表
export function listInspection(query) {
  return request({
    url: '/task/inspection/list',
    method: 'get',
    params: query
  })
}

// 查询检测任务详细
export function getInspection(id) {
  return request({
    url: '/task/inspection/' + id,
    method: 'get'
  })
}

// 新增检测任务
export function addInspection(data) {
  return request({
    url: '/task/inspection',
    method: 'post',
    data: data
  })
}

// 修改检测任务
export function updateInspection(data) {
  return request({
    url: '/task/inspection',
    method: 'put',
    data: data
  })
}

// 删除检测任务
export function delInspection(id) {
  return request({
    url: '/task/inspection/' + id,
    method: 'delete'
  })
}

export function divideInspection(id) {
  return request({
    url: '/task/inspection/' + id,
    method: 'put'
  })
}
