import Axios from '@/utils/request'

// 修改作业票信息
export function editWorkticket (data) {
  return Axios({
    url: '/app/workticket',
    method: 'put',
    data
  })
}

// 申请作业票
export function addWorkticket (data) {
  return Axios({
    url: '/app/workticket',
    method: 'post',
    data
  })
}
// 获取作业票信息详细信息
export function getWorkticketDetails (id) {
  return Axios({
    url: `/app/workticket/${id}`,
    method: 'get'
  })
}

// 验收签字
export function acceptance (data) {
  return Axios({
    url: '/app/workticket/acceptance',
    method: 'post',
    data
  })
}

// 作业票气体分析
export function addWorkTicketGasAnalysis (data) {
  return Axios({
    url: '/app/workticket/addWorkTicketGasAnalysis',
    method: 'post',
    data
  })
}

// 作业监护人审核作业票
export function checkWorkTicket (data) {
  return Axios({
    url: '/app/workticket/checkWorkTicket',
    method: 'post',
    data
  })
}

// 作业票措施确认
export function checkWorkTicketMeasure (data) {
  return Axios({
    url: '/app/workticket/checkWorkTicketMeasure',
    method: 'post',
    data
  })
}
// 作业票编制人签字
export function checkMeasuresComplementUser (data) {
  return Axios({
    url: '/app/workticket/checkMeasuresComplementUser',
    method: 'post',
    data
  })
}

// 查询作业票信息列表
export function getList (params) {
  return Axios({
    url: '/app/workticket/list',
    method: 'get',
    params
  })
}

// 获取操作记录
export function getOperateRecord (id) {
  return Axios({
    url: `/app/workticket/operateRecord/${id}`,
    method: 'get'
  })
}

// 执行会签签字
export function workSignOptionRun (data) {
  return Axios({
    url: '/app/workticket/workSignOptionRun',
    method: 'post',
    data
  })
}

// 交底人签字
export function workTicketDisclose (data) {
  return Axios({
    url: '/app/workticket/workTicketDisclose',
    method: 'post',
    data
  })
}

// 交底人签字
export function checkWorkTicketMeasureV2 (data) {
  return Axios({
    url: '/app/workticket/checkWorkTicketMeasureV2',
    method: 'post',
    data
  })
}
