import request from '@/utils/request'




export function getRecordList(query) {
  return request({
    url: '/supervision/record/',
    method: 'get',
    params: query
  })
}


export function getRecord(id) {
  return request({
    url: `/supervision/record/${id}/`,
    method: 'get'
  })
}

export function confirmRecord(id, data) {
  return request({
    url: `/supervision/record/${id}/confirm/`,
    method: 'put',
    data
  })
}

export function updateRecord(id, data) {
  return request({
    url: `/supervision/record/${id}/`,
    method: 'put',
    data
  })
}
export function updateRecords(data) {
  return request({
    url: '/supervision/record/updates/',
    method: 'put',
    data
  })
}

export function createself(data) {
  return request({
    url: `/supervision/record/createself/`,
    method: 'post',
    data
  })
}
export function upRecord(id, data) {
  return request({
    url: `/supervision/record/${id}/up/`,
    method: 'put',
    data
  })
}

export function rejectRecord(id, data) {
  return request({
    url: `/supervision/record/${id}/reject/`,
    method: 'put',
    data
  })
}
export function deleteRecord(id) {
  return request({
    url: `/supervision/record/${id}/`,
    method: 'delete',
  })
}
export function createRecord(data) {
  return request({
    url: `/supervision/record/`,
    method: 'post',
    data
  })
}

export function deptconfirm(id) {
  return request({
    url: `/supervision/record/${id}/deptconfirm/`,
    method: 'put',
  })
}

