|
@@ -1,7 +1,10 @@
|
|
|
<template>
|
|
|
<div style="width: 100%; height: 100%">
|
|
|
<div class="sr_head">
|
|
|
+ <el-button v-if="seatNum > 0" type="primary" size="small" @click="upStu">上一位</el-button>
|
|
|
学生成长报告
|
|
|
+ <el-button v-if="seatNum < studentList.length-1" type="primary" style="margin-left: 0;" size="small" @click="nextStu">下一位</el-button>
|
|
|
+
|
|
|
<div class="sr_headBtnS">
|
|
|
<el-button type="primary" size="small" @click="downloadFile('https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/student01-%E5%AD%A6%E7%94%9F%E6%88%90%E9%95%BF%E6%8A%A5%E5%91%8A1719315423787.pdf');">导出报告</el-button>
|
|
|
<el-button style="margin-left: 10px;" @click="pageBack" type="primary" size="small">返回</el-button>
|
|
@@ -72,6 +75,8 @@ export default {
|
|
|
userid: "",
|
|
|
courseid: "",
|
|
|
scoid:"",
|
|
|
+ studentList:[],
|
|
|
+ seatNum:""
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -79,12 +84,44 @@ export default {
|
|
|
this.userid = this.checkStudent;
|
|
|
this.courseid = this.checkCourse;
|
|
|
this.scoid = this.oid;
|
|
|
+ this.getStudnet()
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
pageBack(){
|
|
|
this.$emit('cancelR');
|
|
|
},
|
|
|
+ getStudnet() {
|
|
|
+ //获取作业
|
|
|
+ let params = {
|
|
|
+ cid: this.courseid,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "getCourseWorksList", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.studentList = res.data[0];
|
|
|
+ this.studentList.forEach((e,index) => {
|
|
|
+ if (e.userid == this.userid) {
|
|
|
+ this.seatNum=index
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ upStu(){
|
|
|
+ if (this.seatNum > 0) {
|
|
|
+ this.seatNum--
|
|
|
+ this.userid = this.studentList[this.seatNum].userid
|
|
|
+ }
|
|
|
+ },
|
|
|
+ nextStu(){
|
|
|
+ if (this.seatNum < this.studentList.length) {
|
|
|
+ this.seatNum++
|
|
|
+ this.userid = this.studentList[this.seatNum].userid
|
|
|
+ }
|
|
|
+ },
|
|
|
downloadFile(url){
|
|
|
var credentials = {
|
|
|
accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
@@ -132,6 +169,7 @@ export default {
|
|
|
this.userid = this.checkStudent;
|
|
|
this.courseid = this.checkCourse;
|
|
|
this.scoid = this.oid;
|
|
|
+ this.getStudnet()
|
|
|
},
|
|
|
};
|
|
|
</script>
|