import request from "@/utils/request";
import {BASE_URL} from '@/config'

export const getSubjectList = () => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/base/getSubjectList`,
        params:{
            type:0,
            stage:3
        }
    });
};

export const getSchoolAreaList = (params) => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/base/getDistrictListNew`,
        params:{
            ...params,
            stage:3
        }
    });
};


export const getCurrentSelected = () => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/base/queryNewExam`,
        params:{
            stage:3
        }
    });
};


export const getExam = (data) => {
    return request({
        method: 'post',
        url: `${BASE_URL}/exam-data/base/queryExam`,
        data:{
            ...data,
            stage:3
        }
    });
};


export const getSubjectListAll = () => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/base/getSubjectListALL`,
        params:{
            stage:3
        }
    });
}


export const getGradeEnum = () => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/base/getTermList`,
        params:{
            stage:3
        }
    });
}


export const getSemesterEnum = () => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/base/getSemesterList`,
        params:{
            stage:3
        }
    });
}

export const getExamEnum = () => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/base/getExamNameList`,
        params:{
            stage:3
        }
    });
}

export const getNoSingleSubject = () => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/base/getSubjectListNoSingle`,
        params:{
            stage:3
        }
    });
}

export const getSort = (params) => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/base/getSortItemList`,
        params:{
            stage:3,
            ...params,
        }
    });
}

export const getPercent = () => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/base/getRateItemList`,
        params:{
            stage:3
        }
    });
}

export const getParamsType = () => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/base/getParamTypeItemList`,
        params:{
            stage:3
        }
    });
}


export const getNoSingleCombine = () => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/base/getSubjectListNoSingleCombine`,
        params:{
            stage:3
        }
    });
    
}
export const getSubjectListCombineList  =() => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/base/getSubjectListCombine`,
        params:{
            stage:3
        }
    });
}



export const getDataExplain  =(params) => {
    
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/base/getExamDescription`,
        params:{
            ...params,
            stage:3
        }
    });
}

// 获取学段
export const getStageList  =(params) => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/common/getStageWithRole`,
        params,
    });
}

// 获取学科列表

export const getSubjectListSelect  =(params) => {
    return request({
        method: 'get',
        url: `${BASE_URL}/exam-data/common/getSubjectList`,
        params,
    });
}