import request from '@/utils/request';
// 初始化树结构
export function getTreeAreaDeviceSelect(query) {
  if (query) {
    return request({
      url: `/basedata/devicetype/getCommpTypeTreeSelectByMainDevicetypeId?devicetypeId=${query}`,
      method: 'get',
      // params: query
    })
  } else {
    return request({
      url: `/basedata/devicetype/getCommpTypeTreeSelectByMainDevicetypeId`,
      method: 'get',
      // params: query
    })
  }
}
// 点击树结构
export function cilikList(query) {
  return request({
    url: `/basedata/patrolpointmnt/stdpatrolpoint/list?mainDevicetypeId=${query}`,
    method: 'get',
  })
}

// 数据格式
export function dataFormat(query) {
  return request({
    url: `/system/dict/data/type/data_format`,
    method: 'get',
  })
}
// 设备分类
export function devicetype(query) {
  return request({
    url: `/basedata/devicetype/list?powerMainEquFlag=Yes`,
    method: 'get',
  })
}
// 添加
export function add(query) {
  return request({
    url: `/basedata/patrolpointmnt/stdpatrolpoint/addBatchList`,
    method: 'post',
    data: query
  })
}

// 删除
export function remove(query) {
  return request({
    url: `/basedata/patrolpointmnt/stdpatrolpoint/remove/${query}`,
    method: 'post',
  })
}

// 设置智能识别类型父级
export function algList(query) {
  return request({
    url: `/basedata/alg/list`,
    method: 'get',
  })
}
// 设置智能识别类型子级
export function subtypeList(query) {
  return request({
    url: `/basedata/subtype/list`,
    method: 'get',
  })
}