From 4bd1531ef5f314256d399a63bc115ebe92d83e08 Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Mon, 5 Aug 2024 10:02:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/jeecg/components/JUpload/JUpload.vue | 1378 +++++++++-------- src/views/site/studentWdkc/teacherDbtx.vue | 2 +- .../site/studentWdkc/teacherWeiduMore.vue | 4 +- src/views/zy/jiaoXueDanYuanNeiRong/index.vue | 46 +- .../zy/jiaoXueDanYuanNeiRong/stuIndex.vue | 17 +- src/views/zy/zyInfo/StudentZyInfoList.vue | 2 +- src/views/zy/zyInfo/ZyInfoV2List.vue | 12 +- .../zy/zyInfoStudent/ZyInfoStudent.data.ts | 2 +- src/views/zy/zyInfoStudentHp/ZyhpMainList.vue | 18 +- 9 files changed, 776 insertions(+), 705 deletions(-) diff --git a/src/components/Form/src/jeecg/components/JUpload/JUpload.vue b/src/components/Form/src/jeecg/components/JUpload/JUpload.vue index 85d5051..a54ddff 100644 --- a/src/components/Form/src/jeecg/components/JUpload/JUpload.vue +++ b/src/components/Form/src/jeecg/components/JUpload/JUpload.vue @@ -28,523 +28,530 @@ diff --git a/src/views/site/studentWdkc/teacherDbtx.vue b/src/views/site/studentWdkc/teacherDbtx.vue index 76a08c0..dbaa4bb 100644 --- a/src/views/site/studentWdkc/teacherDbtx.vue +++ b/src/views/site/studentWdkc/teacherDbtx.vue @@ -6,7 +6,7 @@
- 查看更多 + 查看更多
diff --git a/src/views/site/studentWdkc/teacherWeiduMore.vue b/src/views/site/studentWdkc/teacherWeiduMore.vue index 6ee6a4f..d83248b 100644 --- a/src/views/site/studentWdkc/teacherWeiduMore.vue +++ b/src/views/site/studentWdkc/teacherWeiduMore.vue @@ -8,7 +8,7 @@ @@ -17,7 +17,7 @@
{{ index + 1 }}、{{ item.content }}
- 已读 + 查看
diff --git a/src/views/zy/jiaoXueDanYuanNeiRong/index.vue b/src/views/zy/jiaoXueDanYuanNeiRong/index.vue index c312143..338ef68 100644 --- a/src/views/zy/jiaoXueDanYuanNeiRong/index.vue +++ b/src/views/zy/jiaoXueDanYuanNeiRong/index.vue @@ -380,7 +380,7 @@ import { Input, Popover, Pagination, Empty, Affix as aAffix } from 'ant-design-v import { defHttp } from '/@/utils/http/axios'; import { useMessage } from '/@/hooks/web/useMessage'; import { useRouter } from 'vue-router'; -import { randomString, simpleDebounce, getFileAccessHttpUrl } from '/@/utils/common/compUtils'; +import { randomString, simpleDebounce, getFileAccessHttpUrl, baseApiUrl } from '/@/utils/common/compUtils'; import { useFileList } from '/@/components/jeecg/comment/useComment'; import draggable from 'vuedraggable'; @@ -391,6 +391,11 @@ import stuIndex from './stuIndex.vue'; import { downloadFile as ajaxDownloadFileFn } from '/@/api/common/api'; import zykYylistPage from '/@/views/zyk/ZykInfoYinyongModal.vue'; +import Base64 from 'crypto-js/enc-base64'; +import { dataURLtoBlob, urlToBase64 } from '/@/utils/file/base64Conver'; +import UTF8 from 'crypto-js/enc-utf8'; +import { encryptByBase64 } from '/@/utils/cipher'; + const spinning = ref(false); //当前路由信息 const { currentRoute } = useRouter(); @@ -416,6 +421,8 @@ const videoOpen = ref(false); const controls = ref(true); const autoplay = ref(false); const loop = ref(false); +// 文件预览地址的domain 在后台配置的 +let onlinePreviewDomain = ''; const playVideoInFullscreen = async () => { console.log('💋', videoPlayer); @@ -472,7 +479,7 @@ enum Api { delThree = '/teachingunitcontent/kcTeachingUnitContentThree/delete', } -function handleView(urlPath){ +function handleView(urlPath) { // var url = 'http://127.0.0.1:8080/file/test.txt'; //要预览文件的访问地址 // window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(base64Encode(url))); } @@ -801,20 +808,47 @@ function editThreePage(two, three, threeIndex) { threePageData.value = { two, three, threeIndex }; } -function viewThreePage(three) { +async function viewThreePage(three) { console.log('🙇‍♂️', three); - if (three.value.type == 'video') { + if (three.type == 'video') { handleVideo(three); - } else if (three.value.type == 'document') { + } else if (three.type == 'document') { + // var file = 'https://kczxcs.nenu.edu.cn/jeecg-boot/temp/0731课程作业问题汇总_1722673666833.docx'; + // var file = baseApiUrl + "/"+three.filePath; + // console.log('🤬', file); + // let url = getFileAccessHttpUrl(encodeURIComponent(file)); + // var t2 = encryptByBase64(url); + // window.open('https://fileview.jeecg.com/onlinePreview?url=' + encodeURIComponent(t2)); - } else if (three.value.type == 'richText') { + // var file = 'https://kczxcs.nenu.edu.cn/jeecg-boot/temp/ylhpsf.pdf'; + var file = baseApiUrl + "/"+three.filePath; + console.log('🤬', file); + // let url = getFileAccessHttpUrl(encodeURIComponent(file)); + // var t2 = encryptByBase64(url); + window.open('https://fileview.jeecg.com/onlinePreview?url=' + encodeURIComponent(encryptByBase64(file))); + + + } else if (three.type == 'richText') { threePageOpen.value = true; threePageDisableSubmit.value = true; threePageData.value = { three }; } } +const getViewFileDomain = () => defHttp.get({ url: '/sys/comment/getFileViewDomain' }); +/** + * 初始化domain + */ +async function initViewDomain() { + if (!onlinePreviewDomain) { + onlinePreviewDomain = await getViewFileDomain(); + } + if (!onlinePreviewDomain.startsWith('http')) { + onlinePreviewDomain = 'http://' + onlinePreviewDomain; + } +} + function delThree(e, two, three) { stop(e); delThreeFetch({ id: three.id }).then((res) => { diff --git a/src/views/zy/jiaoXueDanYuanNeiRong/stuIndex.vue b/src/views/zy/jiaoXueDanYuanNeiRong/stuIndex.vue index 34b219c..989a66e 100644 --- a/src/views/zy/jiaoXueDanYuanNeiRong/stuIndex.vue +++ b/src/views/zy/jiaoXueDanYuanNeiRong/stuIndex.vue @@ -213,12 +213,13 @@ import { defHttp } from '/@/utils/http/axios'; import { useMessage } from "/@/hooks/web/useMessage"; import { useRouter } from 'vue-router'; - import { randomString, simpleDebounce, getFileAccessHttpUrl } from '/@/utils/common/compUtils' + import { randomString, simpleDebounce, getFileAccessHttpUrl, baseApiUrl } from '/@/utils/common/compUtils' import draggable from 'vuedraggable'; import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue'; import JEditor from '/@/components/Form/src/jeecg/components/JEditor.vue'; import downloadAssembly from '/@/views/zy/jiaoXueDanYuanNeiRong/downloadAssembly.vue'; + import { encryptByBase64 } from '/@/utils/cipher'; //当前路由信息 const { currentRoute } = useRouter(); @@ -550,9 +551,17 @@ function handleVideo(three){ } function viewThreePage(three) { - threePageOpen.value = true; - threePageDisableSubmit.value = true; - threePageData.value = { three }; + if (three.type == 'video') { + handleVideo(three); + } else if (three.type == 'document') { + var file = baseApiUrl + "/"+three.filePath; + window.open('https://fileview.jeecg.com/onlinePreview?url=' + encodeURIComponent(encryptByBase64(file))); + } else if (three.type == 'richText') { + threePageOpen.value = true; + threePageDisableSubmit.value = true; + threePageData.value = { three }; + } + } function threePageHandleOk(){ diff --git a/src/views/zy/zyInfo/StudentZyInfoList.vue b/src/views/zy/zyInfo/StudentZyInfoList.vue index 52f1259..54b8c90 100644 --- a/src/views/zy/zyInfo/StudentZyInfoList.vue +++ b/src/views/zy/zyInfo/StudentZyInfoList.vue @@ -35,7 +35,7 @@ 作业得分:{{ item.stuscore ? item.stuscore : '未评' }}分 互评分数:{{ item.xshpfs ? item.xshpfs : '未评' }}分 - 绩效分数:{{ item.jxfs ? item.jxfs : '未评' }}分 + 互评奖励:{{ item.jxfs ? item.jxfs : '未评' }}分 总分:{{ item.zzdf ? item.zzdf : '未评' }}分 diff --git a/src/views/zy/zyInfo/ZyInfoV2List.vue b/src/views/zy/zyInfo/ZyInfoV2List.vue index 76c630e..5415274 100644 --- a/src/views/zy/zyInfo/ZyInfoV2List.vue +++ b/src/views/zy/zyInfo/ZyInfoV2List.vue @@ -113,7 +113,8 @@ d