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

// 获取评价数据详情
export const getEvaluationDataDetailApi = (evaluationId:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/evaluationData/queryEvaluationData/${evaluationId}`,
        method: 'get',
    })
}

// 查询评价管理 任务详情
export const getEvaluationTaskDetailApi = (id:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/evaluation/queryEvaluationInfo/${id}`,
        method: 'get',
    })
}


// 查询年级科目数据
export const getSubjectDataApi = (evaluationGradeId:any)=>{
    return request({
        url: `${teacherPrefix}/api/v1/evaluationData/querySubjectData/${evaluationGradeId}`,
        method: 'get',
    })
}
// 新增年级科目
export const addGradeSubjectApi = (data:any)=>{
    return request({
        url: `${teacherPrefix}/api/v1/evaluationData/checkEvaluationSubject`,
        method: 'post',
        data
    })
}

// 删除年级科目
export const deleteGradeSubjectApi = (id:any)=>{
    return request({
        url: `${teacherPrefix}/api/v1/evaluationData/deleteSelectSubject/${id}`,
        method: 'post',
    })
}



// 查询年级选科数据
export const getSubjectSelectedDataApi = (evaluationGradeId:any)=>{
    return request({
        url: `${teacherPrefix}/api/v1/evaluationData/querySelectSubjectData/${evaluationGradeId}`,
        method: 'get',
    })
}
// 新增年级选科
export const addGradeSelectedSubjectApi = (data:any)=>{
    return request({
        url: `${teacherPrefix}/api/v1/evaluationData/checkEvaluationSelectSubject`,
        method: 'post',
        data
    })
}

// 删除年级选科
export const deleteGradeSelectedSubjectApi = (id:any)=>{
    return request({
        url: `${teacherPrefix}/api/v1/evaluationData/deleteChoiceSubject/${id}`,
        method: 'post',
    })
}




// 添加自定义科目数据
export const addCustomSubjectApi = (data:any)=>{
    return request({
        url: `${teacherPrefix}/api/v1/evaluationData/addCustomSubjectData`,
        method: 'post',
        data
    })
}

// 修改自定义科目
export const editCustomSubjectApi = (data:any)=>{
    return request({
        url: `${teacherPrefix}/api/v1/evaluationData/modifyCustomSubjectData`,
        method: 'post',
        data
    })
}

// 删除自定义科目数据 
export const deleteCustomSubjectApi = (id:any)=>{
    return request({
        url: `${teacherPrefix}/api/v1/evaluationData/deleteCustomSubjectData?id=${id}`,
        method: 'post',
    })
}

// 查询年级数据
export const getGradeListApi = (evaluationId:any)=>{
    return request({
        url: `${teacherPrefix}/api/v1/evaluationData/queryGradeData/${evaluationId}`,
        method: 'get',
    })
}

// 修改年级数据  // 新增
export const editGradeApi = (data:any)=>{
    return request({
        url: `${teacherPrefix}/api/v1/evaluationData/modifyGradeInfo`,
        method: 'post',
        data
    })
}


// 删除年级
export const deleteGradeApi = (evaluationGradeId:any)=>{
    return request({
        url: `${teacherPrefix}/api/v1/evaluationData/deleteGradeData/${evaluationGradeId}`,
        method: 'get',
    })
}




// 保存评价数据
export const saveEvaluationDataDetailApi = (data:any)=>{
    return request({
        url: `${teacherPrefix}/api/v1/evaluationData/saveEvaluationData`,
        method: 'post',
        data
    })
}
