Tang 2 anos atrás
pai
commit
6666a6d0ba

+ 24 - 7
src/pages/course-detail/components/CourseTree.vue

@@ -73,7 +73,9 @@
                     ></i
                     >{{ chapter.name }}
 
-                    <el-tag v-if="chapter.commonSign == 1" size="mini">公共章</el-tag>
+                    <el-tag v-if="chapter.commonSign == 1" size="mini"
+                      >公共章</el-tag
+                    >
                     <span
                       class="btn_status"
                       :class="
@@ -302,7 +304,9 @@
                     ></i
                     >{{ menu.menuName }}
 
-                    <el-tag v-if="menu.commonSign == 1" size="mini">公共章</el-tag>
+                    <el-tag v-if="menu.commonSign == 1" size="mini"
+                      >公共章</el-tag
+                    >
                     <span
                       class="btn_status"
                       :class="
@@ -725,13 +729,18 @@ export default {
         .reSectionExamList({
           chapterId: 0,
           courseId,
-          gradeId: this.gradeId
+          gradeId: this.gradeId,
+          orderGoodsId: this.orderGoodsId
         })
         .then(res => {
           this.sectionExamList = res.data;
         });
       return this.$request
-        .reMenuList({ courseId, gradeId: this.gradeId })
+        .reMenuList({
+          courseId,
+          gradeId: this.gradeId,
+          orderGoodsId: this.orderGoodsId
+        })
         .then(res => {
           for (let i = 0; i < res.rows.length; i++) {
             let item = res.rows[i];
@@ -757,6 +766,7 @@ export default {
         .reChapterList({
           moduleId: id,
           gradeId: this.gradeId,
+          orderGoodsId: this.orderGoodsId,
           courseId: courseId,
           rebuild: isRebuild ? 1 : undefined
         })
@@ -793,7 +803,8 @@ export default {
         .reSectionExamList({
           chapterId: chapterId || menuId,
           courseId,
-          gradeId: this.gradeId
+          gradeId: this.gradeId,
+          orderGoodsId: this.orderGoodsId
         })
         .then(res => {
           this.sectionExam = [...this.sectionExam, ...res.data];
@@ -804,7 +815,8 @@ export default {
           gradeId: this.gradeId,
           courseId,
           rebuild: isRebuild ? 1 : undefined,
-          moduleId: moduleId || 0
+          moduleId: moduleId || 0,
+          orderGoodsId: this.orderGoodsId
         })
         .then(res => {
           chapter.canLearn = res.data
@@ -822,6 +834,7 @@ export default {
       return this.$request
         .studyrecordgoodsAllListWithExam({
           gradeId: this.gradeId,
+          orderGoodsId: this.orderGoodsId,
           goodsId: this.goodsId,
           rebuild: this.rebuild
         })
@@ -1071,7 +1084,8 @@ export default {
         this.$request
           .goodsTodayStudySectionNum({
             goodsId: this.goodsId,
-            gradeId: this.gradeId
+            gradeId: this.gradeId,
+            orderGoodsId: this.orderGoodsId
           })
           .then(res => {
             resolve(res.data);
@@ -1084,6 +1098,7 @@ export default {
           .gradeCheckGoodsStudy({
             goodsId: this.goodsId,
             gradeId: this.gradeId,
+            orderGoodsId: this.orderGoodsId,
             moduleId: option.moduleId || 0,
             chapterId: option.chapterId || 0,
             sectionId: option.sectionId || option.menuId
@@ -1099,6 +1114,7 @@ export default {
           .bankRecordDoNum({
             goodsId: this.goodsId,
             gradeId: this.gradeId,
+            orderGoodsId: this.orderGoodsId,
             chapterId: section.chapterId,
             courseId: this.courseId,
             moduleId: 0,
@@ -1207,6 +1223,7 @@ export default {
           .studyRecordMenuAllListWithExam({
             courseId,
             gradeId: this.gradeId,
+            orderGoodsId: this.orderGoodsId,
             goodsId: this.goodsId
           })
           .then(res => {

+ 42 - 11
src/pages/course-detail/index.vue

@@ -1249,6 +1249,7 @@ export default {
         .reChapterList({
           moduleId: id,
           gradeId: this.gradeId,
+          orderGoodsId: this.orderGoodsId,
           courseId: courseId,
           rebuild: isRebuild ? 1 : undefined
         })
@@ -1299,6 +1300,7 @@ export default {
         .reSectionExamList({
           chapterId: chapterId || menuId,
           courseId: this.courseId,
+          orderGoodsId: this.orderGoodsId,
           gradeId: this.gradeId
         })
         .then(res => {
@@ -1311,6 +1313,8 @@ export default {
         .reSectionList({
           chapterId: id,
           gradeId: this.gradeId,
+
+          orderGoodsId: this.orderGoodsId,
           courseId: courseId,
           rebuild: isRebuild ? 1 : undefined,
           moduleId: moduleId || 0
@@ -1550,6 +1554,8 @@ export default {
           .studyRecordMenuAllListWithExam({
             courseId: this.courseId,
             gradeId: this.gradeId,
+
+            orderGoodsId: this.orderGoodsId,
             goodsId: this.goodsId
           })
           .then(res => {
@@ -1738,7 +1744,9 @@ export default {
         this.playTime = polyvPlayerContext.j2s_getCurrentTime(); //播放时刻
         if (
           this.sectionItem.learning != 1 &&
-          (this.goodsData.erJianErZao || this.goodsData.jjShiGongYuan && this.orderYears || this.photoNum > 0)
+          (this.goodsData.erJianErZao ||
+            (this.goodsData.jjShiGongYuan && this.orderYears) ||
+            this.photoNum > 0)
         ) {
           this.configPhoto();
           let photoTime = 0; //获取拍照秒数
@@ -1775,6 +1783,7 @@ export default {
           goodsId: parseInt(self.goodsId),
           courseId: parseInt(self.courseId),
           gradeId: self.gradeId,
+          orderGoodsId: this.orderGoodsId,
           chapterId: parseInt(self.chapterId),
           moduleId: parseInt(self.moduleId)
         };
@@ -1884,8 +1893,11 @@ export default {
           return;
         }
         if (this.goodsData.jjShiGongYuan && this.orderYears) {
-          console.log(this.orderYears,'orderYears')
-          this.photoList = this.randomConfigJjShiGongYuan(totalVideoTime, duration);
+          console.log(this.orderYears, "orderYears");
+          this.photoList = this.randomConfigJjShiGongYuan(
+            totalVideoTime,
+            duration
+          );
           return;
         }
         //没有历史拍照间隔数据
@@ -1950,13 +1962,13 @@ export default {
       }
     },
     //施工继教带年份的订单拍照设置
-    randomConfigJjShiGongYuan(totalVideoTime){
+    randomConfigJjShiGongYuan(totalVideoTime) {
       this.photoHistoryList = [];
-      let time1 = 2701//拍照间隔多久一张 45分钟
-      let num = Math.trunc(totalVideoTime / time1) + 1;//拍照数量
-      let photoList = []
-      for(let i = 0; i < num;i++){
-        photoList.push(i*time1)
+      let time1 = 2701; //拍照间隔多久一张 45分钟
+      let num = Math.trunc(totalVideoTime / time1) + 1; //拍照数量
+      let photoList = [];
+      for (let i = 0; i < num; i++) {
+        photoList.push(i * time1);
       }
       return photoList;
     },
@@ -2010,6 +2022,7 @@ export default {
           courseId,
           photoTime: parseInt(currentTime > 0 ? currentTime : 0),
           gradeId: parseInt(self.gradeId),
+          orderGoodsId: this.orderGoodsId,
           photoIndex: postTime ? -2 : parseInt(photoIndex), //从0算起,-2只提交随机时间
           photoNum: parseInt(self.photoNum),
           chapterId,
@@ -2218,7 +2231,11 @@ export default {
         //最外层节有menuid
         //普通章节目录
         this.$request
-          .reMenuList({ courseId: this.courseId, gradeId: this.gradeId })
+          .reMenuList({
+            courseId: this.courseId,
+            gradeId: this.gradeId,
+            orderGoodsId: this.orderGoodsId
+          })
           .then(res => {
             for (let i = 0; i < res.rows.length; i++) {
               let item = res.rows[i];
@@ -2235,6 +2252,7 @@ export default {
             .reMenuList({
               courseId: this.courseId,
               gradeId: this.gradeId,
+              orderGoodsId: this.orderGoodsId,
               rebuild: 1
             })
             .then(res => {
@@ -2282,6 +2300,7 @@ export default {
           .reSectionList({
             chapterId: sectionItem.chapterId,
             gradeId: this.gradeId,
+            orderGoodsId: this.orderGoodsId,
             courseId: this.courseId,
             moduleId: 0
           })
@@ -2310,6 +2329,7 @@ export default {
             .reSectionList({
               chapterId: rebuildObj.chapterId,
               gradeId: this.gradeId,
+              orderGoodsId: this.orderGoodsId,
               courseId: this.courseId,
               moduleId: 0,
               rebuild: 1
@@ -2337,6 +2357,7 @@ export default {
             .reMenuList({
               courseId: this.courseId,
               gradeId: this.gradeId,
+              orderGoodsId: this.orderGoodsId,
               rebuild: 1
             })
             .then(res => {
@@ -2384,6 +2405,7 @@ export default {
           .reSectionList({
             chapterId: sectionItem.chapterId,
             gradeId: this.gradeId,
+            orderGoodsId: this.orderGoodsId,
             courseId: this.courseId,
             moduleId: sectionItem.moduleId
           })
@@ -2418,6 +2440,7 @@ export default {
             .reSectionList({
               chapterId: rebuildObj.chapterId,
               gradeId: this.gradeId,
+              orderGoodsId: this.orderGoodsId,
               courseId: this.courseId,
               moduleId: rebuildObj.moduleId,
               rebuild: 1
@@ -2454,6 +2477,7 @@ export default {
             .reMenuList({
               courseId: this.courseId,
               gradeId: this.gradeId,
+              orderGoodsId: this.orderGoodsId,
               rebuild: 1
             })
             .then(res => {
@@ -2504,6 +2528,7 @@ export default {
         let data = {
           gradeId: Number(self.gradeId),
           goodsId: Number(self.goodsId),
+          orderGoodsId: this.orderGoodsId,
           sectionId: Number(self.playSectionId),
           courseId: Number(self.courseId),
           chapterId: parseInt(self.chapterId),
@@ -2551,6 +2576,7 @@ export default {
         .getRebuildCourse({
           goodsId: this.goodsId,
           rebuild: 1,
+          orderGoodsId: this.orderGoodsId,
           gradeId: this.gradeId
         })
         .then(async res => {
@@ -2581,7 +2607,11 @@ export default {
           }
         }
         this.$request
-          .courseCourseList({ goodsId: this.goodsId, gradeId: this.gradeId })
+          .courseCourseList({
+            goodsId: this.goodsId,
+            orderGoodsId: this.orderGoodsId,
+            gradeId: this.gradeId
+          })
           .then(async res => {
             this.courseList = res.rows;
             console.error("res.rows", res.rows);
@@ -2679,6 +2709,7 @@ export default {
       let data = {
         gradeId: this.gradeId,
         goodsId: this.goodsId,
+        orderGoodsId: this.orderGoodsId,
         sectionId: this.playSectionId,
         courseId: this.courseId,
         noteText: this.textareaNote,