import { http } from '../request/request';

/**
 * 获取学员详情
 * @param params 请求参数
 */
export const getStudentDetail = async (params = {}): Promise<any> => {
  return await http.get<any>('/phone/inspectorTeacher/getStuVoByOrderIdAndCourseDate', params);
};
/**
 * 获取学员督学报告列表
 * @param data 请求参数
 */
export const getUserReportPage = async (data = {}): Promise<any> => {
  return await http.post<any>('/phone/inspectorTeacher/getUserReportPage', data);
};
/**
 * 获取学员督学报告列表
 * @param params 请求参数
 */
export const getUserInspectorCourseReportInfo = async (params = {}): Promise<any> => {
  return await http.get<any>('/phone/inspectorTeacher/userInspectorCourseReportInfo', params);
};
/**
 * 获取学员学习计划列表
 * @param data
 */
export const queryStudyPlanList = async (data = {}): Promise<any> => {
  return await http.post<any>('/phone/inspectorTeacher/queryStuPlanPage', data);
};
/**
 * 删除学员学习计划
 * @param planId 学习计划id
 */
export const deletePlanRequest = async (planId: string): Promise<any> => {
  return await http.post<any>(`/phone/inspectorTeacher/deletePlanById?planId=${planId}`);
};
/**
 * 获取学科列表
 * @param gradeId 年级id
 */
export const getSubjectListByGrade = async (gradeId: string): Promise<any> => {
  return await http.get<any>(`/subject/list/${gradeId}`);
};
/**
 * 获取学员学习时长统计
 * @param params
 */
export const queryStudyDuration = async (params = {}): Promise<any> => {
  return await http.get<any>('/userSubjectReport/study/duration', params);
};
/**
 * 获取学员视频学习统计
 * @param params
 */
export const queryVideoStudy = async (params = {}): Promise<any> => {
  return await http.get<any>('/userSubjectReport/study/video', params);
};
/**
 * 获取学员知识点学习统计
 * @param params
 */
export const queryStudyKnowledge = async (params = {}): Promise<any> => {
  return await http.get<any>('/userSubjectReport/study/knowledge', params);
};

/**
 * 获取学员错题学习统计
 * @param params
 */
export const queryStudentWrongQuestion = async (params = {}): Promise<any> => {
  return await http.get<any>('/userSubjectReport/study/error', params);
};
