import request from '@/utils/request';
/**
 * 班级管理 - 班级列表
 */
export const classGroupList = (params: any) => {
  return request.post('/edu-app/classGroup/page', {
    data: params
    // requestType: 'form'
  });
};

/**
 * 获取班级里的学生
 */
export const getCLassStudent = (params: any) => {
  return request.post('/edu-app/student/page', {
    data: params
    // requestType: 'form'
  });
};

/**
 * 学员调整
 */
export const adjustStudent = (params: any) => {
  return request.post('/edu-app/classGroup/adjustStudent', {
    data: params
    // requestType: 'form'
  });
};

/**
 * 删除
 *
 */
export const deleteClass = (params: any) => {
  return request.post('/edu-app/classGroup/delete', {
    data: params,
    requestType: 'form'
  });
};

/**
 * 新建班级
 */
export const addClass = (params: any) => {
  return request.post('/edu-app/classGroup/save', {
    data: params
  });
};

/**
 * 班级学员
 */
export const getStudentList = (params: any) => {
  return request.post('/edu-app/student/page', {
    data: params
  });
};

/**
 * 获取训练列表
 */
export const getTrainingList = (params: any) => {
  return request.post('/edu-app/lessonTraining/trainingList', {
    data: params
  });
};

/**
 * 获取作业信息
 */
export const getWorkDetail = (params: any) => {
  return request.get('/edu-app/lessonTraining/trainingDetail', {
    data: params,
    params
  });
};

/***
 * 作业详情 列表
 */
export const getTrainingStudentList = (params: any) => {
  return request.post('/edu-app/lessonTraining/trainingStudentList', {
    data: params
  });
};

/**
 * 练习排行
 */
export const getTestList = (params: any) => {
  return request.post('/edu-app/musicPracticeRecordStat/trainingRanking', {
    data: params
  });
};

/**
 * 练习记录
 */
export const getTestreCodeList = (params: any) => {
  return request.post('/edu-app/musicPracticeRecordStat/trainingStat', {
    data: params
  });
};

/**
 * 获取学生详情
 */
export const getStudentDetail = (params: any) => {
  return request.get('/edu-app/student/detail', {
    data: params,
    params,
    requestType: 'form'
  });
};
/*
 * 上课记录
 */
export const courseSchedulePage = (params: any) => {
  return request.post('/edu-app/courseSchedule/page', {
    data: params
  });
};

/**
 * 开始上课 获取章节
 */
export const getCourseChapter = (params: any) => {
  return request.get(`/edu-app/lessonCourseware/detail/${params}`);
};

/**
 * 获取学生作业详情
 */

export const getTrainingStudentDetail = (params: any) => {
  return request.get(`/edu-app/lessonTraining/trainingStudentDetail`, {
    params,
    requestType: 'form'
  });
};

/**
 * 获取练习统计
 */
export const getTrainingStat = (params: any) => {
  return request.post(`/edu-app/musicPracticeRecordStat/trainingStat`, {
    data: params
  });
};

/**
 * 获取班级作业详情
 */
export const getTrainingClassDetail = (params: any) => {
  return request.get(`/edu-app/lessonTraining/trainingDetail`, {
    params,
    requestType: 'form'
  });
};

/**
 * 学生练习记录
 */
export const getTrainingStatList = (params: any) => {
  return request.post(`/edu-app/musicPracticeRecordStat/trainingList`, {
    data: params
  });
};

/**
 * @description: 后台练习统计列表
 */
export const api_practiceStatPage = (params: object) => {
  return request.post('/edu-app/musicPracticeRecordStat/practiceStatPage', {
    data: params
  });
};

/***
 * 创建班级群聊
 */
export const addGroup = (params: any) => {
  return request.post(`/edu-app/classGroup/addImGroup`, {
    data: params,
    requestType: 'form'
  });
};
/**
 * 获取班级列表
 */
export const getSubject = (params: any) => {
  return request.post(`/edu-app/subject/page`, {
    data: params
  });
};

/**
 * 修改班级
 */
export const resetClass = (params: any) => {
  return request.post('/edu-app/classGroup/update', {
    data: params
  });
};
/**
 * 修改声部
 */
export const updateSubject = (params: any) => {
  return request.post('/edu-app/classGroup/updateSubject', {
    data: params
  });
};

/**
 * 修改乐器
 */
export const updateInstrument = (params: any) => {
  return request.post('/edu-app/classGroup/updateInstrument', {
    data: params
  });
};
/**
 * 班级详情
 */
export const classGroupDetail = (params?: any) => {
  return request.get('/edu-app/classGroup/detail/' + params.id, {
    params
  });
};

/**
 * 获取年级，班级 声部
 */
export const getConfiguredSubjects = (params?: any) => {
  return request.post('/edu-app/classGroup/getConfiguredSubjects', {
    data: params
  });
};

/**
 * 获取班级声部
 */
export const getClassSubjects = (params?: any) => {
  return request.post('/edu-app/classGroup/getClassSubjects', {
    data: params
  });
};

/**
 * 批量班级声部
 */
export const updateBatchInstrument = (params?: any) => {
  return request.post('/edu-app/classGroup/updateBatchInstrument', {
    data: params
  });
};

/**
 * 班级学生名单 统计
 */
export const api_studentStat = (params?: any) => {
  return request.post(`/edu-app/classGroup/studentStat`, {
    data: params
  });
};
