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); + })); + } + /** * 新增事件 */