/*
 * @Author: zjq
 * @description 人工组卷
 */
import request from '@/utils/request';

/**
 * @description 新增人工组卷
 * @param {object} data
 */
export const addTestPaper = (data: object) => {
    return request({
        url: '/api/v1/TestPaper/Add',
        method: 'post',
        data,
    });
};
/**
 * @description 编辑人工组卷
 * @param {object} data
 */
export const editTestPaper = (data: object) => {
    return request({
        url: '/api/v1/TestPaper/Update',
        method: 'put',
        data,
    });
};
/**
 * @description 删除人工组卷
 * @param {object} data
 */
export const deleteTestPaper = (data: object) => {
    return request({
        url: '/api/v1/TestPaper/Delete',
        method: 'delete',
        data,
    });
};
/**
 * @description 获取人工组卷列表
 * @param {object} params
 */
export const getTestPaperData = (params?: object) => {
    return request({
        url: '/api/v1/TestPaper/GetPagedList',
        method: 'post',
        data: params,
    });
};
/**
 * @description 查询人工组卷详情
 * @param {any} Id
 */
export const getTestPaperDetail = (Id: any) => {
    return request({
        url: `/api/v1/TestPaper/Get?id=${Id}`,
        method: 'get',
    });
};
/**
 * @description 满足条件试题数量
 * @param {object} params
 */
export const getTagQuestionCount = (params: object) => {
    return request({
        url: `/api/v1/TestPaper/GetTagQuestionCount`,
        method: 'post',
        data: params,
    });
};
/**
 * @description 随机试题生成试题列表
 * @param {object} params
 */
export const getSecondsetQuestions = (params: object) => {
    return request({
        url: `/api/v1/TestPaper/GetQuestions`,
        method: 'post',
        data: params,
    });
};
/**
 * @description 获取列表全部数据
 * @param {number} examType
 */
export const getTestPaperAllList = () => {
    return request({
        url: `/api/v1/TestPaper/GetList`,
        method: 'get',
    });
};