From 7f0dbcd48d1ae07f7b2514ea2142134537e7cffc Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Wed, 9 Mar 2022 16:21:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=BA=93--=E6=9B=B4?= =?UTF-8?q?=E6=96=B0log(=E6=8A=80=E6=9C=AF=E9=A2=86=E5=9F=9F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/BussDocumentLibraryEOServiceImpl.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java index 52800b2f3..a772ee70f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java @@ -879,9 +879,15 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl fieldFile = fieldFileList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList()); //下拉类型的字段 List fieldPull = fieldPullList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList()); + //过滤出树形字段 + List treeFieldList = fieldList.stream() + .filter(e -> FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType())) + .collect(Collectors.toList()); //数据字典 List sysDictItems = sysDictItemServiceImpl.selectItemsAll(); + //树形数据字典 + List categoryList = sysCategoryService.list(); //下拉选处理数据字典 for (Map.Entry entry : dataList.get(0).entrySet()) { List collect = fieldPullList.stream() @@ -889,6 +895,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl entry : mapTemp.entrySet()) { List collect = fieldPullList.stream() @@ -896,6 +903,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl Date: Wed, 9 Mar 2022 16:37:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?= =?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/public/api_address_config.js | 2 +- .../src/components/dict/JDictSelectTag.vue | 2 +- jero-web/src/components/uploadFile/file.vue | 18 +++++++++++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/jero-web/public/api_address_config.js b/jero-web/public/api_address_config.js index 74ec003e0..3e2c8ee9a 100644 --- a/jero-web/public/api_address_config.js +++ b/jero-web/public/api_address_config.js @@ -9,4 +9,4 @@ window._CONFIG['staticDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/d window._CONFIG['pdfDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/pdf/pdfPreviewIframe' window._CONFIG['casPrefixUrl'] = 'http://cas.example.org:8443/cas' // 预览文件地址 -window._CONFIG['onlinePreviewDomainURL'] = 'http://127.0.0.1:8012/onlinePreview' +window._CONFIG['onlinePreviewDomainURL'] = 'http://cas.example.org:8443/onlinePreview' diff --git a/jero-web/src/components/dict/JDictSelectTag.vue b/jero-web/src/components/dict/JDictSelectTag.vue index 7971bb87e..1cdb85ea2 100644 --- a/jero-web/src/components/dict/JDictSelectTag.vue +++ b/jero-web/src/components/dict/JDictSelectTag.vue @@ -8,7 +8,7 @@ - {{$t('pleaseSelect')}} + {{$t('pleaseSelect')}} {{ item.text || item.label }} diff --git a/jero-web/src/components/uploadFile/file.vue b/jero-web/src/components/uploadFile/file.vue index 57f86bb91..cb2e895d0 100644 --- a/jero-web/src/components/uploadFile/file.vue +++ b/jero-web/src/components/uploadFile/file.vue @@ -196,10 +196,22 @@ this.fileList = [] }, preview(file) { - if (file.response) { - downloadFile('/sys/common/download', file.response.result.fileName, { id: file.response.result.id }) + console.log(file) + let fileQuery = file.response ? file.response.result : file + let fileName = fileQuery.fileName + let index1 = fileName.lastIndexOf('.') + let index2 = fileName.length + let fileSuffix = fileName.substring(index1, index2) + if (fileSuffix == '.pdf') { + window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) + } else if (fileSuffix == '.docx') { + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + fileQuery.id) + window.open(url, '_blank') + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + fileQuery.id) + window.open(url, '_blank') } else { - downloadFile('/sys/common/download', file.fileName, { id: file.id }) + downloadFile('/sys/common/download', fileQuery.fileName, { id: fileQuery.id }) } } }