diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 486a12fd9..7639e3572 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1875,5 +1875,6 @@ module.exports = { send:'Send', pleaseProcessThePC:'Please process it on the PC', clickAndSelect:'Click and select', - phoneCreationTime:'Creation Time' + phoneCreationTime:'Creation Time', + theCurrentFormatSupportPreview:'The current format does not support preview', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 971047b49..e2fa73d79 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1976,5 +1976,6 @@ module.exports = { send:'发送', pleaseProcessThePC:'请在PC端处理', clickAndSelect:'点击选择', - phoneCreationTime:'创建时间' + phoneCreationTime:'创建时间', + theCurrentFormatSupportPreview:'当前格式不支持预览', } \ No newline at end of file diff --git a/jero-web/src/utils/kkfileView.js b/jero-web/src/utils/kkfileView.js new file mode 100644 index 000000000..4b46d7783 --- /dev/null +++ b/jero-web/src/utils/kkfileView.js @@ -0,0 +1,21 @@ +import { Base64 } from 'js-base64' +import { Toast } from 'vant' +window._CONFIG['domianPreviewURL'] = 'http://localhost:8082/jero-boot' +window._CONFIG['domianWebImgURL'] = 'http://localhost:8082/jero-boot' +let downLoadFileUrl = window._CONFIG['domianPreviewURL'] + '/sys/common/download' +let downLoadImgUrl = window._CONFIG['domianWebImgURL'] + '/sys/common/download' +export function kkFileView(fileName, fileId) { + let index1 = fileName.lastIndexOf('.') + let index2 = fileName.length + let fileSuffix = fileName.substring(index1, index2) + window._CONFIG['onlinePreviewDomainURL'] = 'http://localhost:8012/onlinePreview' + if (fileSuffix == '.docx' || fileSuffix == '.doc' || fileSuffix == '.pdf' || fileSuffix == '.xlsx' || fileSuffix == '.xls') { + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(downLoadFileUrl + '/' + fileId + fileSuffix) + window.open(url, '_blank') + } else if (fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(downLoadImgUrl + '/' + fileId + fileSuffix) + window.open(url, '_blank') + }else { + Toast('当前格式不支持预览') + } +} \ No newline at end of file diff --git a/jero-web/src/views/phoneView/documentDetails.vue b/jero-web/src/views/phoneView/documentDetails.vue index 054b7326d..8248298d9 100644 --- a/jero-web/src/views/phoneView/documentDetails.vue +++ b/jero-web/src/views/phoneView/documentDetails.vue @@ -20,9 +20,33 @@
-
- {{ol.db_field_txt}} - {{ol.value || '--'}} +
+
+ {{ol.db_field_txt}} + -- + + {{valItem.title}} + +
+
+ {{ol.db_field_txt}} + + {{ol.value || '--'}} + +
+
+ {{ol.db_field_txt}} + {{ol.value || '--'}} +
+
+ {{ol.db_field_txt}} + {{ol.value || '--'}} +
@@ -33,7 +57,7 @@ {{ol.db_field_txt}}
-
+
{{valItem.fileName}}
@@ -75,6 +99,7 @@