import { $postParam } from "@/plugins/axios";

// commom
export const semesterQuery = schoolId => {
  return $postParam("/api/report/school/common/list_semester", { schoolId });
};
export const examQuery = datas => {
  return $postParam("/api/report/school/common/list_exam", datas);
};
export const courseQuery = datas => {
  return $postParam("/api/report/school/common/list_course", datas);
};
export const courseTeachQuery = datas => {
  return $postParam("/api/report/school/common/list_course_teach", datas);
};
export const teachCollegeQuery = datas => {
  return $postParam("/api/report/school/common/list_teach_college", datas);
};
export const inspectCollegeQuery = datas => {
  return $postParam("/api/report/school/common/list_inspect_college", datas);
};
export const inspectCollegeNotAbsentQuery = datas => {
  return $postParam(
    "/api/report/school/common/list_inspect_college_not_absent",
    datas
  );
};
export const teachQuery = datas => {
  return $postParam("/api/report/school/common/list_teacher", datas);
};
export const teachNotAbsentQuery = datas => {
  return $postParam("/api/report/school/common/list_teacher_not_absent", datas);
};
export const classQuery = datas => {
  return $postParam("/api/report/school/common/list_class", datas);
};

// cockpit::school-exam
export const schoolExamOverview = datas => {
  return $postParam("/api/report/school/exam/get_overview", datas);
};
export const schoolExamCourseSummary = datas => {
  return $postParam("/api/report/school/exam/get_course_summary", datas);
};
export const schoolExamExportCourseSummary = datas => {
  return $postParam("/api/report/school/exam/export_course_summary", datas, {
    responseType: "blob"
  });
};
// cockpit::school-teacher-class-score
export const schoolTeacherAllTeacherClassRank = datas => {
  return $postParam(
    "/api/report/school/teacher/list_all_teacher_class_rank",
    datas
  );
};
// cockpit::school-course
export const schoolCourseOverview = datas => {
  return $postParam("/api/report/school/course/get_overview", datas);
};
export const schoolCourseGradeDistribut = datas => {
  return $postParam("/api/report/school/course/get_grade_distribute", datas);
};
export const schoolCourseTeacherClassRank = datas => {
  return $postParam("/api/report/school/course/list_teacher_class_rank", datas);
};
export const schoolCourseExportDataAnalysis = datas => {
  return $postParam("/api/report/school/course/export_data_analysis", datas, {
    responseType: "blob"
  });
};

// student::teach-college-score
export const schoolStudentTeachCollegeResult = datas => {
  return $postParam(
    "/api/report/school/student/list_teach_college_result",
    datas
  );
};
export const schoolStudentExportTeachCollegeResult = datas => {
  return $postParam(
    "/api/report/school/student/export_teach_college_result",
    datas,
    {
      responseType: "blob"
    }
  );
};
// student::inspect-college-score
export const schoolStudentInspectCollegeResult = datas => {
  return $postParam(
    "/api/report/school/student/list_inspect_college_result",
    datas
  );
};
export const schoolStudentExportInspectCollegeResult = datas => {
  return $postParam(
    "/api/report/school/student/export_inspect_college_result",
    datas,
    {
      responseType: "blob"
    }
  );
};
// student::student-report-manage
export const examStudentReportList = datas => {
  return $postParam("/api/report/exam_student/report/list", datas);
};
// teacher::teacher-class-score
export const schoolTeacherClassRank = datas => {
  return $postParam("/api/report/school/teacher/list_class_rank", datas);
};
export const schoolTeacherMyClassRank = datas => {
  return $postParam("/api/report/school/teacher/list_myclass_rank", datas);
};
// teacher::my-class-exam-view
export const schoolTeacherView = datas => {
  return $postParam("/api/report/school/teacher/view", datas);
};
export const schoolTeacherQuestionView = datas => {
  return $postParam("/api/report/school/teacher/question_view", datas);
};
export const schoolTeacherQuestionAnswerView = datas => {
  return $postParam("/api/report/school/teacher/question_answer_view", datas);
};
// course::inspect-course-exam-overview
export const courseSurveyInspectView = datas => {
  return $postParam("/api/report/course/survey_inspect/view", datas);
};
// course::inspect-course-exam-analysis
export const courseSurveyInspectAnalyseView = datas => {
  return $postParam("/api/report/course/survey_inspect_analyse/view", datas);
};
// course::owner-course-exam-overview
export const courseSurveyTeacherList = datas => {
  return $postParam("/api/report/course/survey_teacher/list", datas);
};
export const courseSurveyTeacherExport = datas => {
  return $postParam("/api/report/course/survey_teacher/export", datas, {
    responseType: "blob"
  });
};
// course::owner-course-exam-analysis
// 图表接口
export const courseSurveyTeacherView = datas => {
  return $postParam("/api/report/course/survey_teacher/view", datas);
};
// 教师各课堂成绩排名接口
export const courseSurveyTeacherTeacherView = datas => {
  return $postParam("/api/report/course/survey_teacher/teacher_view", datas);
};
// 试题难度得分情况分析接口
export const courseSurveyTeacherQuestionView = datas => {
  return $postParam("/api/report/course/survey_teacher/question_view", datas);
};
// 各难度水平题目上的作答分析
export const courseSurveyTeacherQuestionAnswerView = datas => {
  return $postParam(
    "/api/report/course/survey_teacher/question_answer_view",
    datas
  );
};
// course::assign-score-action
export const courseSurveyAspointsList = datas => {
  return $postParam("/api/report/course/survey_aspoints/list", datas);
};
export const courseSurveyAspointsCalculation = datas => {
  return $postParam("/api/report/course/survey_aspoints/calculation", datas);
};
export const courseSurveyAspointsView = datas => {
  return $postParam("/api/report/course/survey_aspoints/view", datas);
};
export const courseSurveyAspointsPublish = datas => {
  return $postParam("/api/report/course/survey_aspoints/publish", datas);
};
export const courseSurveyAspointsSave = datas => {
  return $postParam("/api/report/course/survey_aspoints/save", datas);
};
export const courseSurveyTeacherCourseExport = datas => {
  return $postParam("/api/report/course/survey_teacher/course_export", datas, {
    responseType: "blob"
  });
};
