import request from '@/utils/request'

// 查询设备列列表
export function listAlgorithmConfiguration(data) {
  return request({
    // url: '/select_com_algorithm_configuration.cgi',
	url: '/database_op/query_com_algorithm_params_condition.cgi',
    method: 'get',
    params: data
  })
}

// 查询设备列详细
export function getAlgorithmConfiguration(id) {
  return request({
    url: '/database_op/query_com_algorithm_params_mainkey.cgi',
    method: 'get',
	params: {
	  algorithm_configuration_id: id
	}
  })
}
// 新增设备列
export function addAlgorithm(data) {
  return request({
    url: '/database_op/insert_com_algorithm_params.cgi',
    method: 'post',
    data: data
  })
}

// 修改设备列
export function updateAlgorithm(data) {
  return request({
    url: '/database_op/update_com_algorithm_params.cgi',
    method: 'post',
    data: data
  })
}
// 删除设备列
export function delAlgorithm(id) {
  return request({
    url: '/database_op/delete_com_algorithm_params.cgi',
    method: 'post',
    data: {
      algorithm_configuration_id: id
    }
  })
}
// 新增区域绘制
export function addAlarmArea(data) {
  return request({
    url: '/database_op/insert_com_alarm_area.cgi',
    method: 'post',
    data: data
  })
}
// 查询区域绘制
export function getAlarmArea(data) {
  return request({
    url: '/database_op/query_com_alarm_area_condition.cgi',
    method: 'get',
    params: data
  })
}
// 修改绘制区域
export function updateAlarmArea(data) {
  return request({
    url: '/database_op/update_com_alarm_area.cgi',
    method: 'post',
    data: data
  })
}
// 查询算法侧边栏
export function getAlarmType(data) {
  return request({
    url: '/database_op/query_com_algorithm_params_condition.cgi',
    method: 'get',
    params: data
  })
}