From 891493502f2b4f4e905e806f4e4920cf239cba9f Mon Sep 17 00:00:00 2001 From: yuejiayang <146344614+YangLei105@users.noreply.github.com> Date: Wed, 30 Oct 2024 00:33:29 +0800 Subject: [PATCH] =?UTF-8?q?2024.10.30=20=E6=96=87=E6=A1=A3=E6=94=B6?= =?UTF-8?q?=E9=9B=86=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/eam_object_list.js | 2 ++ src/views/modules/eam/eamProjectPartInfo.vue | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/api/eam/eam_object_list.js b/src/api/eam/eam_object_list.js index 2f0d213..989ea70 100644 --- a/src/api/eam/eam_object_list.js +++ b/src/api/eam/eam_object_list.js @@ -23,6 +23,8 @@ export const uploadEamObjectFile = data => createAPI('/sys/file/upload','post',d export const downLoadObjectFile = data => createAPI(`pms/eamObject/downLoadObjectFile?id=`+data.id,'post',777) +export const downLoadObjectFile2 = data => createAPI(`pms/eamObject/downLoadObjectFile?id=${data.id}&orderRef3=${data.orderRef3}`,'post',777) + // ===================================== 设备知识库 ===================================== export const getKnowledgeBaseList = data => createAPI('/pms/eamKnowledgeBase/getKnowledgeBaseList','post',data) // 查询文件列表 export const getDefectList = data => createAPI('/pms/eamKnowledgeBase/getDefectList','post',data) // 获取故障列表 diff --git a/src/views/modules/eam/eamProjectPartInfo.vue b/src/views/modules/eam/eamProjectPartInfo.vue index 8e1ce28..913a40f 100644 --- a/src/views/modules/eam/eamProjectPartInfo.vue +++ b/src/views/modules/eam/eamProjectPartInfo.vue @@ -1085,7 +1085,7 @@ import { import row from "element-ui/packages/row"; import moment from 'moment'; import 'moment/locale/zh-cn'; -import {downLoadObjectFile} from "../../../api/eam/eam_object_list"; +import {downLoadObjectFile2} from "../../../api/eam/eam_object_list"; import {EventBus} from "../../../main"; /*打样记录組件*/ @@ -4772,7 +4772,7 @@ import {EventBus} from "../../../main"; let pdf = ['pdf'] if (image.includes(row.fileType.toLowerCase())) { type = 'image/' + row.fileType - downLoadObjectFile(row).then(({data}) => { + downLoadObjectFile2(row).then(({data}) => { const blob = new Blob([data], { type: type }); // 创建URL来生成预览 const fileURL = URL.createObjectURL(blob); @@ -4782,7 +4782,7 @@ import {EventBus} from "../../../main"; } else if (video.includes(row.fileType.toLowerCase())) { type = 'video/' + row.fileType - downLoadObjectFile(row).then(({data}) => { + downLoadObjectFile2(row).then(({data}) => { const blob = new Blob([data], { type: type }); // 创建URL来生成预览 const fileURL = URL.createObjectURL(blob); @@ -4792,7 +4792,7 @@ import {EventBus} from "../../../main"; } else if (txt.includes(row.fileType.toLowerCase())) { type = 'text/plain' - downLoadObjectFile(row).then(({data}) => { + downLoadObjectFile2(row).then(({data}) => { const blob = new Blob([data], { type: type }); // 创建URL来生成预览 const fileURL = URL.createObjectURL(blob); @@ -4808,7 +4808,7 @@ import {EventBus} from "../../../main"; } else { type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' } - downLoadObjectFile(row).then(({data}) => { + downLoadObjectFile2(row).then(({data}) => { // 不限制文件下载类型 const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'}) // 下载文件名称 @@ -4826,7 +4826,7 @@ import {EventBus} from "../../../main"; } else if (pdf.includes(row.fileType.toLowerCase())) { type = 'application/pdf' - downLoadObjectFile(row).then(({data}) => { + downLoadObjectFile2(row).then(({data}) => { const blob = new Blob([data], { type: type }); // 创建URL来生成预览 const fileURL = URL.createObjectURL(blob); @@ -4843,7 +4843,7 @@ import {EventBus} from "../../../main"; }, // 下载 downloadFile (row) { - downLoadObjectFile(row) + downLoadObjectFile2(row) .then(({data}) => { // 不限制文件下载类型 const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})