From bd09fd3c57a15c2007d60e448b6d68f3713c0f1a Mon Sep 17 00:00:00 2001 From: gengxin Date: Mon, 3 Mar 2025 19:25:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E8=AF=A6=E7=BB=86=E5=AD=A6?= =?UTF-8?q?=E4=B9=A0=E8=AE=B0=E5=BD=95=20-=20loading=20=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/student/OnlineClassModelStudent.vue | 10 ++-------- src/utils/zipdownload.js | 3 +-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/components/student/OnlineClassModelStudent.vue b/src/components/student/OnlineClassModelStudent.vue index b420fb4f..e9d7dcff 100644 --- a/src/components/student/OnlineClassModelStudent.vue +++ b/src/components/student/OnlineClassModelStudent.vue @@ -92,7 +92,7 @@ - 导出详细学习记录 @@ -330,19 +330,13 @@ function reset() { function exportStu() { window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudent?type=3&&thirdType=8&pid=${searchParams.value.pid}`); } -const exportDisabled = ref(false); const exportStudy = async () => { if(studentList.value.length == 0){ return message.warning('暂无可导出的学习记录') } - exportDisabled.value = true; console.log("开始执行 gx 刷新"); - try { - await downLoadXlsx(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?type=4&&thirdType=8&pid=${searchParams.value.pid}`,'在线课学员学习记录'); - } finally { - exportDisabled.value = false; - } + downLoadXlsx(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?type=4&&thirdType=8&pid=${searchParams.value.pid}`,'在线课学员学习记录'); } defineExpose({ searchStu, diff --git a/src/utils/zipdownload.js b/src/utils/zipdownload.js index f3cd5b84..59cd11ab 100644 --- a/src/utils/zipdownload.js +++ b/src/utils/zipdownload.js @@ -1,12 +1,11 @@ import axios from 'axios' -import {ref} from 'vue' import {getCookieForName} from "@/api/method"; const mimeMap = { xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', zip: 'application/zip' } -export async function downLoadXlsx(str, filename) { +export function downLoadXlsx(str, filename) { await axios({ method: 'get', url: str,