import request from '@/utils/request'

/**
 * 高差边长方向值计算
 */
export function calculate(data) {
    return request({
        url: `/calculate/eleDifSideLandDir/calculate`,
        method: 'post',
        data: data
    })
}

/**
 * 导入Excel数据
 */
export function importExcel(data) {
    return request({
        url: `/calculate/eleDifSideLandDir/import`,
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}

/**
 * 导出计算结果
 */
export function exportExcel(data) {
    return request({
        url: `/calculate/eleDifSideLandDir/export`,
        method: 'post',
        data: data,
        responseType: 'blob'
    })
}

/**
 * 下载导入模板
 */
export function downloadTemplate() {
    return request({
        url: '/calculate/eleDifSideLandDir/template',
        method: 'get',
        responseType: 'blob'
    })
}

/**
 * 获取工作表名称
 */
export function getSheetNames(data) {
    return request({
        url: '/calculate/eleDifSideLandDir/sheetNames',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}