
import request from '@/utils/request'

// 查询学习任务列表
export function listLearning(query) {
  return request({
    url: '/api/v3/learningtask/list',
    method: 'get',
    params: query
  })
}

// 根据部门查找员工
export function deptEmployees(query) {
  return request({
    url: '/api/v3/departments/employees/recursive',
    method: 'get',
    params: query
  })
}
 
// 根据部门查找员工
export function createLearningTask(data) {
  return request({
    url: '/api/v3/learningtask',
    method: 'post',
    data: data
  })
}

// 更改发布状态
export function learningTaskStatus(data,id) {
  return request({
    url: '/api/v3/learningtask/' + id,
    method: 'put',
    data: data
  })
}

// 获取任务详情
export function getLearningTask(id) {
  return request({
    url: '/api/v3/learningtask/' + id,
    method: 'get'
  })
}