import request from '@/utils/request.js'

export const getTunnelList = (params) => {
  return request({
    url: '/tunnel/tunnel/screen/list',
    method: 'get',
    params
  })
}
export const getTunnelDetail = (tunnelId) => {
  return request({
    url: `/tunnel/tunnel/${tunnelId}`,
    method: 'get'
  })
}
export const addTunnel = (data) => {
  return request({
    url: '/tunnel/tunnel',
    method: 'post',
    data
  })
}
export const deleteTunnel = (tunnelIdList) => {
  return request({
    url: `/tunnel/tunnel/${tunnelIdList}`,
    method: 'delete'
  })
}
//设备信息列表
export const getEquipmentList = (tunnelId) => {
  return request({
    url: '/tunnel/equipment/equipments',
    method: 'get',
    params:{
      tunnelId:tunnelId
    }
  })
}
export const editTunnel = (data) => {
  return request({
    url: '/tunnel/model/details',
    method: 'put',
    data
  })
}
//设备管理-风机设备信息修改
export const editFan = (data) => {
  return request({
    url: '/tunnel/equipment/frequency/equipments',
    method: 'put',
    data
  })
}
export const editEquipment = (data) => {
  return request({
    url: '/tunnel/equipment/equipments',
    method: 'put',
    data
  })
}
