mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-07 01:46:42 +08:00
导出作业信息实时参数改为搜索参数
This commit is contained in:
@@ -351,6 +351,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
downParams: {},
|
||||
typePress: false,
|
||||
isHomeWork: false,
|
||||
catalogRecordTree:[],
|
||||
@@ -494,6 +495,7 @@ export default {
|
||||
pageIndex: this.learningSituation.pageIndex,
|
||||
pageSize: this.learningSituation.pageSize
|
||||
};
|
||||
this.downParams = params;
|
||||
apicourseStudy.studyContentRecords(params).then(res => {
|
||||
if (res.status === 200) {
|
||||
this.learningSituation.list = res.result.list;
|
||||
@@ -511,8 +513,8 @@ export default {
|
||||
let params = {
|
||||
courseName:this.manageStudyData.name,
|
||||
courseId: this.manageStudyData.id,
|
||||
status: this.learningSituation.status,
|
||||
name: this.learningSituation.name,
|
||||
status: this.downParams.status || '',
|
||||
name: this.downParams.name || '',
|
||||
contentId: this.contentId,
|
||||
}
|
||||
// window.open(`/systemapi/xboe/m/course/portal/export?contentId=${params.contentId}&courseName=${params.courseName}`)
|
||||
@@ -526,16 +528,12 @@ export default {
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
console.log(res,e,'----res---e---')
|
||||
try {
|
||||
const result = JSON.parse(e.target.result);
|
||||
if (result.status === 200 || result.success) {
|
||||
// 下载文件
|
||||
this.resolveBlob(res, 'application/zip',`${params.courseName}【作业】`)
|
||||
} else {
|
||||
this.$message.error(result.message);
|
||||
}
|
||||
} catch (error) {
|
||||
const result = JSON.parse(e.target.result);
|
||||
if (result.status === 200 || result.success) {
|
||||
// 下载文件
|
||||
this.resolveBlob(res, 'application/zip',`${params.courseName}【作业】`)
|
||||
} else {
|
||||
this.$message.error(result.message);
|
||||
}
|
||||
};
|
||||
reader.readAsText(res.data);
|
||||
|
||||
Reference in New Issue
Block a user