// src/api/analysis.ts  分析相关的接口
import request from "../utils/request.ts";
import type { ApiResponse } from "@/types/types"; // 引入类型

// 查询头部筛选信息
export const findCommonSelectList = (data: any): Promise<ApiResponse> => {
  return request({
    url: "/api/v1/ai_analysis/find_common_select_list",
    method: "get",
    params: data,
  });
};
// ==========================================成绩单============================================
//获取单科成绩单下的表头数据
export const studentTranscriptTitle = (data: any): Promise<ApiResponse> => {
  return request({
    url: "/api/v1/ai_analysis/studentTranscriptTitle",
    method: "post",
    data,
  });
};
//查询分析报告统计信息
export const queryJointStudentStatistics = (data: any): Promise<ApiResponse> => {
  return request({
    url: "/api/v1/ai_analysis/queryJointStudentStatistics",
    method: "post",
    data,
  });
};
//查询单科成绩单下的数据
export const studentTranscript = (data: any): Promise<ApiResponse> => {
  return request({
    url: "/api/v1/ai_analysis/studentTranscript",
    method: "post",
    data,
  });
};
// ==========================================错题分析============================================
// 错题分析
export const errorQuestionAnalysis = (data: any): Promise<ApiResponse> => {
  return request({
    url: "/api/v1/ai_analysis/errorQuestionAnalysis",
    method: "post",
    data,
  });
};
// ==========================================水平分布============================================
export const scoreSegment = (data: any): Promise<ApiResponse> => {
  return request({
    url: "/api/v1/ai_analysis/scoreSegment",
    method: "post",
    data,
  });
};
// ==========================================班级对比============================================
export const classContrastSubjectTable = (data: any): Promise<ApiResponse> => {
  return request({
    url: "/api/v1/ai_analysis/classContrastSubjectTable",
    method: "post",
    data,
  });
};
// ==========================================小题分析============================================
export const questionAnalysis = (data: any): Promise<ApiResponse> => {
  return request({
    url: "/api/v1/ai_analysis/questionAnalysis",
    method: "post",
    data,
  });
};
// 通过答案或者分数查询某题作答情况
export const queryAnswerListByAnswerAndScore = (data: any): Promise<ApiResponse> => {
  return request({
    url: "/api/v1/ai_analysis/queryAnswerListByAnswerAndScore",
    method: "post",
    data,
  });
};