import { $post, $get } from "@/plugins/axios";

export const uploadFormalImage = (options, datas, config) => {
  const pathInfo = options.imageEncrypt ? "image/uploadsheet" : "ms-sheet";
  return $post(
    `/api/file/${pathInfo}/${options.examId}/${options.subjectId}/${options.examNumber}`,
    datas,
    { ...config, showTinyTips: true }
  );
};
export const uploadSliceImage = (options, datas, config) => {
  const pathInfo = options.imageEncrypt ? "image/upload" : "ms-slice";
  return $post(
    `/api/file/${pathInfo}/${options.examId}/${options.subjectId}/${options.examNumber}`,
    datas,
    { ...config, showTinyTips: true }
  );
};
export const getStudentGroupByExamNumber = examNumber => {
  return $get(`/api/exam/listStudents/${examNumber}`);
};
export const getStudentByExamNumber = examNumber => {
  return $get(`/api/exam/getStudent/${examNumber}`);
};
export const uploadStudent = datas => {
  return $post(`/api/upload/student/${datas.subjectId}`, datas, {
    showTinyTips: true
  });
};
export const saveCollectLog = datas => {
  return $post(`/api/marklog/saveCollectLog`, datas, { showTinyTips: true });
};
export const getLevelList = examId => {
  return $get(`/api/level/${examId}`);
};
