import request from '@/utils/request'

// 查询单次任务进度详情列表
export function listDetail(query) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/onceWorkDetail/list',
    method: 'get',
    params: query
  })
}

// 查询单次任务进度详情详细
export function getDetail(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/onceWorkDetail/list?workOrderId=' + id,
    method: 'get'
  })
}

// 新增单次任务进度详情
export function addDetail(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/onceWorkDetail/addOnWorkDetail',
    method: 'post',
    data: data
  })
}

// 修改单次任务进度详情
export function updateDetail(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/onceWorkDetail/updateOnWorkDetail',
    method: 'post',
    data: data
  })
}

// 删除单次任务进度详情
export function delDetail(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/onceWorkDetail/' + id,
    method: 'delete'
  })
}
