import request from '@/utils/request'

// 查询报警信息列表
export function listSysAlarm (query) {
  return request({
    url: '/system/sysAlarm/list',
    method: 'get',
    params: query
  })
}

// 查询报警信息详细
export function getSysAlarm (id) {
  return request({
    url: '/system/sysAlarm/' + id,
    method: 'get'
  })
}

// 新增报警信息
export function addSysAlarm (data) {
  return request({
    url: '/system/sysAlarm',
    method: 'post',
    data: data
  })
}

// 修改报警信息
export function updateSysAlarm (data) {
  return request({
    url: '/system/sysAlarm',
    method: 'put',
    data: data
  })
}

// 删除报警信息
export function delSysAlarm (id) {
  return request({
    url: '/system/sysAlarm/' + id,
    method: 'delete'
  })
}

// 导出报警信息
export function exportSysAlarm (query) {
  return request({
    url: '/system/sysAlarm/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/system/sysAlarm/getInitData/' + dictTypes,
    method: 'get'
  })
}
