Parcourir la source

Merge branch 'master' into gzu_1st_main_20260830(考试培训)

dedsudiyu il y a 3 heures
Parent
commit
a435f37c25

+ 18 - 6
src/views/safetyEducationExaminationNew/workbench/ResourceCard.vue

@@ -70,6 +70,13 @@
           </div>
         </div>
       </div>
+      <pagination layout="total, prev, pager, next, jumper"
+                  v-show="total>0"
+                  :total="total"
+                  :page.sync="queryParams.page"
+                  :limit.sync="queryParams.pageSize"
+                  @pagination="rightExamUserCoursewareLearningList"
+      />
     </div>
   </div>
 </template>
@@ -90,6 +97,11 @@ export default {
       topLeftList:[],
       topRightList:[],
       bottomList:[],
+      queryParams:{
+        page:1,
+        pageSize:8,
+      },
+      total:0
     }
   },
   mounted(){
@@ -107,6 +119,7 @@ export default {
     bottomTableButton(index){
       if(this.bottomCheckIndex != index){
         this.$set(this,'bottomCheckIndex',index);
+        this.$set(this.queryParams,'page',1);
         this.rightExamUserCoursewareLearningList();
       }
     },
@@ -186,14 +199,13 @@ export default {
     },
     //视频
     rightExamUserCoursewareLearningList(){
-      let obj = {
-        page:1,
-        pageSize:6,
-        materialType:1,
-        disciplineTypeId:this.tableList[this.bottomCheckIndex].id,
-      }
+      let obj = JSON.parse(JSON.stringify(this.queryParams))
+      obj.materialType=1,
+      obj.disciplineTypeId=this.tableList[this.bottomCheckIndex].id,
       examUserCoursewareLearningList(obj).then(response => {
         this.$set(this, 'bottomList', response.data.records)
+        // this.$set(this, 'total', response.data.total)
+        this.$set(this, 'total', 111)
       })
     },
     //知识点题库