const axios = require('@/common/axios').default
import qs from 'qs'
// import axios from '@/common/axios'
// console.log(axios)
const api = '/api-teacher'
// const api2 = '/web-server'

// 查询我发起的任务列表
const queryMyCreatedList = (data) => {
  return axios({
    url: api + '/snaker/task/queryMyCreatedList',
    method: 'get',
    params: data
  })
}

// 查询我待办任务列表
const queryWaitList = (data) => {
  return axios({
    url: api + '/snaker/task/queryWaitList',
    method: 'get',
    params: data
  })
}

// 查询我已办任务列表
const queryProcessedList = (data) => {
  return axios({
    url: api + '/snaker/task/queryProcessedList',
    method: 'get',
    params: data
  })
}

// 活动分类
const findSubSubjects = (data) => {
  return axios({
    url: api + '/subject/findTeacherSubjets',
    method: 'get',
    params: data
  })
}

// 所有声部
const subjectFindSubSubjects = (data) => {
  return axios({
    url: api + '/subject/findSubSubjects',
    method: 'get',
    params: data
  })
}

// vip课类别
const vipGroupCategory = (data) => {
  return axios({
    url: api + '/vipGroupCategory/queryAll',
    method: 'get',
    params: data
  })
}

// 根据课程类型获取对应课程活动方案
const findByVipGroupCategory = (data) => {
  return axios({
    url: api + '/vipGroupActivity/findByVipGroupCategory',
    method: 'get',
    params: data
  })
}

// 获取教师vip课教学点
const findVipSchoolByTeacher = (data) => {
  return axios({
    url: api + '/school/findVipSchoolByTeacher',
    method: 'get',
    params: data
  })
}

// 获取教师vip课教学点(vip申请里面)
const findVipSchoolByTeacher2 = (data) => {
  return axios({
    url: api + '/school/findVipSchoolByTeacher2',
    method: 'get',
    params: data
  })
}

// 新增学校
const schoolAdd = (data) => {
  return axios({
    url: api + '/school/add',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 删除学校
const schoolDel = (data) => {
  return axios({
    url: api + '/school/del',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 修改学校
const schoolUpdate = (data) => {
  return axios({
    url: api + '/school/update',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 根据老师编号及课程类型编号获取默认课酬
const findByTeacherAndCategory = (data) => {
  return axios({
    url: api + '/teacherDefaultVipGroupSalary/findByTeacherAndCategory',
    method: 'get',
    params: data
  })
}

// vip课申请
const vipGroupApply = (data) => {
  return axios({
    url: api + '/teacherVipGroup/vipGroupApply',
    method: 'post',
    data: data
  })
}

// vip课申请
const vipGroupApplyForDouble11 = (data) => {
  return axios({
    url: api + '/teacherVipGroup/vipGroupApplyForDouble11',
    method: 'post',
    data: data
  })
}

// 查询vip课列表
const queryVipCourseScheduleList = (data) => {
  return axios({
    url: api + '/teacherLeaveRecord/queryVipCourseScheduleList',
    method: 'get',
    params: data
  })
}

// 分页查询请假类型列表
const leaveCategoryPage = (data) => {
  return axios({
    url: api + '/leaveCategory/queryPage',
    method: 'post',
    data: data
  })
}

// 请假
const askForLeave = (data) => {
  return axios({
    url: api + '/teacherLeaveRecord/askForLeave',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 根据日期获取当日排课
const getCourseSchedulesWithDate = (data) => {
  return axios({
    url: api + '/teacherCourseSchedule/getCourseSchedulesWithDate',
    method: 'get',
    params: data
  })
}

// 根据月份获取该月有课的日期
const getCourseScheduleDateByMonth = (data) => {
  return axios({
    url: api + '/teacherCourseSchedule/getCourseScheduleDateByMonth',
    method: 'get',
    params: data
  })
}

// 课时调整
const classStartDateAdjust = (data) => {
  return axios({
    url: api + '/teacherCourseSchedule/classStartDateAdjust',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 课时交换
const courseSwap = (data) => {
  return axios({
    url: api + '/teacherCourseSchedule/courseSwap',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 历史考勤统计-头信息
const statisticsInfo = (data) => {
  return axios({
    url: api + '/teacherCourseSchedule/statisticsInfo',
    method: 'get',
    params: data
  })
}

// 历史考勤统计-考勤列表
const statisticsList = (data) => {
  return axios({
    url: api + '/teacherCourseSchedule/statisticsList',
    method: 'get',
    params: data
  })
}

// 获取乐团学院学员报名列表
const queryStudentApply = (data) => {
  return axios({
    url: api + '/teacher/queryStudentApply',
    method: 'get',
    params: data
  })
}

// 获取乐团学院学员报名列表
const querySubByMusicGroupId = (data) => {
  return axios({
    url: api + '/teacher/querySubByMusicGroupId',
    method: 'get',
    params: data
  })
}

// 获取报名/预报名列表
const getRegisterOrPreList = (data) => {
  return axios({
    url: api + '/teacher/getRegisterOrPreList',
    method: 'get',
    params: data
  })
}

// 调剂
const updateSubject = (data) => {
  return axios({
    url: api + '/studentRegistration/updateSubject',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 查询福袋数据
const getFortuneBag = () => {
  return axios({
    url: '/api-student/studentOrder/getLuckStatis',
    method: 'get',

  })
}

// 查询预约激活人数
const getactiveList = () => {
  return axios({
    url: '/api-web/api/practiceSum',
    method: 'get',

  })
}
const addStudyReport = (data) => {
  return axios({
    url: '/api-teacher/classGroup/addStudyReport ',
    method: 'post',
    data

  })
}
const addStudyReport1 = (data) => {
  return axios({
    url: '/api-teacher/studyReport/addStudyReport',
    method: 'post',
    data

  })
}

// 查询报告 /api-teacher/studyReport/info
const studyReport = (data) => {
  return axios({
    url: '/api-teacher/studyReport/info',
    method: 'get',
    params: data

  })
}
// 查看报告新版
const getReviewsInfo = (data) => {
  return axios({
    url: '/api-teacher/studyReport/getReviewsInfo',
    method: 'get',
    params: data

  })
}

// 查询班级声部
const findTeacherClassGroupInfo = (data) => {
  return axios({
    url: '/api-teacher/classGroup/findTeacherClassGroupInfo',
    method: 'get',
    params: data

  })
}
// 获取必须提交的陪练列表
const getNeedPost = (data) => {
  return axios({
    url: '/api-teacher/studyReport/getNeedPost',
    method: 'get',
    params: data

  })
}
// 网管课评论列表/api-teacher/courseReview/getPracticeGroup
const getPracticeGroup = (data) => {
  return axios({
    url: '/api-teacher/courseReview/getPracticeGroup',
    method: 'get',
    params: data

  })
}

// 获取课程头部信息
const getCourseInfoHead = (data) => {
  return axios({
    url: '/api-teacher/courseReview/getCourseInfoHead',
    method: 'get',
    params: data

  })
}

// 提交评论
const courseReviewAdd = (data) => {
  return axios({
    url: '/api-teacher/courseReview/add',
    method: 'post',
    data: data

  })
}
// 修改评论
const updateReviewInfo = (data) => {
  return axios({
    url: '/api-teacher/courseReview/updateReviewInfo',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 获取评论详情
const getReviewInfo = (data) => {
  return axios({
    url: '/api-teacher/courseReview/getReviewInfo',
    method: 'get',
    params: data
  })
}

// 是否有布置练习
const checkeIsAssignHomework = (data) => {
  return axios({
    url: '/api-teacher/teacherCourseHomeworkReply/checkeIsAssignHomework',
    method: 'get',
    params: data
  })
}

// 获取学生列表
const queryStudentsWithTeacher = (data) => {
  return axios({
    url: '/api-teacher/teacherVipGroup/queryStudentsWithTeacher',
    method: 'get',
    params: data
  })
}

// 获取当前老师主分部学生列表
const queryStudentsWithTeacherByOrganId = (data) => {
  return axios({
    url: '/api-teacher/teacherVipGroup/queryStudentsWithTeacherByOrganId',
    method: 'get',
    params: data
  })
}

// 获取双十一学生列表
const queryDouble11Students = (data) => {
  return axios({
    url: '/api-teacher/teacherVipGroup/queryDouble11Students',
    method: 'get',
    params: data
  })
}

// 获取回访记录列表
const geteduVisitList = (data) => {
  return axios({
    url: '/api-teacher/visit/queryPage',
    method: 'get',
    params: data
  })
}

// 添加回访
const visitAdd = (data) => {
  return axios({
    url: '/api-teacher/visit/add',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 添加回访
const visitGetInfo = (data) => {
  return axios({
    url: '/api-teacher/visit/getInfo',
    method: 'get',
    params: data
  })
}

// 乐团主管
const findEducationUsers = (data) => {
  return axios({
    url: '/api-teacher/employeePosition/findOrganPosition',
    method: 'get',
    params: data
  })
}

// 查询资讯详情
const newsQuery = (data) => {
  return axios({
    url: '/api-cms/news/query',
    method: 'get',
    params: data
  })
}

// 资讯列表分页查询
const newsList = (data) => {
  return axios({
    url: '/api-cms/news/list',
    method: 'get',
    params: data
  })
}
// classGroup/getCourseStudents?courseScheduleId=10352
const getCourseStudents = (data) => {
  return axios({
    url: '/api-teacher/classGroup/getCourseStudents',
    method: 'get',
    params: data
  })
}

const queryUserById = (params) => {
  return axios({
    url: '/api-auth/user/queryUserById/' + params.userId,
    method: 'get'
  })
}

const queryPracticeGroupSellPrice = (params) => {
  return axios({
    url: '/api-teacher/teacherPracticeGroup/queryPracticeGroupSellPrice',
    method: 'get',
    params
  })
}

const getPracticeGroupCostCount = (params) => {
  return axios({
    url: '/api-teacher/teacherPracticeGroup/getPracticeGroupCostCount',
    method: 'get',
    params
  })
}

// vip课申请
const practiceGroupApply = (data) => {
  return axios({
    url: api + '/teacherPracticeGroup/practiceGroupApply',
    method: 'post',
    data: data
  })
}

const tenantConfigGet = (data) => {
  return axios({
    url: api + '/tenantConfig/get',
    method: 'get',
    params: data
  })
}

export {
  queryMyCreatedList,
  queryWaitList,
  queryProcessedList,
  subjectFindSubSubjects,
  findSubSubjects,
  vipGroupCategory,
  findByVipGroupCategory,
  findVipSchoolByTeacher,
  schoolAdd,
  schoolDel,
  schoolUpdate,
  findByTeacherAndCategory,
  vipGroupApply,
  vipGroupApplyForDouble11,
  queryVipCourseScheduleList,
  leaveCategoryPage,
  askForLeave,
  getCourseSchedulesWithDate,
  getCourseScheduleDateByMonth,
  classStartDateAdjust,
  courseSwap,
  statisticsInfo,
  statisticsList,
  queryStudentApply,
  querySubByMusicGroupId,
  getRegisterOrPreList,
  updateSubject,
  findVipSchoolByTeacher2,
  getFortuneBag,
  getactiveList,
  addStudyReport,
  studyReport,
  findTeacherClassGroupInfo,
  getReviewsInfo,
  getNeedPost,
  addStudyReport1,
  getPracticeGroup,
  getCourseInfoHead,
  courseReviewAdd,
  updateReviewInfo,
  getReviewInfo,
  checkeIsAssignHomework,
  queryStudentsWithTeacher,
  geteduVisitList,
  visitAdd,
  visitGetInfo,
  findEducationUsers,
  queryDouble11Students,
  newsQuery,
  newsList,
  getCourseStudents,
  queryUserById,
  queryPracticeGroupSellPrice,
  practiceGroupApply,
  getPracticeGroupCostCount,
  queryStudentsWithTeacherByOrganId,
  tenantConfigGet
}
