From a7f0b3349418a45daa2ad9afb163bc406a7649a3 Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Sat, 25 May 2024 14:25:18 +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/views/zy/zyInfo/StudentZyInfoList.vue | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/views/zy/zyInfo/StudentZyInfoList.vue b/src/views/zy/zyInfo/StudentZyInfoList.vue index 41899a8..abfe4fd 100644 --- a/src/views/zy/zyInfo/StudentZyInfoList.vue +++ b/src/views/zy/zyInfo/StudentZyInfoList.vue @@ -52,6 +52,7 @@ 详情 上传 + 下载 预览 @@ -82,6 +83,9 @@ import { defHttp } from '/@/utils/http/axios'; import { useMessage } from "/@/hooks/web/useMessage"; import { useRouter } from 'vue-router'; + import { downloadFile } from '/@/utils/common/renderUtils'; + import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'; + import { useGlobSetting } from '/@/hooks/setting'; import JInput from '/@/components/Form/src/jeecg/components/JInput.vue'; import ZyInfoModal from './components/ZyInfoModal.vue'; import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue'; @@ -105,6 +109,8 @@ const pageNo = ref(0); const pageSize = ref(6); const tableData = ref([]); +const globSetting = useGlobSetting(); +const baseApiUrl = globSetting.domainUrl; const labelCol = reactive({ @@ -173,9 +179,17 @@ //预览 function handlePreview(record){ - record.isYl = true; - ZyInfoStudentModalPage.value.disableSubmit = true; - ZyInfoStudentModalPage.value.edit(record); + // record.isYl = true; + // ZyInfoStudentModalPage.value.disableSubmit = true; + // ZyInfoStudentModalPage.value.edit(record); + + var url2 = getFileAccessHttpUrl(record.stuPdfPath) + let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2); + window.open(url,"_blank") + } + + function handleDownload(record){ + downloadFile(record.stuFilePath) } //获取选课人数