import request from '@/utils/request'

// 查询监控单元类型列表
export function listMonitorUnitType(query) {
  return request({
    url: '/business/monitorUnitType/list',
    method: 'get',
    params: query
  })
}

// 查询监控单元类型详细
export function getMonitorUnitType(monitorUnitTypeId) {
  return request({
    url: '/business/monitorUnitType/' + monitorUnitTypeId,
    method: 'get'
  })
}

// 新增监控单元类型
export function addMonitorUnitType(data) {
  return request({
    url: '/business/monitorUnitType',
    method: 'post',
    data: data
  })
}

// 修改监控单元类型
export function updateMonitorUnitType(data) {
  return request({
    url: '/business/monitorUnitType',
    method: 'put',
    data: data
  })
}

// 删除监控单元类型
export function delMonitorUnitType(monitorUnitTypeId) {
  return request({
    url: '/business/monitorUnitType/' + monitorUnitTypeId,
    method: 'delete'
  })
}

//查询租户id与名称
export function getTenantName() {
  return request({
    url: '/business/tenant/tenantIdAndName',
    method: 'get'
  })
}
//获取当前用户是否为admin
export function getIsNeedTenant(){
  return request({
    url:'/business/scene/isAdmin',
    method:'get'
  })
}
//查询场景id与名称
export function getSceneName(){
  return request({
    url: '/business/scene/sceneIdAndName',
    method: 'get'
  })
}
