研发图纸文件管理系统-前端项目
he wei
2023-09-20 c0e36244c61614b5fd21eb73be1ceca09b2f7afb
src/assets/js/apis.js
@@ -1,14 +1,25 @@
import axios from "@/assets/axios";
/**
 * 文件下载
 * 下载
 * @param {*} filePath 文件路径
 * @param {*} oprateReason 下载原因
 * @param {*} oprateInfo 物料就传id  产品传parentCode + "_" + customCode
 * @param {*} oprateVersion 物料传0 产品传versionId
 * @param {*} type 物料传13 产品传12
 * @returns 
 */
export const downLoadFileByFilePath = (filePath) => {
export const downLoadFileByFilePath = (
  filePath,
  oprateReason,
  oprateInfo,
  oprateVersion,
  type
) => {
  return axios({
    method: "GET",
    url: "bomFeedbak/downLoadFileByFilePath",
    params: { filePath },
    responseType: "blob"
  })
}
    params: { filePath, oprateReason, oprateInfo, oprateVersion, type },
    responseType: "blob",
  });
};