lsc il y a 2 ans
Parent
commit
88b1e00938
1 fichiers modifiés avec 48 ajouts et 17 suppressions
  1. 48 17
      src/components/pages/student/addCourse.vue

+ 48 - 17
src/components/pages/student/addCourse.vue

@@ -2642,6 +2642,7 @@ export default {
             checkboxList: [],
             checkboxList2: [],
             checkboxList3: [],
+            checkboxListPeople:[],
             number: "",
             tTitle: "",
             tdetail: "",
@@ -3036,8 +3037,11 @@ export default {
                         this.addWork();
                     } else {
                         if (this.userid != this.courseUserid) {
-                            // this.updateWork2();
-                            this.updateWork();
+                            if(this.checkboxListPeople.join(",") != this.checkboxList3.join(",")){
+                                this.updateWork();
+                            }else{
+                                this.updateWork2();
+                            }
                         } else {
                             this.updateWork();
                         }
@@ -3104,8 +3108,11 @@ export default {
                         return;
                     }
                     if (this.userid != this.courseUserid) {
-                        // this.updateWork2();
-                        this.updateWork();
+                        if(this.checkboxListPeople.join(",") != this.checkboxList3.join(",")){
+                                this.updateWork();
+                            }else{
+                                this.updateWork2();
+                            }
                     } else {
                         this.updateWork();
                     }
@@ -3117,8 +3124,11 @@ export default {
                         this.addWork();
                     } else {
                         if (this.userid != this.courseUserid) {
-                            // this.updateWork2();
-                            this.updateWork();
+                            if(this.checkboxListPeople.join(",") != this.checkboxList3.join(",")){
+                                this.updateWork();
+                            }else{
+                                this.updateWork2();
+                            }
                         } else {
                             this.updateWork();
                         }
@@ -3182,8 +3192,11 @@ export default {
                         return;
                     }
                     if (this.userid != this.courseUserid) {
-                        // this.updateWork2();
-                        this.updateWork();
+                        if(this.checkboxListPeople.join(",") != this.checkboxList3.join(",")){
+                                this.updateWork();
+                            }else{
+                                this.updateWork2();
+                            }
                     } else {
                         this.updateWork();
                     }
@@ -3221,8 +3234,11 @@ export default {
                             this.addWork();
                         } else {
                             if (this.userid != this.courseUserid) {
-                                // this.updateWork2();
+                                if(this.checkboxListPeople.join(",") != this.checkboxList3.join(",")){
                                 this.updateWork();
+                            }else{
+                                this.updateWork2();
+                            }
                             } else {
                                 this.updateWork();
                             }
@@ -3268,8 +3284,11 @@ export default {
                                 this.steps++;
                             }
                             if (this.userid != this.courseUserid) {
-                                // this.updateWork2();
+                                if(this.checkboxListPeople.join(",") != this.checkboxList3.join(",")){
                                 this.updateWork();
+                            }else{
+                                this.updateWork2();
+                            }
                             } else {
                                 this.updateWork();
                             }
@@ -3277,8 +3296,8 @@ export default {
                     }
                 } else if (this.steps == 4) {
                     if (this.userid != this.courseUserid) {
-                        // this.updateWork2();
-                        this.updateWork();
+                        this.updateWork2();
+                        // this.updateWork();
                     } else {
                         this.updateWork();
                     }
@@ -3291,8 +3310,11 @@ export default {
                             this.addWork();
                         } else {
                             if (this.userid != this.courseUserid) {
-                                // this.updateWork2();
+                                if(this.checkboxListPeople.join(",") != this.checkboxList3.join(",")){
                                 this.updateWork();
+                            }else{
+                                this.updateWork2();
+                            }
                             } else {
                                 this.updateWork();
                             }
@@ -3348,8 +3370,11 @@ export default {
                                 this.steps++;
                             }
                             if (this.userid != this.courseUserid) {
-                                // this.updateWork2();
+                                if(this.checkboxListPeople.join(",") != this.checkboxList3.join(",")){
                                 this.updateWork();
+                            }else{
+                                this.updateWork2();
+                            }
                             } else {
                                 this.updateWork();
                             }
@@ -3357,8 +3382,11 @@ export default {
                     }
                 } else if (this.steps == 4) {
                     if (this.userid != this.courseUserid) {
-                        // this.updateWork2();
-                        this.updateWork();
+                        if(this.checkboxListPeople.join(",") != this.checkboxList3.join(",")){
+                                this.updateWork();
+                            }else{
+                                this.updateWork2();
+                            }
                     } else {
                         this.updateWork();
                     }
@@ -5062,6 +5090,7 @@ export default {
                             });
                         }
                     }
+                    this.checkboxListPeople = JSON.parse(JSON.stringify(this.checkboxList3))
                     this.number = this.nbOrder;
                     this.courseId = this.cid;
                 })
@@ -6274,6 +6303,8 @@ export default {
                             res.data[0][0].juri.split(",") : [];
                         this.checkboxList3 = res.data[0][0].course_teacher ?
                             res.data[0][0].course_teacher.split(",") : [];
+                        this.checkboxListPeople = res.data[0][0].course_teacher ?
+                            res.data[0][0].course_teacher.split(",") : [];
                         // this.isTeacherSee =
                         //   res.data[0][0].is_teacher_look == 0 ? true : false;
                         this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
@@ -6842,7 +6873,7 @@ export default {
                 this.checkboxList3.push(uid)
                 this.setMan();
             }
-            debugger
+            // debugger
             if (
                 this.unitJson[i].chapterInfo[0].taskJson[task].people != uid && (!this.unitJson[i].chapterInfo[0].taskJson[task].tcMember || this.unitJson[i].chapterInfo[0].taskJson[task].tcMember.indexOf(uid) == -1)
             ) {