From 39c9408f34938c295e4ff5c0cabc03462b483757 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Sun, 3 Nov 2024 19:31:59 +0800 Subject: [PATCH] =?UTF-8?q?feat=20:=20=E9=A1=B9=E7=9B=AE=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?,=20=E9=98=B6=E6=AE=B5=E5=8F=98=E6=9B=B4zip=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/project-demand/index.js | 22 ++++++++++ src/components/AttachmentUpload.vue | 41 +++++++++++++------ .../DetailComponent/ProjectApply.vue | 2 +- .../implementation/phase.vue | 2 +- 4 files changed, 53 insertions(+), 14 deletions(-) diff --git a/src/api/project-demand/index.js b/src/api/project-demand/index.js index 2d67e3e..2c60e53 100644 --- a/src/api/project-demand/index.js +++ b/src/api/project-demand/index.js @@ -1,4 +1,7 @@ import request from '@/utils/request.js' +import axios from "axios"; +import {getToken} from "@/utils/auth"; + //需求征集 export const getDemandInfo = (param) => { return request({ @@ -104,3 +107,22 @@ export const downloadTemplate = (type) => { } }); }; +export const downloadTemplateZip = (typeList) => { + return axios.get( + `${import.meta.env.VITE_BASE_URL}/workflow/mosr/attachment/download/pack?typeList=${typeList}`, + { + responseType: 'blob', + headers: { + Authorization: getToken() + }, + } + ); + // return request({ + // url: '/workflow/mosr/attachment/download/pack', + // method: "get", + // responseType:'blob', + // params:{ + // typeList:typeList + // } + // }); +}; diff --git a/src/components/AttachmentUpload.vue b/src/components/AttachmentUpload.vue index 9dca2db..282185a 100644 --- a/src/components/AttachmentUpload.vue +++ b/src/components/AttachmentUpload.vue @@ -44,7 +44,7 @@