import request from '@/utils/request'

// 查询报警记录列表
export function listRecord(query) {
    return request({
        url: '/iot/record/list',
        method: 'get',
        params: query
    })
}

// 查询报警记录详细
export function getRecord(recordId) {
    return request({
        url: '/iot/record/' + recordId,
        method: 'get'
    })
}

// 修改报警记录
export function updateRecord(data) {
    return request({
        url: '/tenant/record',
        method: 'put',
        data: data
    })
}

// 删除报警记录
export function delRecord(recordId) {
    return request({
        url: '/iot/record/' + recordId,
        method: 'delete'
    })
}

// 导出报警记录
export function exportRecord(query) {
    return request({
        url: '/iot/record/export',
        method: 'get',
        params: query
    })
}

// 新增报警记录
export function addAlarmRecord(data) {
  return request({
      url: '/iot/maintenance/',
      method: 'post',
      data: data
  })
}
