import { httpApp } from "@/plugins/axiosApp";
import { HistoryQueryParams, Task } from "@/types";

/** 批量仲裁历史 */
export async function getQualityHistory({
  markerId,
  markerScore,
  order = "markerTime",
  sort = "DESC",
  pageNumber = 1,
  pageSize = 20,
  secretNumber,
}: HistoryQueryParams) {
  const form = new FormData();
  markerId && form.append("markerId", markerId);
  markerScore && form.append("markerScore", markerScore);
  secretNumber && form.append("secretNumber", secretNumber);
  form.append("order", order);
  form.append("sort", sort);
  form.append("pageNumber", pageNumber + "");
  form.append("pageSize", pageSize + "");
  return httpApp.post<Task[]>("/api/admin/exam/quality/history", form);
}
