import request from '@/api/request';
import type { ExportParams, QueryParams } from "./model";

// 获取 L1 数据
export function getL1Data(params: QueryParams) {
  return request({
    url: "/jinghua/l1OneData/list",
    method: "get",
    params,
  });
}

// 获取 报警记录 数据
export function getAlarmRecords(params: QueryParams) {
  return request({
    url: '/jinghua/alarmRecord/list',
    method: 'get',
    params
  })
}

// 导出数据
export function exportData(data: ExportParams) {
  return request({
    url: "/jinghua/l1OneData/export",
    method: "post",
    data,
    responseType: "blob",
  });
}
