// 统计相关

import { request } from '@/utils/request/index.ts';

// 统计数据
export const statisticsApi = async () => {
  return await request({
    url: `/data/statistics`,
    method: 'GET',
  })
};

// 根据bacthid获取统计数据
export const lineStatisticsApi = async (bacthId: string, controller?: AbortController) => {
  return await request({
    url: `/data/query_plot_data/${bacthId}`,
    method: 'GET',
    controller: controller
  })
}

// 根据参数获取频谱图
export const getSpectrumImgApi = async (data: Record<string, any>, controller?: AbortController) => {
  return await request({
    url: `/data/spectrummap/${data.batchId}/${data.index}`,
    method: 'GET',
    getRaw: true,
    controller: controller
  })

}


