import request from '@/utils/request'

// 查询重要风险点管控列表
export function listInfor(query) {
  return request({
    url: '/risk/info/list',
    method: 'get',
    params: query
  })
}

// 查询重要风险点管控详细
export function getInfor(fRiskDevMajInforId) {
  return request({
    url: '/risk/info/' + fRiskDevMajInforId,
    method: 'get'
  })
}

// 查询重要风险点管控详细
export function getInforForDetail(fRiskDevMajInforId) {
  return request({
    url: '/risk/info/getInfoForDetail/' + fRiskDevMajInforId,
    method: 'get'
  })
}
// 新增重要风险点管控
export function addInfor(data) {
  return request({
    url: '/risk/info',
    method: 'post',
    data: data
  })
}

// 修改重要风险点管控
export function updateInfor(data) {
  return request({
    url: '/risk/info',
    method: 'put',
    data: data
  })
}

// 删除重要风险点管控
export function delInfor(fRiskDevMajInforId) {
  return request({
    url: '/risk/info/' + fRiskDevMajInforId,
    method: 'delete'
  })
}

// 导出重要风险点管控
export function exportInfor(query) {
  return request({
    url: '/risk/info/export',
    method: 'get',
    params: query
  })
}

// 上报政府端
export function reportRiskInfo(data) {
  return request({
    url: '/risk/info/reportRiskInfo',
    method: 'get',
    params: data
  })
}

// 上报企业端
export function entReportRiskInfo(data) {
  return request({
    url: '/risk/info/entReportRiskInfo',
    method: 'get',
    params: data
  })
}

// 查询无绑定的关联设备信息
export function getDdeviceDetailInfo(data) {
  return request({
    url: '/device/device/selectDetailInfo',
    method: 'post',
    data: data
  })
}

// 新增关联设备信息
export function addDetailInfos(data) {
  return request({
    url: '/device/device/insertDetailInfo',
    method: 'post',
    data: data
  })
}

// 删除关联设备信息
export function deleteDetailInfo(deviceId) {
  return request({
    url: '/device/device/deleteDetailInfo',
    method: 'delete',
    data: deviceId
  })
}

// 解除空间与关联设备关系
export function deleteDeviceDetailInfo(deviceId) {
  return request({
    url: '/device/device/deleteDeviceDetailInfo',
    method: 'delete',
    data: deviceId
  })
}

// 删除关联设备信息（批量）
export function deleteeListDetailInfo(deviceId) {
  return request({
    url: '/device/device/deleteeListDetailInfo',
    method: 'delete',
    data: deviceId
  })
}

// 查询已经关联的关联设备信息
export function selectDetailInfoList(data) {
  return request({
    url: '/device/device/selectDetailInfoList',
    method: 'post',
    data: data
  })
}

// 修改关联设备绑定
export function updateDetailInfoLists(data) {
  return request({
    url: '/device/device/updateDetailInfoList',
    method: 'post',
    data: data
  })
}
