diff --git a/src/api/manage.js b/src/api/manage.js index 3c40e898..10c3cf0e 100644 --- a/src/api/manage.js +++ b/src/api/manage.js @@ -203,7 +203,7 @@ export function getFileAccessHttpUrl (avatar, subStr) { } else { if (avatar && avatar.length > 0 && avatar.indexOf('[') === -1) { const token = Vue.ls.get(ACCESS_TOKEN) - return window._CONFIG.staticDomainURL + '/' + avatar + '?token=' + token + return window._CONFIG.domianURL + '/sys/common/view' + '/' + avatar + '?token=' + token } } } catch (err) { diff --git a/src/components/FileEcho.vue b/src/components/FileEcho.vue index 91dfb316..5ef4d053 100644 --- a/src/components/FileEcho.vue +++ b/src/components/FileEcho.vue @@ -96,7 +96,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` // 图片预览,使用自己添加的组件 if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) { this.imageUrl = getFileAccessHttpUrl(file.id) diff --git a/src/components/ProcessDetailList.vue b/src/components/ProcessDetailList.vue index b26354a1..1a935584 100644 --- a/src/components/ProcessDetailList.vue +++ b/src/components/ProcessDetailList.vue @@ -286,7 +286,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` // 图片预览,使用自己添加的组件 if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) { this.imageUrl = getFileAccessHttpUrl(file.id) diff --git a/src/components/UploadFile.vue b/src/components/UploadFile.vue index ec0f9a50..a4e19fee 100644 --- a/src/components/UploadFile.vue +++ b/src/components/UploadFile.vue @@ -308,7 +308,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}` console.log(fileSuffix) // 图片预览,使用自己添加的组件 if (FILE_TYPE_IMGS.includes(fileSuffix)) { diff --git a/src/components/jero/JUpload.vue b/src/components/jero/JUpload.vue index c6564992..5e5d8884 100644 --- a/src/components/jero/JUpload.vue +++ b/src/components/jero/JUpload.vue @@ -440,7 +440,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}` console.log(fileSuffix) // 图片预览,使用自己添加的组件 if (FILE_TYPE_IMGS.includes(fileSuffix)) { diff --git a/src/utils/previewPdf.js b/src/utils/previewPdf.js index a7a8ac09..63088d98 100644 --- a/src/utils/previewPdf.js +++ b/src/utils/previewPdf.js @@ -5,7 +5,7 @@ const getToken = () => Vue.ls.get(ACCESS_TOKEN) // 预览pdf const previewPdf = (id) => { - const url = `${window._CONFIG.domianURL}/sys/common/download/${id}?type=view&token=${getToken()}` + const url = `${window._CONFIG.domianURL}/sys/common/view/${id}?type=view&token=${getToken()}` return `${process.env.BASE_URL}pdfjs/web/viewer.html?file=` + encodeURIComponent(url) + '&.pdf' } diff --git a/src/views/businessSupport/questionAnswerLibrary/QuestionAnswerList.vue b/src/views/businessSupport/questionAnswerLibrary/QuestionAnswerList.vue index 6104bd2c..81f38ddb 100644 --- a/src/views/businessSupport/questionAnswerLibrary/QuestionAnswerList.vue +++ b/src/views/businessSupport/questionAnswerLibrary/QuestionAnswerList.vue @@ -223,7 +223,7 @@ export default { handleAttachClick (record) { // 截取文件后缀名 const fileSuffix = record.declareFileName ? record.declareFileName.split('.')[record.declareFileName.split('.').length - 1] : '' - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${record.declareFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.declareFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}` // 图片预览,使用自己添加的组件 if (FILE_TYPE_IMGS.includes(fileSuffix)) { this.imageUrl = getFileAccessHttpUrl(record.declareFile) diff --git a/src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue b/src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue index 59915671..cc331ae7 100644 --- a/src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue +++ b/src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue @@ -211,7 +211,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` // 图片预览,使用自己添加的组件 if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) { this.imageUrl = getFileAccessHttpUrl(file.id) diff --git a/src/views/enterpriseStandardLibrary/check/modules/CheckReportModal.vue b/src/views/enterpriseStandardLibrary/check/modules/CheckReportModal.vue index d951101a..5afa4785 100644 --- a/src/views/enterpriseStandardLibrary/check/modules/CheckReportModal.vue +++ b/src/views/enterpriseStandardLibrary/check/modules/CheckReportModal.vue @@ -149,7 +149,7 @@ export default { handleRelatedMaterialClick (record) { // 截取文件后缀名 const fileSuffix = record.declareFileName ? record.declareFileName.split('.')[record.declareFileName.split('.').length - 1] : '' - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${record.declareFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.declareFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}` // 图片预览,使用自己添加的组件 if (FILE_TYPE_IMGS.includes(fileSuffix)) { this.imageUrl = getFileAccessHttpUrl(record.declareFile) diff --git a/src/views/enterpriseStandardLibrary/plan/detail/PlanDetail.vue b/src/views/enterpriseStandardLibrary/plan/detail/PlanDetail.vue index a0c0d52e..c0088a47 100644 --- a/src/views/enterpriseStandardLibrary/plan/detail/PlanDetail.vue +++ b/src/views/enterpriseStandardLibrary/plan/detail/PlanDetail.vue @@ -224,7 +224,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` // 图片预览,使用自己添加的组件 if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) { this.imageUrl = getFileAccessHttpUrl(file.id) diff --git a/src/views/enterpriseStandardLibrary/publicize/EnterpriseStandardPublicize.vue b/src/views/enterpriseStandardLibrary/publicize/EnterpriseStandardPublicize.vue index bf912f17..67e3b78e 100644 --- a/src/views/enterpriseStandardLibrary/publicize/EnterpriseStandardPublicize.vue +++ b/src/views/enterpriseStandardLibrary/publicize/EnterpriseStandardPublicize.vue @@ -207,7 +207,7 @@ export default { handleRelatedMaterialClick (record) { // 截取文件后缀名 const fileSuffix = record.declareFileName ? record.declareFileName.split('.')[record.declareFileName.split('.').length - 1] : '' - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${record.declareFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.declareFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}` // 图片预览,使用自己添加的组件 if (FILE_TYPE_IMGS.includes(fileSuffix)) { this.imageUrl = getFileAccessHttpUrl(record.declareFile) diff --git a/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue b/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue index af97fc76..5f2fb9c1 100644 --- a/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue +++ b/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue @@ -274,7 +274,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` // 图片预览,使用自己添加的组件 if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) { this.imageUrl = getFileAccessHttpUrl(file.id) diff --git a/src/views/enterpriseStandardLibrary/standard/modules/CheckContentModal.vue b/src/views/enterpriseStandardLibrary/standard/modules/CheckContentModal.vue index 8701b1ae..d8599752 100644 --- a/src/views/enterpriseStandardLibrary/standard/modules/CheckContentModal.vue +++ b/src/views/enterpriseStandardLibrary/standard/modules/CheckContentModal.vue @@ -121,7 +121,7 @@ export default { const url = previewPdf(file.id) this.iframeSrc = url } else if (fileSuffix === 'docx') { - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` // word文件仍使用KKFile进行预览 const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}` this.iframeSrc = url diff --git a/src/views/projectLibrary/specialProjectLibrary/modules/BasisDescriptionModal.vue b/src/views/projectLibrary/specialProjectLibrary/modules/BasisDescriptionModal.vue index d4ec3a60..44f0d7d3 100644 --- a/src/views/projectLibrary/specialProjectLibrary/modules/BasisDescriptionModal.vue +++ b/src/views/projectLibrary/specialProjectLibrary/modules/BasisDescriptionModal.vue @@ -198,7 +198,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` // 图片预览,使用自己添加的组件 if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) { this.imageUrl = getFileAccessHttpUrl(file.id) diff --git a/src/views/standardRegulationLibrary/commonPage/StandardDetailPage.vue b/src/views/standardRegulationLibrary/commonPage/StandardDetailPage.vue index 6a2c3096..7bd5b7ab 100644 --- a/src/views/standardRegulationLibrary/commonPage/StandardDetailPage.vue +++ b/src/views/standardRegulationLibrary/commonPage/StandardDetailPage.vue @@ -377,7 +377,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` console.log(fileFullUrl) // 图片预览,使用自己添加的组件 if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) { diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue b/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue index 4e1e331b..c2dcc0bf 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue @@ -151,7 +151,7 @@ export default { const url = previewPdf(file.id) this.iframeSrc = url } else if (fileSuffix === 'docx') { - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` // word文件仍使用KKFile进行预览 const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}` this.iframeSrc = url diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue index 65533bd1..847967bc 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue @@ -349,7 +349,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${record.standardFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.standardFile_dictText}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.standardFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.standardFile_dictText}` // 图片预览,使用自己添加的组件 if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix)) { this.imageUrl = getFileAccessHttpUrl(record.standardFile) diff --git a/src/views/workCenter/standardConsultationProcess/modules/ConsultationModal.vue b/src/views/workCenter/standardConsultationProcess/modules/ConsultationModal.vue index 36b51590..846b7cb3 100644 --- a/src/views/workCenter/standardConsultationProcess/modules/ConsultationModal.vue +++ b/src/views/workCenter/standardConsultationProcess/modules/ConsultationModal.vue @@ -158,7 +158,7 @@ export default { getFileInfo({ id: fileId }).then(res => { if (res.success) { const fileInfo = res.result || {} - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${fileInfo.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${fileInfo.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${fileInfo.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${fileInfo.fileName}` // 截取文件后缀名 const fileSuffix = (fileInfo.fileName ? fileInfo.fileName.split('.')[fileInfo.fileName.split('.').length - 1] : '').toLowerCase() switch (fileSuffix) {