import request from '../index'
const prefix = 'device/data'

// 查询数据 分页
export function getDeviceDataListPage(data: any) {
  return request({
    url: `${prefix}/list-page?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

// 查询数据 分页
export function getDeviceBizDataListPage(data: any) {
  return request({
    url: `${prefix}/bizList-page?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

export function getDeviceLatestBizData(data: object) {
  return request({
    url: `${prefix}/latestBizData`,
    method: 'post',
    data,
  })
}

export function getDataFrameLog(frameLogId: string) {
  return request({
    url: `${prefix}/frameLog/${frameLogId}`,
    method: 'get',
  })
}

// 导出
export function exportDeviceData(data: object) {
  return request({
    url: `${prefix}/list-export`,
    responseType: 'blob',
    method: 'post',
    data,
  })
}

