import request from '@/utils/request';
import type { ApiResponse } from '../types';
import type { PersonnelAnalysisData, PersonnelQueryParams } from './types';

// 获取人员统计分析数据
export const getPersonnelAnalysis = (params?: PersonnelQueryParams) => {
  return request<ApiResponse<PersonnelAnalysisData>>({
    url: '/system/dashboard/personnel-analysis',
    method: 'get',
    params
  });
};

// 导出人员统计分析报表
export const exportPersonnelAnalysis = (params?: PersonnelQueryParams) => {
  return request({
    url: '/system/dashboard/personnel-analysis/export',
    method: 'get',
    params,
    responseType: 'blob'
  });
};
