import request from '@/utils/request'
//个人资源库管理

// 新增/编辑
export function add(data) {
  return request({
    url: '/web/person/resources/addPersonResource',
    method: 'post',
    data: data
  })
}
// 新增/编辑
export function update (data) {
  return request({
    url: '/web/person/resources',
    method: 'put',
    data: data
  })
}
// 详情
export function getInfo(resourcesId) {
  return request({
    url: '/web/person/resources/getPersonResourceInfo',
    method: 'get',
    params: {
    	resourcesId
    }
  })
}
// 删除
export function remove(resourcesIds) {
  return request({
    url: '/web/person/resources/deletePersonResources?resourcesIds='+resourcesIds,
    method: 'delete',
  })
}
export function modifyPersonResourceInfo (data) {
  return request({
    url: '/web/person/resources/modifyPersonResourceInfo',
    method: 'put',
    data: data
  })
}

// 列表
export function list(params) {
  return request({
    url: '/web/person/resources/getPersonResources',
    method: 'get',
     params: params
  })
}
// 导出
export function exportList(params) {
  return request({
    url: '/web/person/resources/export',
    method: 'get',
    params: params
  })
}
// 上传致云库
export function upToCloudResourse(params) {
  return request({
    url: '/web/person/resources/upToCloudResourse',
    method: 'post',
    params:params
  })
}
// 上传校本资源库
export function upToSchoolResourse(params ) {
  return request({
    url: '/web/person/resources/upToSchoolResourse',
    method: 'post',
    params:params
  })
}
// 上传至班牌
export function upToSchoolClass(params) {
  return request({
    url: '/web/person/resources/uploadToBoard',
    method: 'post',
    params:params
  })
}
// 上传至学生端
export function upToSchoolStudent(params) {
  return request({
    url: '/web/person/resources/uploadToStudent',
    method: 'post',
    params:params
  })
}
// 上传至家长端
export function upToSchoolParent(params) {
  return request({
    url: '/web/person/resources/uploadToParent',
    method: 'post',
    params:params
  })
}

// 上传至题库
export function updataQuestion(params ) {
  return request({
    url: '/web/person/resources/upToQuestion',
    method: 'post',
    params:params
  })
}
//登录人数统计
export function getUserStats(params){
  return request({
    url: '/front/v2/studyRecord/getUserStats',
    method: 'get',
    params:params
  })
}
export function getUserStatsTotal(params){
  return request ({
    url:'/front/v2/studyRecord/getUserStatsTotal',
    methods:'get',
    params:params
   })
  }
// 系统使用-科目统计
export function getSysStatsForCourse(params) {
  return request({
    url: '/front/v2/studyRecord/getSysStatsForCourse',
    method: 'get',
    params: params
  })
}
//视频观看统计
export function getUserVideoStats(params) {
  return request({
    url: '/front/v2/studyRecord/getUserVideoStats',
    method: 'get',
    params: params
  })
}
//做题统计
export function getUserQuestionStats(params) {
  return request({
    url: '/front/v2/studyRecord/getUserQuestionStats',
    method: 'get',
    params: params
  })
}
//微课观看统计
export function getUserMicroClassStats(params) {
  return request({
    url: '/front/v2/studyRecord/getUserMicroClassStats',
    method: 'get',
    params: params
  })
}
export function getSysStats(params) {
  //科目明细
  return request({
    url: '/front/v2/studyRecord/getSysStats',
    method: 'get',
    params: params
  })
}
export function getUserStatsSummary(params){
  //学生统计-总体
  return request({
    url:'/front/v2/studyRecord/getUserStatsSummary',
    method: 'get',
    params: params
  })
}
//
export function getUserVideoStatsTotal(params){
  //学生视频观看总数
  return request({
    url:'/front/v2/studyRecord/getUserVideoStatsTotal',
    method: 'get',
    params: params
  })
}
export function getUserQuestionStatsTotal(params){
  //学生视频观看总数
  return request({
    url:'/front/v2/studyRecord/getUserQuestionStatsTotal',
    method: 'get',
    params: params
  })
}
export function getUserMicroClassStatsTotal(params){
//学生微课观看总数
return request({
  url:'/front/v2/studyRecord/getUserMicroClassStatsTotal',
  method: 'get',
  params: params
})
}
