guhongwei 4 年之前
父节点
当前提交
d305fe1054
共有 1 个文件被更改,包括 10 次插入6 次删除
  1. 10 6
      src/views/class/index.vue

+ 10 - 6
src/views/class/index.vue

@@ -88,7 +88,7 @@ export default {
       navShow: true,
       navShow: true,
       // 班级信息
       // 班级信息
       // 头部标签
       // 头部标签
-      activeName: 'first',
+      activeName: 'forth',
       // 小组列表
       // 小组列表
       groupList: [],
       groupList: [],
       // 登陆者所在组,id
       // 登陆者所在组,id
@@ -265,11 +265,15 @@ export default {
     },
     },
     // forth作业成绩
     // forth作业成绩
     async searchHomework() {
     async searchHomework() {
-      let classid = this.user.classid;
-      const res = await this.uploadtasklist({ classid });
-      for (const val of res.data) {
-        var arr = this.studentList.filter(item => item.id === val.studentid);
-        this.$set(this, `homeworkList`, arr);
+      if (this.user.job == '学委') {
+        this.$set(this, `homeworkList`, this.studentList);
+      } else {
+        let classid = this.user.classid;
+        const res = await this.uploadtasklist({ classid });
+        for (const val of res.data) {
+          var arr = this.studentList.filter(item => item.id === val.studentid);
+          this.$set(this, `homeworkList`, arr);
+        }
       }
       }
     },
     },
     // 当前学生上传科目成绩
     // 当前学生上传科目成绩