mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-06 17:36:44 +08:00
补交文件
This commit is contained in:
@@ -91,6 +91,11 @@
|
|||||||
导出
|
导出
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col>
|
||||||
|
<a-button class="cus-btn" style="background: #4ea6ff; color: #fff; width: 150px" @click="exportStudy">
|
||||||
|
导出详细学习记录
|
||||||
|
</a-button>
|
||||||
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<div style="margin-top: 20px">
|
<div style="margin-top: 20px">
|
||||||
<a-table
|
<a-table
|
||||||
@@ -121,7 +126,8 @@ import dialog from "@/utils/dialog";
|
|||||||
import {ONLINE_COURSE_DEL} from "@/api/ThirdApi";
|
import {ONLINE_COURSE_DEL} from "@/api/ThirdApi";
|
||||||
import {useStore} from "vuex";
|
import {useStore} from "vuex";
|
||||||
import {useAsyncStu, useResetRef} from "@/utils/useCommon";
|
import {useAsyncStu, useResetRef} from "@/utils/useCommon";
|
||||||
|
import {downLoadXlsx} from "@/utils/zipdownload";
|
||||||
|
import {message} from "ant-design-vue";
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
permissions: {
|
permissions: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -323,7 +329,12 @@ function reset() {
|
|||||||
function exportStu() {
|
function exportStu() {
|
||||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudent?type=3&&thirdType=8&pid=${searchParams.value.pid}`);
|
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudent?type=3&&thirdType=8&pid=${searchParams.value.pid}`);
|
||||||
}
|
}
|
||||||
|
function exportStudy() {
|
||||||
|
if(studentList.value.length == 0){
|
||||||
|
return message.warning('暂无可导出的学习记录')
|
||||||
|
}
|
||||||
|
downLoadXlsx(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?type=4&&thirdType=8&pid=${searchParams.value.pid}`,'在线课学员学习记录')
|
||||||
|
}
|
||||||
defineExpose({
|
defineExpose({
|
||||||
searchStu,
|
searchStu,
|
||||||
loading,
|
loading,
|
||||||
|
|||||||
@@ -5,7 +5,16 @@ const mimeMap = {
|
|||||||
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
zip: 'application/zip'
|
zip: 'application/zip'
|
||||||
}
|
}
|
||||||
|
export function downLoadXlsx(str, filename) {
|
||||||
|
axios({
|
||||||
|
method: 'get',
|
||||||
|
url: str,
|
||||||
|
responseType: 'blob',
|
||||||
|
headers: { 'Authorization': 'Bearer ' + getCookieForName("token") }
|
||||||
|
}).then(res => {
|
||||||
|
resolveBlob(res, mimeMap.xlsx,filename)
|
||||||
|
})
|
||||||
|
}
|
||||||
const baseUrl = process.env.VUE_APP_ACT_API
|
const baseUrl = process.env.VUE_APP_ACT_API
|
||||||
export function downLoadZip(str, filename) {
|
export function downLoadZip(str, filename) {
|
||||||
var url = baseUrl + str
|
var url = baseUrl + str
|
||||||
|
|||||||
Reference in New Issue
Block a user