import request from '@/config/axios'

// 获取隧道设施列表
export const getTunnelBasics = (params) => {
  return request.get({ url: '/qxsd/tunnelbase/page', params })
}

// 创建隧道设施
export const tunnelCreate = (data) => {
  return request.post({ url: '/qxsd/tunnelbase/create', data })
}

// 更新隧道设施
export const tunnelUpdate = (data) => {
  return request.put({ url: '/qxsd/tunnelbase/update', data })
}

// 删除隧道设施
export const tunnelDelete = (params) => {
  return request.delete({ url: '/qxsd/tunnelbase/delete', params })
}

// 获取隧道设施详情
export const getTunnelDetail = (params) => {
  return request.get({ url: '/qxsd/tunnelbase/get', params })
}

// 获取隧道设备
export const getEquipmentBasics = (params) => {
  return request.get({ url: '/qxsd/device/page', params })
}

// 创建隧道设备
export const equipmentCreate = (data) => {
  return request.post({ url: '/qxsd/device/create', data })
}

// 更新隧道设备
export const equipmentUpdate = (data) => {
  return request.put({ url: '/qxsd/device/update', data })
}

// 删除隧道设备
export const equipmentDelete = (params) => {
  return request.delete({ url: '/qxsd/device/delete', params })
}

// 获取摄像机
export const getTunnelCameras = (params) => {
  return request.get({ url: '/qxsd/device/listByHole', params })
}

// 导出 excel
export const importOutTunnelCameras = (params?) => {
  return request.download({ url: '/qxsd/tunnel-equipment/export-excel', params })
}

// 导入
export const importTunnelCameras = (params?) => {
  return request.post({ url: '/qxsd/tunnel-equipment/import', params })
}

// 隧道启用
export const enableFacility = (params?) => {
  return request.get({ url: '/qxsd/tunnelbase/enable', params })
}

// 隧道禁用
export const disEnableFacility = (params?) => {
  return request.get({ url: '/qxsd/tunnelbase/disEnable', params })
}

// 获取启用隧道
export const getEnableList = (params?) => {
  return request.get({ url: '/qxsd/tunnelbase/enableList', params })
}