11wqe1 10 kuukautta sitten
vanhempi
commit
5704a28803

+ 38 - 0
src/components/pages/components/studentReport.vue

@@ -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>

+ 2 - 1
src/components/pages/components/worksDetail2.vue

@@ -656,7 +656,7 @@
                                 <div class="a_add_head">
                                   <div style="display: flex">
                                     {{ index1 + 1 + "、" }}
-                                    <div>
+                                    <div style="font-size: 14px;">
                                       题目:{{
                                        item1.teststitle
                                       }}
@@ -1580,6 +1580,7 @@
         :src="pptImgUrl"
         frameborder="0"
         width="100%"
+        style="height: 95%;"
       ></iframe>
     </el-dialog>
   </div>

+ 19 - 9
src/components/pages/works.vue

@@ -295,12 +295,12 @@
               filterable
               @change="searchWork2"
             >
-              <el-option label="所有学生" value></el-option>
+              <el-option label="所有班级" value></el-option>
               <el-option
                 v-for="item in userAarray"
-                :key="item.userid"
-                :label="item.username"
-                :value="item.userid"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
               ></el-option>
             </el-select>
           </div>
@@ -323,6 +323,16 @@
               min-width="20"
               align="center"
             ></el-table-column>
+            <el-table-column
+              label="班级"
+              min-width="20"
+              show-overflow-tooltip
+              align="center"
+            >
+            <template slot-scope="scope">
+              <div>{{ scope.row.class ? scope.row.class : '-' }}</div>
+            </template>
+            </el-table-column>
             <el-table-column align="center" label="操作" min-width="20">
               <template slot-scope="scope">
                 <el-button
@@ -536,6 +546,7 @@ export default {
       this.signDialog = true;
       this.isLoading2 = true;
       this.checkCourse = row ? row.courseId : this.checkCourse;
+      this.getCourseDetail();
       let params = {
         cid: this.checkCourse,
         uname: this.uname,
@@ -544,12 +555,11 @@ export default {
         page: this.page2,
       };
       this.ajax
-        .get(this.$store.state.api + "getCourseWorks3", params)
+        .get(this.$store.state.api + "getCourseWorks3Copy", params)
         .then((res) => {
-          this.isLoading2 = false;
+          this.isLoading2 = false; 
           this.total2 = res.data[0].length > 0 ? res.data[0][0].num : 0;
           this.res2 = res.data[0];
-          this.getCourseDetail();
         })
         .catch((err) => {
           this.isLoading2 = false;
@@ -603,9 +613,9 @@ export default {
         cid: this.checkCourse,
       };
       this.ajax
-        .get(this.$store.state.api + "getCourseWorksReport", params)
+        .get(this.$store.state.api + "getCourseReportClassList", params)
         .then((res) => {
-          this.userAarray = res.data[1];
+          this.userAarray = res.data[0];
         })
         .catch((err) => {
           console.error(err);