import request from "@/utils/request";

// 图片元数据
export const pictureMetadata = (params) => {
  return request({
    url: "/point-strategy/v/archiveFile/pictureMetadata",
    method: "post",
    params,
  });
};
// 归档章
export const archiveSeal = (params) => {
  return request({
    url: "/point-strategy/v/fileManage/archiveSeal",
    method: "get",
    params,
  });
};
// showImg
export const showImg = (params) => {
  return request({
    url: "/point-strategy/v/archiveFile/showImg",
    method: "get",
    params,
  });
};
// 合并文件-pdf
export const mergeFile = (params) => {
  return request({
    url: "/point-strategy/v/fileManage/mergeFile",
    method: "get",
    params,
  });
};
// 合并下载
export const mergeDownload = (params) => {
  return request({
    url: "/point-strategy/v/fileManage/mergeDownload",
    method: "get",
    params,
    responseType: "blob",
  });
};
// 获得图片文字内容
export const getOcrImageWord = (params) => {
  return request({
    url: "/point-strategy/v/ocr/getOcrImageWord",
    method: "post",
    params,
  });
};
// 获得图片文字内容
export const getWord = (params) => {
  return request({
    url: "/point-strategy/v/ajjnOriginBatch/getWord",
    method: "post",
    params,
  });
};
// 批量下载
export const fileDownload = (data) => {
  return request({
    url: `/point-strategy/v/fileManage/batchDownload?tableName=${
      data.tableName
    }&ids=${data.ids}&archiveNo=${
      data.archiveNo
    }&userId=${sessionStorage.getItem("userid")}&type=${data.type}`,
    method: "get",
    responseType: "blob",
  });
};
// 授权电子借阅原文下载
export const batchDownloadWatermarking = (data) => {
  return request({
    url: `/point-strategy/v/fileManage/batchDownloadWatermarking?tableName=${
      data.tableName
    }&ids=${data.ids}&archiveNo=${
      data.archiveNo
    }&userId=${sessionStorage.getItem("userid")}&type=${data.type}`,
    method: "get",
    responseType: "blob",
  });
};

// 撤销归档章
export const withdrawArchiveSeal = (params)=>{
  return request({
    url:`/point-strategy/v/fileManage/withdrawArchiveSeal`,
    method:"get",
    params,
  })
};
