浏览代码

批量下载接扣

duy 1 年之前
父节点
当前提交
46ad9287b6
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 2 1
      src/api/modules/using/query.js
  2. 3 3
      src/views/using/query.vue

+ 2 - 1
src/api/modules/using/query.js

@@ -65,8 +65,9 @@ async getarchiveQueryPage(form, msg = true) {
     async batchDownloadFileToZip(form, msg = true) {
       return httpApi({
           url: '/api/blade-archive/archivesauto/batchDownloadFileToZip',
-          method: 'get',
+          method: 'post',
           params: form,
+          responseType: 'blob',
       }, msg)
   },
 }

+ 3 - 3
src/views/using/query.vue

@@ -1588,9 +1588,9 @@ const batchClick = async ()=>{
     const ids = arrToId(tableKeys.value)
     console.log(ids, 'ids')
     batchLoading.value = true
-    const { error, code, data, msg } = await archiveQueryApi.batchDownloadFileToZip({
-        ids:ids,
-    })
+    const { error, code, data, msg } = await archiveQueryApi.batchDownloadFileToZip(
+        { ids: ids },
+    )
     batchLoading.value = false
     if (!error && code === 200) {
         window.$message.success(msg)