import request from "@/utils/request";

// 删除组卷
export const delMyPaperById = (id) =>
  request({
    url: `/sc/subjectPaper/deleteComposePaper/${id}`,
    method: "delete",
  });

// 获取作业列表
export const getJobList = (params) =>
  request({
    url: `/sc/job/list`,
    params: {
      ...params,
      clientType: 1,
    },
  });

// 获取作业详情
export const getJobById = (id) =>
  request({
    url: `/sc/job/${id}`,
  });

// 获取作业试卷详情
export const getJobInfoById = (params) =>
  request({
    url: `/sc/subjectPaper/jobInfo`,
    params,
  });

// 获取作业分析
export const getJobAnalysisById = (params) =>
  request({
    url: `/sc/job/getJobStatistics/${params.id}`,
    params,
  });

// 获取作业学生列表
export const getJobStuList = (params) =>
  request({
    url: `/sc/jobStu/list`,
    params,
  });

// 获取作业班级列表
export const getJobClassList = (params) =>
  request({
    url: `/sc/jobStu/classList`,
    params,
  });

// 获取作业回答情况学生列表
export const getJobAnswerStatistics = (params) =>
  request({
    url: `/sc/jobStuTitle/list`,
    params,
  });

// 获取作业学生详情
export const getJobStuInfo = (params) =>
  request({
    url: `/sc/job/getJobContent`,
    params,
  });

// 新增作业
export const addJob = (data) =>
  request({
    url: `/sc/job`,
    method: "post",
    data,
  });

// 删除作业
export const delJob = (id) =>
  request({
    url: `/sc/job/${id}`,
    method: "delete",
  });

// 获取班级
export const getClassList = (params) =>
  request({
    url: `/sc/staff/getCurrentStaffClassList`,
    params,
  });

// 查询学生
export const getStudentList = (data) =>
  request({
    url: `/sc/staff/getScStaffStuPage`,
    method: "post",
    data,
  });

// 保存老师评分
export const submitManualAnswer = (data) =>
  request({
    url: `/sc/jobStuTitle/submitManualAnswer`,
    method: "post",
    data,
  });

// 获取未批改列表
export const getUnmarkList = (params) =>
  request({
    url: `/sc/job/getUnmarkList`,
    params,
  });

// 获取批改历史
export const getCorrectionHistory = (params) =>
  request({
    url: `/sc/job/getMarkHistory`,
    params,
  });

// 获取作业知识点
export const getJobKnowledge = (params) =>
  request({
    url: `/sc/job/statisticalKnowledge`,
    params,
  });
