Browse Source

2024.10.30 文档收集优化

java8
yuejiayang 1 year ago
parent
commit
891493502f
  1. 2
      src/api/eam/eam_object_list.js
  2. 14
      src/views/modules/eam/eamProjectPartInfo.vue

2
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) // 获取故障列表

14
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'})

Loading…
Cancel
Save