import request from '@/utils/request'

// 查询电厂大屏预警列表
export function listAlarm(query) {
  return request({
    url: '/aspen/alarm/list',
    method: 'get',
    params: query
  })
}

// 查询电厂大屏预警详细
export function getAlarm(id) {
  return request({
    url: '/aspen/alarm/' + id,
    method: 'get'
  })
}

// 新增电厂大屏预警
export function addAlarm(data) {
  return request({
    url: '/aspen/alarm',
    method: 'post',
    data: data
  })
}

// 修改电厂大屏预警
export function updateAlarm(data) {
  return request({
    url: '/aspen/alarm',
    method: 'put',
    data: data
  })
}

// 删除电厂大屏预警
export function delAlarm(id) {
  return request({
    url: '/aspen/alarm/' + id,
    method: 'delete'
  })
}

// 导出电厂大屏预警
export function exportAlarm(query) {
  return request({
    url: '/aspen/alarm/export',
    method: 'get',
    params: query
  })
}