import request from '@/utils/request'

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

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

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

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

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

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