import request from '@/utils/request'
import { download } from '@/utils/request'

// 查询报警配置列表
export function listHistoryLog(query) {
    return request({
        url: '/IncineratorUsageRecord/IncineratorUsageRecord/list',
        method: 'get',
        params: query
    })
}

// 查询报警配置详细信息
export function getHistoryLog(logId) {
    return request({
        url: '/alarm_record/record/' + logId,
        method: 'get'
    })
}

// 新增报警配置
export function addHistoryLog(data) {
    return request({
        url: '/alarm_record/record',
        method: 'post',
        data: data
    })
}

// 修改报警配置
export function updateHistoryLog(data) {
    return request({
        url: '/alarm_record/record',
        method: 'put',
        data: data
    })
}

// 删除报警配置
export function delHistoryLog(logId) {
    return request({
        url: '/alarm_record/record/' + logId,
        method: 'delete'
    })
}

// 导出报警配置列表
export function downloadHistoryLog(data) {
    download(
        '/IncineratorUsageRecord/IncineratorUsageRecord/export',
        data,
        `HistoryLog_${new Date().getTime()}.xlsx`)
}
