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 @@