import request from '@/utils/request'

// 查询大华操作日志列表
export function listLog(query) {
  return request({
    url: '/center-monitor/dahuaOperateLog/list',
    method: 'get',
    params: query
  })
}

// 查询大华操作日志详细
export function getLog(query) {
  return request({
    url: '/center-monitor/dahuaOperateLog/getDetailsById',
    method: 'get',
    params: query
  })
}

// 新增大华操作日志
export function addLog(data) {
  return request({
    url: '/center-monitor/dahuaOperateLog',
    method: 'post',
    data: data
  })
}

// 修改大华操作日志
export function updateLog(data) {
  return request({
    url: '/center-monitor/dahuaOperateLog',
    method: 'put',
    data: data
  })
}

// 删除大华操作日志
export function delLog(id) {
  return request({
    url: '/center-monitor/dahuaOperateLog/' + id,
    method: 'delete'
  })
}

// 全量同步大华操作日志
export function getAllDataLog(query) {
  return request({
    url: '/center-monitor/dahuaOperateLog/synchronous',
    method: 'get',
    params: query
  })
}

// 获取设备名称
export function getDeviceNameList() {
  return request({
    url: '/center-monitor/dahuaOperateLog/getDeviceNameList',
    method: 'get'
  })
}
