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:
@@ -126,7 +126,7 @@ import dialog from "@/utils/dialog";
|
||||
import {ONLINE_COURSE_DEL} from "@/api/ThirdApi";
|
||||
import {useStore} from "vuex";
|
||||
import {useAsyncStu, useResetRef} from "@/utils/useCommon";
|
||||
import {downLoadZip} from "@/utils/zipdownload";
|
||||
import {downLoadZipOne} from "@/utils/zipdownload";
|
||||
const props = defineProps({
|
||||
permissions: {
|
||||
type: String,
|
||||
@@ -329,7 +329,9 @@ function exportStu() {
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudent?type=3&&thirdType=8&pid=${searchParams.value.pid}`);
|
||||
}
|
||||
function exportStudy() {
|
||||
downLoadZip(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail`,'暂不可用')
|
||||
console.log(formData.value,'formData.value')
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?contentId=${formData.value.id}&courseName=${formData.value.name}`)
|
||||
downLoadZipOne(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?contentId=${formData.value.id}&courseName=${formData.value.name}`,formData.value.name)
|
||||
}
|
||||
defineExpose({
|
||||
searchStu,
|
||||
|
||||
@@ -5,7 +5,16 @@ const mimeMap = {
|
||||
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
zip: 'application/zip'
|
||||
}
|
||||
|
||||
export function downLoadZipOne(str, filename) {
|
||||
axios({
|
||||
method: 'get',
|
||||
url: str,
|
||||
responseType: 'blob',
|
||||
headers: { 'Authorization': 'Bearer ' + getCookieForName("token") }
|
||||
}).then(res => {
|
||||
resolveBlob(res, mimeMap.zip,filename)
|
||||
})
|
||||
}
|
||||
const baseUrl = process.env.VUE_APP_ACT_API
|
||||
export function downLoadZip(str, filename) {
|
||||
var url = baseUrl + str
|
||||
|
||||
Reference in New Issue
Block a user