import request from '@/utils/request';

export function reSub(data) {
  return request({
    url: "/comprehensive/auditDetails/reSub",
    method: "post",
    data
  });
}

export function cancelProcess(data) {
  return request({
    url: "/comprehensive/auditDetails/cancelProcess",
    method: "post",
    data
  });
}

export function listOwnProcessed(params = {}) {
  return request({
    url: "/comprehensive/auditDetails/listOwnProcessed",
    method: "get",
    params
  });
}

export function listOwnApply(params = {}) {
  return request({
    url: "/comprehensive/auditDetails/listOwnApply",
    method: "get",
    params
  });
}

export function getCompleted(
  query = null
) {
  return request({
    url: '/comprehensive/auditDetails/completed',
    method: 'get',
    params:query
  })
}


export function getDetailInfo(id) {
  return request({
    url: "/comprehensive/auditDetails/getDetail/" + id,
    method: 'post'
  });
}

//批量审核
export function manyProcess(ids) {
  return request({
    data: ids,
    method: 'post',
    url: "/comprehensive/auditDetails/auditOperaBatch"
  });
}


//我的已审核列表
export function myProcessed(query) {
  return request({
    url: "/comprehensive/auditDetails/myProcessedList",
    method: 'get',
    params: query
  });
}

//我的审核
export function myReview(query) {
  return request({
    url: "/comprehensive/auditDetails/myReviewList",
    method: 'get',
    params: query
  });
}

//我的申请
export function mySubmit(query) {
  return request({
    url: "/comprehensive/auditDetails/myApplyList",
    method: 'get',
    params: query
  });
}

//审核
export function process(data) {
  return request({
    url: "/comprehensive/auditDetails/auditOpera",
    method: "post",
    data: data
  });
}


// 查询审核明细列表
export function listAuditDetails(query) {
  return request({
    url: '/comprehensive/auditDetails/list',
    method: 'get',
    params: query
  })
}

// 查询审核明细详细
export function getAuditDetails(id) {
  return request({
    url: '/comprehensive/auditDetails/' + id,
    method: 'get'
  })
}

// 新增审核明细
export function addAuditDetails(data) {
  return request({
    url: '/comprehensive/auditDetails',
    method: 'post',
    data: data
  })
}

// 修改审核明细
export function updateAuditDetails(data) {
  return request({
    url: '/comprehensive/auditDetails/update',
    method: 'post',
    data: data
  })
}

// 删除审核明细
export function delAuditDetails(id) {
  return request({
    url: '/comprehensive/auditDetails/delete/' + id,
    method: 'post'
  })
}

export function listEnableYear(query = {
  pageNum: 1,
  pageSize: 50
}) {
  return request({
    url: "/system/year/listEnableYear",
    method: 'get',
    params: query
  });
}

//列出思想品德子类
export function listIamChild(){
  return request({
    url:"/system/rules/listIamChild",
    method:"post"
  });
}
//学生提交
export function stuAdd(data){
  return request({
    url:"/system/iam/stuAdd",
    method:"post",
    data:data
  });
}