import request from '@/utils/request'

// 查询个人体质检测报告列表
export function listPersonalCheckReport(query) {
    return request({
        url: '/system/personalCheckReport/list',
        method: 'get',
        params: query
    })
}


// 个人详细
export function existCheckReport(studentId, batchCode) {
    return request({
        url: `/system/personalCheckReport/existCheckReport?studentId=${studentId}&batchCode=${batchCode}`,
        method: 'get'
    })
}

// 修改个人体质检测报告
export function updatePersonalCheckReport(data) {
    return request({
        url: '/system/personalCheckReport/edit',
        method: 'post',
        data: data
    })
}

// // 删除个人体质检测报告
// export function delPersonalCheckReport(id) {
//     return request({
//         url: '/system/personalCheckReport/' + id,
//         method: 'delete'
//     })
// }


// 幼儿报告预览
export function checkReportreport(studentId, batchCode) {
    return request({
        url: `/system/checkReport/report?studentId=${studentId}&batchCode=${batchCode}`,
        method: 'POST'
    })
}


// 幼儿报告下载
export function report(id) {
    return request({
        url: `/system/personalCheckReport/download?id=${id}`,
        method: 'POST',
        responseType: 'blob'
    })
}



// 幼儿个人报告上传接口
export function uploadPersonalCheckReport(data) {
    return request({
        url: `/system/personalCheckReport/uploadPersonalCheckReport `,
        method: 'POST',
        data
    })
}