import { stringify } from 'qs';
import { request } from 'umi';

export async function queryProject(params = {}) {
  return request(`/api/v2/project?${stringify(params)}`);
}

export async function queryStatisticList(params = {}) {
  return request(
    `/fault_analysis/result-count/${params.projectId}?${stringify(params)}`,
  );
}

export async function queryList(params = {}) {
  return request(
    `/fault_analysis/result-list/${params.projectId}?${stringify(params)}`,
  );
}
export async function queryListNew(params = {}) {
  return request(`/api/analysis/v1/analysis-result/list`, {
    method: 'POST',
    data: params,
  });
}
export async function queryCountNew(params = {}) {
  return request(`/api/analysis/v1/analysis-count/list`, {
    method: 'POST',
    data: params,
  });
}
//导出
export async function queryAnalysisExport(params = {}) {
  return request(`/api/analysis/v1/analysis-result/export`, {
    method: 'POST',
    data: params,
  });
}
