import { request } from "@/utils/request";

/**
 * 获取设备实时数据列表
 * @param params
 */
export const getDeviceRealTimeDataList = (params) =>
  request({
    url: '/rq/iot-device/td/page/app',
    method: 'GET',
    params,
  })

/**
 * 获取设备实时数据详情
 * @param id
 */
export const getDeviceRealTimeDataDetail = (id) =>
  request({
    url: '/rq/iot-device/get/td',
    method: 'GET',
    params: { id },
  })

/**
 * 获取设备实时数据图表数据
 * @param deviceCode
 * @param chartData
 * @param params
 */
export const getDeviceRealTimeChartData = (deviceCode, chartData, params) =>
  request({
    url: `/rq/stat/td/chart/${deviceCode}/${chartData}`,
    method: 'GET',
    params,
  })