import createAxios from '@/utils/request'

//承载能力评估用户查询
export function queyDetailUser(data) {
    return createAxios({
        url: '/advance-boot/carrycapacityuser/queyDetailUser',
        method: 'post',
        data
    })
}
//承载能力评估用户新增
export function addUse(data) {
    return createAxios({
        url: '/advance-boot/carrycapacityuser/add',
        method: 'post',
        data
    })
}
//承载能力评估用户编辑
export function updateUse(data) {
    return createAxios({
        url: '/advance-boot/carrycapacityuser/update',
        method: 'post',
        data
    })
}
//承载能力评估用户批量删除
export function removeUse(data) {
    return createAxios({
        url: '/advance-boot/carrycapacityuser/remove',
        method: 'POST',
        params: data
    })
}
//承载能力评估-台账树
export function carryCapacityTree() {
    return createAxios({
        url: '/advance-boot/carrycapacity/carryCapacityTree',
        method: 'GET'
    })
}
//承载能力评估策略初始化查询
export function queyDetail() {
    return createAxios({
        url: '/advance-boot/carrycapacity/queyDetail',
        method: 'post'
    })
}
// 用户新增承载能力评估策略（电弧炉）
export function adddhl(data) {
    return createAxios({
        url: '/advance-boot/carrycapacity/adddhl',
        method: 'post',
        data
    })
}

//承载能力评估策略初始化查询（电弧炉）
export function queyDetailDhl() {
    return createAxios({
        url: '/advance-boot/carrycapacity/queyDetailDhl',
        method: 'post'
    })
}
//用户新增承载能力评估策略
export function addCarryc(data) {
    return createAxios({
        url: '/advance-boot/carrycapacity/add',
        method: 'post',
        data
    })
}
//承载能力评估策略一键还原
export function restore() {
    return createAxios({
        url: '/advance-boot/carrycapacity/restore',
        method: 'post'
    })
}
//承载能力评估数据查询-主页面
export function queryCarryCapacityData(data) {
    return createAxios({
        url: '/advance-boot/carrycapacity/queryCarryCapacityData',
        method: 'post',
        data
    })
}
//承载能力评估数据查询-无功功率
export function queryCarryCapacityQData(data) {
    return createAxios({
        url: '/advance-boot/carrycapacity/queryCarryCapacityQData',
        method: 'post',
        data
    })
}
//承载能力评估数据查询-谐波电流幅值
export function queryCarryCapacityIData(data) {
    return createAxios({
        url: '/advance-boot/carrycapacity/queryCarryCapacityIData',
        method: 'post',
        data
    })
}
//承载能力评估
export function carryCapacityCal(data) {
    return createAxios({
        url: '/advance-boot/carrycapacity/carryCapacityCal',
        method: 'post',
        data
    })
}
//导出数据集模板
export function getExcelTemplate() {
    return createAxios({
        url: '/advance-boot/carrycapacity/getExcelTemplate',
        method: 'get',
        responseType: 'blob'
    })
}
//上传数据集
export function uploadExcel(file: any, data: any) {
    let form = new FormData()
    form.append('file', file)
    form.append('lineId', data.lineId)
    form.append('startTime', data.startTime)
    form.append('endTime', data.endTime)
    return createAxios({
        url: '/advance-boot/carrycapacity/uploadExcel',
        method: 'post',
        data: form
    })
}

// 查询用户额定容量
export function getLineDetailData(data) {
    return createAxios({
        url: '/device-boot/line/getLineDetailData',
        method: 'POST',
        params: data
    })
}
// 承载能力评估_充电站、电加热负荷、电气化铁路承载能力评估
export function carryCapacityEvaluate(data) {
    return createAxios({
        url: '/advance-boot/carrycapacity/carryCapacityEvaluate',
        method: 'POST',
        data
    })
}
// 承载能力评估用户批量删除
export function remove(data) {
    return createAxios({
        url: '/advance-boot/result/remove',
        method: 'POST',
        params: data
    })
}
// 承载能力评估用户终端查询
export function queyDeviceList(data) {
    return createAxios({
        url: '/advance-boot/carrycapacitydev/queyDeviceList',
        method: 'POST',
        data
    })
}
// 新增终端
export function addDev(data) {
    return createAxios({
        url: '/advance-boot/carrycapacitydev/add',
        method: 'POST',
        data
    })
}
// 修改终端
export function updateDev(data) {
    return createAxios({
        url: '/advance-boot/carrycapacitydev/update',
        method: 'POST',
        data
    })
}
// 删除终端
export function removeDev(data) {
    return createAxios({
        url: '/advance-boot/carrycapacitydev/remove',
        method: 'POST',
        params: data
    })
}

// 模型训练
export function modelTraining(data) {
    return createAxios({
        url: '/advance-boot/carrycapacity/modelTraining',
        method: 'POST',
         data
    })
}
// 查询是否有承载能力评估
export function queryResultbyCondition(data) {
    return createAxios({
        url: '/advance-boot/result/queryResultbyCondition',
        method: 'POST',
         data
    })
}
