/*
 * @Author: 纪泽龙 jizelong@qq.com
 * @Date: 2022-09-23 11:02:24
 * @LastEditors: 纪泽龙 jizelong@qq.com
 * @LastEditTime: 2022-09-28 16:58:26
 * @FilePath: /danger-manage-web/src/api/train/trainingProgram.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'
//培训计划管理


// 获取所有培训人员类型
export function getPersonnel(query) {
  return request({
    url: '/system/post/optionselect',
    method: 'get',
    params: query
  })
}
// 新增培训计划
export function addPlan(data) {
  return request({
    url: '/train/plan',
    method: 'post',
    data: data
  })
}

// 编辑培训计划
export function editPlan(data) {
  return request({
    url: '/train/plan',
    method: 'put',
    data: data
  })
}
// 培训计划列表
export function getPlanList(query) {
  return request({
    url: '/train/plan/list',
    method: 'get',
    params: query
  })
}

// 培训计划列表
export function deletePlan(query) {
  return request({
    url: '/train/plan/deleteOne',
    method: 'delete',
    params: query
  })
}
export function getPlan(query) {
  return request({
    url: '/train/plan/'+ query,
    method: 'get',
  })
}


