/*
 * @Author: zjq
 * @description 抽题规则
 */
import request from '@/utils/request';

/**
 * @description 新增抽题规则
 * @param {object} data
 */
export const addExtractRule = (data: object) => {
    return request({
        url: '/api/v1/ExtractRule/Add',
        method: 'post',
        data,
    });
};
/**
 * @description 编辑抽题规则
 * @param {object} data
 */
export const editExtractRule = (data: object) => {
    return request({
        url: '/api/v1/ExtractRule/Update',
        method: 'put',
        data,
    });
};
/**
 * @description 删除抽题规则
 * @param {object} data
 */
export const deleteExtractRule = (data: object) => {
    return request({
        url: '/api/v1/ExtractRule/Delete',
        method: 'delete',
        data,
    });
};
/**
 * @description 获取抽题规则列表
 * @param {object} params
 */
export const getExtractRuleData = (params?: object) => {
    return request({
        url: '/api/v1/ExtractRule/GetPagedList',
        method: 'post',
        data: params,
    });
};
/**
 * @description 查询抽题规则详情
 * @param {object} Id
 */
export const getExtractRuleDetail = (Id: string) => {
    return request({
        url: `/api/v1/ExtractRule/Get?id=${Id}`,
        method: 'get',
    });
};
/**
 * @description 获取标签题库
 * @param {object} data
 */
export const getTagQuestionCount = (data: object) => {
    return request({
        url: '/api/v1/ExtractRule/GetTagQuestionCount',
        method: 'post',
        data,
    });
};
/**
 * @description 获取列表全部数据
 * @param {number} examType
 */
export const getExtractRuleAllList = () => {
    return request({
        url: `/api/v1/ExtractRule/GetList`,
        method: 'get',
    });
};