import request from '@/utils/request'


// 圆环列表
export function treeselect(query) {
  return request({
    url: '/sts/smsts/' + query ,
    method: 'get'
  })
}

// 圆环列表上部

export function listTsde(query) {
  return request({
    url: '/boman-web-core/index/stsByCzrkHomePage' ,
    method: 'get'
  })
}



// 查询设备信息列表
export function listDevice(query) {
  return request({
    url: '/sts/per/school/smmx',
    method: 'get',
    params: query
  })
}



// 折线图
export function listzhex(query) {
  return request({
    url: '/boman-web-core/index/hjczLine',
    method: 'get',
    params: query
  })
}

// 雷达图
export function listleida(query) {
  return request({
    url: '/sts/echarts1 ',
    method: 'get',
    params: query
  })
}
// 底部圆环数据
export function listdbyh(query) {
  return request({
    url: '/sts/echarts2 ',
    method: 'get',
    params: query
  })
}
// 柱状图数据
export function listzhuzh(query) {
  return request({
    url: '/sts/echarts3 ',
    method: 'get',
    params: query
  })
}


// 查询设备信息详细
export function getDevice(id) {
  return request({
    url: '/school/device/' + id,
    method: 'get'
  })
}

// 新增设备信息
export function addDevice(data) {
  return request({
    url: '/school/device',
    method: 'post',
    data: data
  })
}

// 修改设备信息
export function updateDevice(data) {
  return request({
    url: '/school/device',
    method: 'put',
    data: data
  })
}

// 删除设备信息
export function delDevice(id) {
  return request({
    url: '/school/device/' + id,
    method: 'delete'
  })
}

// 导出
export function exportPost(query) {
  return request({
    url: '/sts/per/school/smmx/export',
    method: 'get',
    params: query
  })
}
