zengyicheng 2 年 前
コミット
bada83ef6b

+ 3 - 0
src/components/courseDetail.vue

@@ -11,6 +11,8 @@
                   userid +
                   '&oid=' +
                   oid +
+                  '&org='+
+                      org +
                   '&cid=' +
                   classId +
                   '&tType=' +
@@ -160,6 +162,7 @@ export default {
       id: this.$route.query.courseId,
       userid: this.$route.query.userid,
       oid: this.$route.query.oid,
+      org:this.$route.query.org,
       classId: this.$route.query.cid,
       tType: this.$route.query.tType,
       screenType: this.$route.query.screenType,

+ 27 - 0
src/components/index.vue

@@ -129,6 +129,8 @@
                       userid +
                       '&oid=' +
                       oid +
+                      '&org='+
+                      org +
                       '&cid=' +
                       classId +
                       '&tType=' +
@@ -190,6 +192,7 @@ export default {
       oid: this.$route.query.oid,
       classId: this.$route.query.cid,
       tType: this.$route.query.tType,
+      org: this.$route.query.org,
       screenType: this.$route.query.screenType,
       CourseType: [],
       CourseTypeJson: {},
@@ -462,6 +465,7 @@ export default {
             }
           }
           this.selectTypeByOid();
+          this.selectTypeByOrg();
         })
         .catch((err) => {
           console.error(err);
@@ -490,6 +494,29 @@ export default {
           console.error(err);
         });
     },
+    selectTypeByOrg() {
+      let params = {
+        oid: this.org,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectTypeByOrg", params)
+        .then((res) => {
+          for (var i = 0; i < res.data[0].length; i++) {
+            for (var j = 0; j < res.data[1].length; j++) {
+              if (res.data[0][i].id == res.data[1][j].pid) {
+                if (!this.CourseTypeJson[res.data[0][i].id]) {
+                  this.CourseTypeJson[res.data[0][i].id] = [];
+                }
+                this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
+              }
+            }
+          }
+          this.$forceUpdate();
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
   },
   created() {
     this.selectType();

+ 5 - 1
src/components/study.vue

@@ -102,6 +102,8 @@
                       userid +
                       '&oid=' +
                       oid +
+                      '&org='+
+                      org +
                       '&cid=' +
                       classId +
                       '&courseId=' +
@@ -677,7 +679,8 @@
                                   'https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/evaluation?userid=' +
                                   userid +
                                   '&oid=' +
-                                  oid
+                                  oid +'&org='+
+                      org
                                 "
                                 class="iframeCss"
                               ></iframe>
@@ -2118,6 +2121,7 @@ export default {
       classId: this.$route.query.cid,
       // courseTypeLine: this.$route.query.type,
       oid: this.$route.query.oid,
+      org:this.$router.query.org,
       tType: this.$route.query.tType,
       courseType: this.$route.query.type,
       screenType: this.$route.query.screenType,

+ 3 - 0
src/components/studyStudent.vue

@@ -106,6 +106,8 @@
                     userid +
                     '&oid=' +
                     oid +
+                    '&org=' +
+                    org +
                     '&cid=' +
                     classId +
                     '&courseId=' +
@@ -2384,6 +2386,7 @@ export default {
       classId: this.$route.query.cid,
       // courseTypeLine: this.$route.query.type,
       oid: this.$route.query.oid,
+      org: this.$router.query.org,
       tType: this.$route.query.tType,
       courseType: this.$route.query.type,
       screenType: this.$route.query.screenType,