import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: request.apiModule.rpfm + '/grading',
    method: 'get',
    params: query
  })
}

export function createSOD(data) {
  return request({
    url: request.apiModule.rpfm + '/grading/manager',
    method: 'post',
    data
  })
}

export function updateSOD(data) {
  return request({
    url: request.apiModule.rpfm + '/grading',
    method: 'put',
    data
  })
}

export function deleteSOD(id) {
  return request({
    url: request.apiModule.rpfm + '/grading' ,
    method: 'delete',
    data: { id: id }
  })
}

export function getGradingInfo(gradingId) {
  return request({
    url: request.apiModule.rpfm + '/grading/' + gradingId,
    method: 'get'
  })
}

export function gradingDetail(data) {
  return request({
    url: request.apiModule.rpfm + '/grading/detail',
    method: 'post',
    data
  })
}
