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

// 查询 问卷列表 带分页
export const getQuestionnaireListApi = (data:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/assessment/teacherAssessmentList`,
        method: 'post',
        data
    })
}


//  查询所有的问卷列表
export const getAllQuestionnaireListApi = ()=>{
    return request({
        url: `${teacherPrefix}/api/v1/assessment/assessmentAllList`,
        method: 'get',
    })
}


// 新增问卷
export const addQuestionnaireApi = (data:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/assessment/addTeacherAssessments`,
        method: 'post',
        data
    })
}

// 编辑问卷
export const editQuestionnaireApi = (data:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/assessment/modifyTeacherAssessments`,
        method: 'post',
        data
    })
}


// 删除问卷
export const deleteQuestionnaireApi = (id:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/assessment/delTeacherAssessments/${id}`,
        method: 'get',
    })
}

// 查询问卷 详情
export const getQuestionnaireDetailApi = (id:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/assessment/teacherAssessmentDetail/${id}`,
        method: 'get',
    })
}


// 复制问卷
export const copyQuestionnaireApi = (id:any) => {
    return request({
        url: `${teacherPrefix}/api/v1/assessment/assessmentCopyData/${id}`,
        method: 'get',
    })
}
