import request from '@/utils/request'

// 获取路由
export const getDevcieApp = () => {
  return request({
    url: '/app/common/appInfo',
    method: 'get'
  })
}

// 我的设备列表
export const getDeviceList = (query) => {
  return request({
    url: '/iot/device/list',
    method: 'get',
    params: query
  })
}

// app 警告分析
export const getWarningAnalysis = (query) => {
  return request({
    url: '/app/index/warning-analysis',
    method: 'get',
    params: query
  })
}

// 首页数据
export function homeCount(query) {
  return request({
    url: '/app/index',
    method: 'get',
    params: query
  })
}

// app 项目设备
export function appProjectDeviceList(query) {
  return request({
    url: '/app/device/table',
    method: 'get',
    params: query
  })
}

// app 项目列表
export function appProjectList(query) {
  return request({
    url: '/app/project/list',
    method: 'get',
    params: query
  })
}

// app 告警列表
export function appAlarmRecordList(query) {
  return request({
    url: '/app/alarm/table',
    method: 'get',
    params: query
  })
}

// app 模型统计
export function appDeviceStatistics(query) {
  return request({
    url: '/app/index/device-statistics',
    method: 'get',
    params: query
  })
}
