学院导出删除多余打印,联调完毕

This commit is contained in:
zhangsir
2024-07-30 09:54:37 +08:00
parent d3ed50f7d3
commit 4e4f120eb3
2 changed files with 4 additions and 6 deletions

View File

@@ -126,7 +126,7 @@ 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 {downLoadZipOne} from "@/utils/zipdownload"; import {downLoadXlsx} from "@/utils/zipdownload";
const props = defineProps({ const props = defineProps({
permissions: { permissions: {
type: String, type: String,
@@ -329,9 +329,7 @@ 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() { function exportStudy() {
console.log(formData.value,searchParams.value.pid,'formData.value') downLoadXlsx(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?type=3&&thirdType=8&pid=${searchParams.value.pid}`,'在线课学员')
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?type=3&&thirdType=8&pid=${searchParams.value.pid}`)
downLoadZipOne(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?type=3&&thirdType=8&pid=${searchParams.value.pid}`,formData.value.name)
} }
defineExpose({ defineExpose({
searchStu, searchStu,

View File

@@ -5,14 +5,14 @@ const mimeMap = {
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
zip: 'application/zip' zip: 'application/zip'
} }
export function downLoadZipOne(str, filename) { export function downLoadXlsx(str, filename) {
axios({ axios({
method: 'get', method: 'get',
url: str, url: str,
responseType: 'blob', responseType: 'blob',
headers: { 'Authorization': 'Bearer ' + getCookieForName("token") } headers: { 'Authorization': 'Bearer ' + getCookieForName("token") }
}).then(res => { }).then(res => {
resolveBlob(res, mimeMap.zip,filename) resolveBlob(res, mimeMap.xlsx,filename)
}) })
} }
const baseUrl = process.env.VUE_APP_ACT_API const baseUrl = process.env.VUE_APP_ACT_API