import request from '@/utils/request'
// 获取任务列表
export function getTaskList(data) {
  return request({
    url: '/inspection/tasks',
    method: 'get',
    params: data
  })
}

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

// 获取任务删除
export function deleteTask(id) {
  return request({
    url: `/inspection/task/${id}`,
    method: 'delete'
  })
}

// /stage-api/inspection/task/{id} // 更新任务
export function updateTask(data) {
  return request({
    url: `/inspection/task/${data.id}`,
    method: 'put',
    data
  })
}
