import request from "@/api";

// 获取表头数据
export function getDroughtResistantHeader(data: any) {
  return request({
    url: "/admin/sys/dmmatype/getAllList",
    method: "post",
    data
  });
}

// 获取列表数据
export function getDroughtResistantList(data: any) {
  return request({
    url: "/admin/sys/dmmatype/selectIrkzqXxb",
    method: "post",
    data
  });
}

// 物资分类接口
export function getSuppliesType(data: any) {
  return request({
    url: "/admin/sys/dmmatype/list",
    method: "post",
    params: {
      current: data.current,
      size: data.size
    },
    data
  });
}

// 数据统计 应急物资分类列表 —— 物资大类
export function getSysTreeDict(data: any) {
  return request({
    url: "/admin/sys/dict/selectSysTreeDict",
    method: "post",
    data
  });
}

// 数据统计 —— 获取省份数据
export function getCityList(data: any) {
  return request({
    url: "/admin/dept/getDeptParentIdList",
    method: "post",
    data
  });
}

// 数据统计 —— 获取详情列表数据
export function getDetailList(data: any) {
  return request({
    url: "/admin/in/selectListByDept",
    method: "post",
    data
  });
}

//导出---救灾物资数量价值表
export function exportJzwzsljzb(data: object) {
  return request({
    url: `/admin/sys/dmmatype/exportJzwzsljzb`,
    method: "post",
    data,
    responseType: "blob"
  });
}
//导出---防汛抗旱物资数量价值表
export function exportFxkhwzsljzb(data: object) {
  return request({
    url: `/admin/sys/dmmatype/exportFxkhwzsljzb`,
    method: "post",
    data,
    responseType: "blob"
  });
}

//导出---救灾物资明细统计表 & 防汛抗旱明细统计表
export function exportjzwzmxtjb(data: object) {
  return request({
    url: `/admin/in/exportjzwzmxtjb`,
    method: "post",
    data,
    responseType: "blob"
  });
}
//导出---应急物资分类
export function exportyjwzflb(data: any) {
  return request({
    url: `/admin/sys/dmmatype/exportyjwzflb`,
    method: "post",
    params: {
      current: data.current,
      size: data.size
    },
    data,
    responseType: "blob"
  });
}

//预警列表
export function getDetaWarninglList(data: any) {
  return request({
    url: "/admin/in/selectListByStorageMaterials",
    method: "post",
    data
  });
}
