mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
导出详细学习记录 - loading 更改 1
This commit is contained in:
@@ -332,13 +332,17 @@ function exportStu() {
|
|||||||
}
|
}
|
||||||
const exportLoading = ref(false);
|
const exportLoading = ref(false);
|
||||||
|
|
||||||
function exportStudy() {
|
const exportStudy = async () => {
|
||||||
if(studentList.value.length == 0){
|
if(studentList.value.length == 0){
|
||||||
return message.warning('暂无可导出的学习记录')
|
return message.warning('暂无可导出的学习记录')
|
||||||
}
|
}
|
||||||
exportLoading.value = true;
|
exportLoading.value = true;
|
||||||
let {loading} = downLoadXlsx(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?type=4&&thirdType=8&pid=${searchParams.value.pid}`,'在线课学员学习记录');
|
console.log("开始执行 gx 刷新");
|
||||||
exportLoading.value = loading;
|
try {
|
||||||
|
await downLoadXlsx(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?type=4&&thirdType=8&pid=${searchParams.value.pid}`,'在线课学员学习记录');
|
||||||
|
} finally {
|
||||||
|
exportLoading.value = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
defineExpose({
|
defineExpose({
|
||||||
searchStu,
|
searchStu,
|
||||||
|
|||||||
@@ -14,10 +14,6 @@ export function downLoadXlsx(str, filename) {
|
|||||||
headers: { 'Authorization': 'Bearer ' + getCookieForName("token") }
|
headers: { 'Authorization': 'Bearer ' + getCookieForName("token") }
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
resolveBlob(res, mimeMap.xlsx,filename)
|
resolveBlob(res, mimeMap.xlsx,filename)
|
||||||
return false;
|
|
||||||
}).catch(error =>{
|
|
||||||
console.log("downLoadXlsx error",error);
|
|
||||||
return false;
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const baseUrl = process.env.VUE_APP_ACT_API
|
const baseUrl = process.env.VUE_APP_ACT_API
|
||||||
|
|||||||
Reference in New Issue
Block a user