import request, { download, downloadFile } from '@/utils/request';
import { AxiosPromise } from 'axios';
// 查询培训列表
export const trainingList = (query?: any): AxiosPromise => {
    return request({
        url: '/dgtmedicine/training/list',
        method: 'get',
        params: query
    });
};
// 会议新增
export const trainingAdd = (data: any): AxiosPromise => {
    return request({
        url: '/dgtmedicine/training/add',
        method: 'post',
        data
    });
};
// 会议修改
export const trainingUpdate = (data: any): AxiosPromise => {
    return request({
        url: '/dgtmedicine/training/edit',
        method: 'post',
        data
    });
};
// 会议详情
export const trainingDetail = (id: string): AxiosPromise => {
    return request({
        url: `/dgtmedicine/training/getInfo/${id}`,
        method: 'get'
    });
};
// 会议状态统计
export const queryTrainingCount = (query?: any): AxiosPromise => {
    return request({
        url: '/dgtmedicine/training/queryTrainingCount',
        method: 'get',
        params: query
    });
};
// 会议删除
export const trainingDelete = (id: string): AxiosPromise => {
    return request({
        url: `/dgtmedicine/training/delById/${id}`,
        method: 'get'
    });
};
// 会议上架
export const publishTraining = (id: string): AxiosPromise => {
    return request({
        url: `/dgtmedicine/training/publishTraining/${id}`,
        method: 'get'
    });
};
// 会议下架
export const unpublishTraining = (id: string): AxiosPromise => {
    return request({
        url: `/dgtmedicine/training/unpublishTraining/${id}`,
        method: 'get'
    });
};
// 会议详情
export const trainingDetailById = (id: string): AxiosPromise => {
    return request({
        url: `/dgtmedicine/training/getInfo/${id}`,
        method: 'get'
    });
};
// 当前会议下报名成员
export const trainingMembers = (params: any): AxiosPromise => {
    return request({
        url: `/dgtmedicine/trainingSignup/list`,
        method: 'get',
        params
    });
};
