From c60b1a915ef2793537b1c99ecd39896c44972ac7 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Thu, 11 Jan 2024 09:33:49 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9/sys/common/view?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=9A=84token=E5=AD=97=E6=AE=B5=E5=90=8D?= =?UTF-8?q?=E6=94=B9=E4=B8=BAat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ProcessDetailList.vue | 2 +- .../QuestionAnswerList.vue | 27 +- .../questionAnswerLibrary/page/AnswerPage.vue | 2 +- .../plan/detail/PlanDetail.vue | 2 +- .../detail/EnterpriseStandardDetail.vue | 2 +- .../standard/modules/CheckContentModal.vue | 2 +- .../modules/CommentModal.vue | 2 +- ...MainDrafterCollectUploadMinuteBaseInfo.vue | 276 ++++++++++-------- 8 files changed, 173 insertions(+), 142 deletions(-) diff --git a/src/components/ProcessDetailList.vue b/src/components/ProcessDetailList.vue index 0a37bc79..0ce5470f 100644 --- a/src/components/ProcessDetailList.vue +++ b/src/components/ProcessDetailList.vue @@ -296,7 +296,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${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/businessSupport/questionAnswerLibrary/QuestionAnswerList.vue b/src/views/businessSupport/questionAnswerLibrary/QuestionAnswerList.vue index a8d19afe..b7bc3fa4 100644 --- a/src/views/businessSupport/questionAnswerLibrary/QuestionAnswerList.vue +++ b/src/views/businessSupport/questionAnswerLibrary/QuestionAnswerList.vue @@ -8,7 +8,7 @@ @@ -128,6 +128,8 @@ import { kkFilePreview } from '@/utils/kkFilePreview' const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw'] const FILE_TYPE_PDF = 'pdf' +// 支持预览的文件后缀 +const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'] export default { name: 'QuestionAnswerList', @@ -223,7 +225,15 @@ export default { handleAttachClick (record) { // 截取文件后缀名 const fileSuffix = record.declareFileName ? record.declareFileName.split('.')[record.declareFileName.split('.').length - 1] : '' - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.declareFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.declareFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}` + const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix === tt) + // 判断是否为可预览格式的文件 + if (!canPreview) { + this.$message.loading(this.$t('uploadFile.cannotPreview')).then(() => { + this.handleDownload(record.declareFile, record.declareFileName) + }) + return + } // 图片预览,使用自己添加的组件 if (FILE_TYPE_IMGS.includes(fileSuffix)) { this.imageUrl = getFileAccessHttpUrl(record.declareFile) @@ -240,13 +250,12 @@ export default { window.open(url) return } - // word用KKfile预览 - if (fileSuffix === 'doc' || fileSuffix === 'docx') { - kkFilePreview(fileFullUrl) - return - } - // 如果都不能预览就下载 - downloadFile(`/sys/common/download/${record.declareFile}`, record.declareFileName) + // 其余可预览文件仍使用KKFile进行预览 + kkFilePreview(fileFullUrl) + }, + handleDownload (id, name) { + // 下载文件 + downloadFile(`/sys/common/download/${id}`, name) }, // 查看 handleDetail (record) { diff --git a/src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue b/src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue index efa31fe0..0baabb0d 100644 --- a/src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue +++ b/src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue @@ -212,7 +212,7 @@ export default { }) return } - const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${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/plan/detail/PlanDetail.vue b/src/views/enterpriseStandardLibrary/plan/detail/PlanDetail.vue index 82d93a5d..9bad34b5 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/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${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/detail/EnterpriseStandardDetail.vue b/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue index 849b6dd5..654af382 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/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${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 d8599752..fb7dd324 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/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${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/CommentModal.vue b/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue index c2dcc0bf..fb374346 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/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}` + const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${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 e606bbf9..9d2da9b5 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue @@ -17,7 +17,7 @@ @@ -26,106 +26,103 @@ -
-
- -
-
+
+ +
+
{{ $t('workCenter.enStandardRevision.standardText') }} -
- -
- -

企业标准

- {{ $t('workCenter.enStandardRevision.onLineEditing') }} -
-
- -
-
- * - + +
+ +

企业标准

+ {{ $t('workCenter.enStandardRevision.onLineEditing') }} +
+
+
+ +
+
+ * + {{ $t('workCenter.enStandardRevision.conferee') }} -
- - -
- -
-
- * - + + + +
+ +
+
+ * + {{ $t('workCenter.enStandardRevision.meetingSummary') }} -
- - - {{ - (formInline.meetingSummary === 'null' || formInline.meetingSummary === '' - || formInline.meetingSummary === null || formInline.meetingSummary === undefined) - ? $t('uploadFile.clickUpload') - : $t('uploadFile.viewUploadedFiles') - }} - -
- -
-
- * - + + + {{ + (formInline.meetingSummary === 'null' || formInline.meetingSummary === '' + || formInline.meetingSummary === null || formInline.meetingSummary === undefined) + ? $t('uploadFile.clickUpload') + : $t('uploadFile.viewUploadedFiles') + }} + + +
+ +
+
+ * + {{ $t('workCenter.enStandardRevision.compilationIllustration') }} -
- - - {{ - (formInline.comp_illustration === 'null' || formInline.comp_illustration === '' - || formInline.comp_illustration === null || formInline.comp_illustration === undefined) - ? $t('uploadFile.clickUpload') - : $t('uploadFile.viewUploadedFiles') - }} - -
- -
-
- * - + + + {{ + (formInline.compIllustration === 'null' || formInline.compIllustration === '' + || formInline.compIllustration === null || formInline.compIllustration === undefined) + ? $t('uploadFile.clickUpload') + : $t('uploadFile.viewUploadedFiles') + }} + + +
+ +

{{ $t('enterpriseStandardLibrary.standard.auditContent') }}

+ +
+
+ * + {{ $t('workCenter.enStandardRevision.isNeedAudit') }} -
- - - - {{ $t('yes') }} - - - {{ $t('not') }} - - -
+ + + + {{ $t('yes') }} + + + {{ $t('not') }} + + +
-