import {httpApi} from "../../request/httpApi";

export default {
  //分页
  async getarchiveFilePage(form, msg = true) {
      return httpApi({
          url: '/api/blade-archive/archiveFileAuto/page',
          method: 'post',
          params: form
      }, msg);
  },

  //批量新增
  async batchUploadSave(form, msg = true) {
    return httpApi({
        url: '/api/blade-archive/archiveFileAuto/batchSave',
        method: 'post',
        data: form
    }, msg)
  },

  //跨目录移动
  async migrateFile(form, msg = true) {
    return httpApi({
        url: '/api/blade-archive/archiveFileAuto/migrateFile',
        method: 'post',
        params: form
    }, msg);
  },

  //批量下载
  async batchDownloadFileToZip(form, msg = true) {
    return httpApi({
        url: '/api/blade-archive/archiveFileAuto/batchDownloadFileToZip',
        method: 'post',
        params: form,
        responseType: 'blob'
    }, msg);
  },

  //删除
  async remove(form, msg = true) {
    return httpApi({
        url: '/api/blade-archive/archiveFileAuto/remove',
        method: 'post',
        params: form
    }, msg);
  },

  //获取pdf
  async mergePdf(form, msg = true) {
    return httpApi({
        url: '/api/blade-archive/archiveFileAuto/mergePdf',
        method: 'post',
        params: form
    }, msg);
  },

}