From fa735ebd3c054d858b37888d38cfdf9db8fdc464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Mon, 29 Jul 2024 10:10:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=A2=84=E8=A7=88=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/UpfilePersion/UpfilePersionList.vue | 2 +- .../src/views/expscore/ExpScoreList.vue | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue b/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue index b427a9e3..f42d8594 100644 --- a/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue +++ b/jeecgboot-vue3-master/src/views/UpfilePersion/UpfilePersionList.vue @@ -349,7 +349,7 @@ } function handlePreview(record) { - const previewServerUrl = 'http://127.0.0.1:8012/onlinePreview?url='; + const previewServerUrl = 'http://10.20.15.171:8012/onlinePreview?url='; const fileUrl = `${globalSetting.domainUrl}${getDownWork}?id=${record.id}`; const extName = record.url.substring(record.url.lastIndexOf('.')); const previewUrl = `${fileUrl}&fullfilename=${new Date().getTime()}${extName}`; diff --git a/jeecgboot-vue3-master/src/views/expscore/ExpScoreList.vue b/jeecgboot-vue3-master/src/views/expscore/ExpScoreList.vue index 1c2cc453..4c79da7d 100644 --- a/jeecgboot-vue3-master/src/views/expscore/ExpScoreList.vue +++ b/jeecgboot-vue3-master/src/views/expscore/ExpScoreList.vue @@ -43,6 +43,8 @@ @@ -62,6 +64,7 @@ import JSelectUserByDept from '/@/components/Form/src/jeecg/components/JSelectUserByDept.vue'; import { useRoute } from 'vue-router'; import {useMessage} from "../../hooks/web/useMessage"; + import {getDownWork} from "/@/views/UpfilePersion/UpfilePersion.api"; const { createMessage } = useMessage(); const route = useRoute(); @@ -105,6 +108,21 @@ sm: { span: 16 }, }); + function handlePreview(record) { + console.log("==========================================================="); + console.log(record); + console.log("==========================================================="); + const previewServerUrl = 'http://10.20.15.171:8012/onlinePreview?url='; + let url = 'http://10.20.15.171/jeecg-boot/sys/common/static/' + record; + window.open(previewServerUrl + encodeURIComponent(base64Encode(url))); + } + + function base64Encode(str: string): string { + return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) { + return String.fromCharCode('0x' + p1); + })); + } + /** * 新增事件 */