// 随访统计模块
import request from "@/utils/request";

const BASE_URL = "/common/follow-document";
// 查询随访列表
export function statisticalPageList(query) {
  return request({
    url: `${BASE_URL}/list`,
    method: "get",
    params: query,
  });
}

// 随访数据统计
export function statisticalViewData(query) {
  return request({
    url: `${BASE_URL}/statistics`,
    method: 'get',
    params: query
  })
}

// 查询随访统计
export function statisticalView(query) {
  return request({
    url: `${BASE_URL}/view`,
    method: "get",
    params: query,
  });
}

// 导出随访统计列表
export function statisticalExport(query) {
  return request({
    timeout: 60 * 1000 * 10, // 10分钟
    url: `${BASE_URL}/export`,
    method: "get",
    params: query,
    responseType: "blob",
  });
}

// 查询随访详情
export function statisticalDetail(id) {
  return request({
    url: `${BASE_URL}/detail/${id}`,
    method: "get",
  });
}

// 查询随访详情待办事项
export function followupTodoItem(taskId) {
  return request({
    url: `${BASE_URL}/tasks/${taskId}`,
    method: "get",
  });
}
