/*
 * @Author: zjq
 * @description 培训计划
 */
import request from '@/utils/request';

/**
 * @description 新增培训计划
 * @param {object} data
 */
export const addTrainPlan = (data: object) => {
    return request({
        url: '/api/v1/TrainPlan/Add',
        method: 'post',
        data,
    });
};
/**
 * @description 编辑培训计划
 * @param {object} data
 */
export const editTrainPlan = (data: object) => {
    return request({
        url: '/api/v1/TrainPlan/Update',
        method: 'put',
        data,
    });
};
/**
 * @description 删除培训计划
 * @param {object} data
 */
export const deleteTrainPlan = (data: object) => {
    return request({
        url: '/api/v1/TrainPlan/Delete',
        method: 'delete',
        data,
    });
};
/**
 * @description 获取培训计划列表
 * @param {object} params
 */
export const getTrainPlanData = (params?: object) => {
    return request({
        url: '/api/v1/TrainPlan/GetPagedList',
        method: 'post',
        data: params,
    });
};
/**
 * @description 查询培训计划详情
 * @param {object} Id
 */
export const getTrainPlanDetail = (Id: string) => {
    return request({
        url: `/api/v1/TrainPlan/Get?id=${Id}`,
        method: 'get',
    });
};