diff --git a/src/api/modules/test.js b/src/api/modules/test.js index fea0bce1..068039fc 100644 --- a/src/api/modules/test.js +++ b/src/api/modules/test.js @@ -41,15 +41,25 @@ const pulish = function(id, publish) { if (!publish) { flag = publish; } - + return ajax.post('/xboe/m/exam/test/publish?id=' + id + '&publish=' + flag); } +/** + *@parma{ + * testId 考试id + *} + */ +const exports=function (query){ + return ajax.post('/xboe/m/exam/alone/answer/export',query,{responseType: 'blob'}); +} + export default { detail, update, del, save, querylist, - pulish + pulish, + exports } diff --git a/src/views/StudyIndex.vue b/src/views/StudyIndex.vue index 3c44cc33..1adfa426 100644 --- a/src/views/StudyIndex.vue +++ b/src/views/StudyIndex.vue @@ -130,11 +130,15 @@ // cmtask_status:this.cmtask_status, // cmtask_name:this.cmtask_name, } + apiBoeCourse.cmtaskList(params).then(res=>{ if(res.status==200){ this.total = res.result.count this.couresList = res.result.list; this.loading = false; + if(this.$route.fullPath != '/uc/study/task' && this.$route.fullPath != '/uc/study/courses' && this.$route.fullPath != '/study/index') { + return; + } if(res.result.count > 0) { this.$router.push('/uc/study/task') } else { @@ -147,8 +151,10 @@ }else{ this.$router.push('/uc/study/courses') } - // this.pageData.list = res.result.list; }).catch(err=>{ + if(this.$route.fullPath != '/uc/study/task' || this.$route.fullPath != '/uc/study/courses' || this.$route.fullPath != '/study/index') { + return; + } this.$router.push('/uc/study/courses'); }) }, diff --git a/src/views/exam/ExamList.vue b/src/views/exam/ExamList.vue index 545d1dc3..c16ce37f 100644 --- a/src/views/exam/ExamList.vue +++ b/src/views/exam/ExamList.vue @@ -470,7 +470,7 @@