Parcourir la source

学生日志修改

zhangjie il y a 2 ans
Parent
commit
4e411a5681

+ 24 - 2
src/features/invigilation/StudentLogManage/StudentLogDetailDialog.vue

@@ -29,6 +29,18 @@
         </p>
       </el-table-column>
     </el-table>
+    <div class="part-page">
+      <el-pagination
+        background
+        layout="prev, pager, next,total,sizes,jumper"
+        :current-page="current"
+        :total="total"
+        :page-size.sync="size"
+        @size-change="toPage(1)"
+        @current-change="toPage"
+      >
+      </el-pagination>
+    </div>
     <div slot="footer"></div>
   </el-dialog>
 </template>
@@ -47,21 +59,31 @@ export default {
   data() {
     return {
       modalIsShow: false,
+      current: 1,
+      total: 0,
+      size: 10,
       dataList: [],
     };
   },
   methods: {
     visibleChange() {
-      this.getList();
+      this.toPage(1);
     },
     async getList() {
       const datas = {
         examStudentId: this.detailId,
+        pageNumber: this.current,
+        pageSize: this.size,
       };
 
       const res = await studentLogDetail(datas);
 
-      this.dataList = res.data.data;
+      this.dataList = res.data.data.records;
+      this.total = res.data.data.total;
+    },
+    toPage(page) {
+      this.current = page;
+      this.getList();
     },
     cancel() {
       this.modalIsShow = false;