import request from '../utils/request.js'
let teacherPrefix = import.meta.env.VITE_API_TEACHER_PRE 

// 查询可选班级列表数据
export const getAlternativeClassDataApi = (data:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/codeBind/queryClassData`,
        method: 'post',
        data
    })
}


// 查询班级编号对应表格数据
export const getClassNumberMappingDataApi = (data:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/codeBind/queryCodeBindData`,
        method: 'post',
        data
    })
}

// 添加编号对应的单元格数据
export const setClassNumberMappingDataApi = (data:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/codeBind/setCodeBindData`,
        method: 'post',
        data
    })
}

// 删除一行班级数据
export const deleteRowClassNumberMappingDataApi = (data:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/codeBind/deleteCodeBindByCode`,
        method: 'post',
        data
    })
}


// 增加一行班级编号数据
export const addRowClassNumberMappingDataApi = (data:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/codeBind/addCustomClass`,
        method: 'post',
        data
    })
}

// 编号对应完成操作
export const finishNumberMappingDataApi = (evaluationId:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/codeBind/finishCodeBind/${evaluationId}`,
        method: 'get',
    })
}



// 删除编号对应关系中的一个班级数据
export const deleteCodeMappinClassApi = (id:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/codeBind/deleteCodeBindData/${id}`,
        method: 'get',
    })
}