mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
提交修改
This commit is contained in:
@@ -41,15 +41,25 @@ const pulish = function(id, publish) {
|
|||||||
if (!publish) {
|
if (!publish) {
|
||||||
flag = publish;
|
flag = publish;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ajax.post('/xboe/m/exam/test/publish?id=' + id + '&publish=' + flag);
|
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 {
|
export default {
|
||||||
detail,
|
detail,
|
||||||
update,
|
update,
|
||||||
del,
|
del,
|
||||||
save,
|
save,
|
||||||
querylist,
|
querylist,
|
||||||
pulish
|
pulish,
|
||||||
|
exports
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,11 +130,15 @@
|
|||||||
// cmtask_status:this.cmtask_status,
|
// cmtask_status:this.cmtask_status,
|
||||||
// cmtask_name:this.cmtask_name,
|
// cmtask_name:this.cmtask_name,
|
||||||
}
|
}
|
||||||
|
|
||||||
apiBoeCourse.cmtaskList(params).then(res=>{
|
apiBoeCourse.cmtaskList(params).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
this.total = res.result.count
|
this.total = res.result.count
|
||||||
this.couresList = res.result.list;
|
this.couresList = res.result.list;
|
||||||
this.loading = false;
|
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) {
|
if(res.result.count > 0) {
|
||||||
this.$router.push('/uc/study/task')
|
this.$router.push('/uc/study/task')
|
||||||
} else {
|
} else {
|
||||||
@@ -147,8 +151,10 @@
|
|||||||
}else{
|
}else{
|
||||||
this.$router.push('/uc/study/courses')
|
this.$router.push('/uc/study/courses')
|
||||||
}
|
}
|
||||||
// this.pageData.list = res.result.list;
|
|
||||||
}).catch(err=>{
|
}).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');
|
this.$router.push('/uc/study/courses');
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -470,7 +470,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="padding: 0px 5px">
|
<div style="padding: 0px 5px">
|
||||||
<el-button icon="el-icon-search" type="primary" @click="getResults()">搜索</el-button>
|
<el-button icon="el-icon-search" type="primary" @click="getResults()">搜索</el-button>
|
||||||
<el-button icon="el-icon-search" type="primary" @click="exportAnswers()">导出成绩</el-button>
|
<el-button icon="el-icon-download" type="primary" @click="exportsList()">导出成绩</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -754,6 +754,26 @@ export default {
|
|||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
exportsList(){
|
||||||
|
if(this.answerData.data.length == 0){
|
||||||
|
return this.$message.warning('暂无导出数据!')
|
||||||
|
}
|
||||||
|
console.log(this.answerData.row.id,'this.answerData.row.id');
|
||||||
|
apiTest.exports({testId: this.answerData.row.id}).then(res=>{
|
||||||
|
if(res.status){
|
||||||
|
this.$message.error(res.message)
|
||||||
|
} else {
|
||||||
|
const link = document.createElement('a');// 创建a标签
|
||||||
|
let blob = new Blob([res],{type: 'application/vnd.ms-excel;charset=UTF-8'}); // 设置文件类型
|
||||||
|
link.style.display = "none";
|
||||||
|
link.href = URL.createObjectURL(blob); // 创建URL
|
||||||
|
link.setAttribute("download", "成绩.xls");
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
document.body.removeChild(link);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
changePaper(e) {
|
changePaper(e) {
|
||||||
this.questDirOptions.forEach(item=>{
|
this.questDirOptions.forEach(item=>{
|
||||||
if(item.id == e) {
|
if(item.id == e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user