Parcourir la source

reSubmitPageList分页

gcz il y a 2 mois
Parent
commit
c96b476a8a
1 fichiers modifiés avec 18 ajouts et 3 suppressions
  1. 18 3
      src/views/windowTicketSales/rebook.vue

+ 18 - 3
src/views/windowTicketSales/rebook.vue

@@ -3,7 +3,7 @@
  * @Author: gcz
  * @Date: 2025-02-21 14:56:50
  * @LastEditors: gcz
- * @LastEditTime: 2025-02-21 17:24:36
+ * @LastEditTime: 2025-02-21 17:33:33
  * @FilePath: \great_webui\src\views\windowTicketSales\rebook.vue
  * @Copyright: Copyright (c) 2016~2025 by gcz, All Rights Reserved. 
 -->
@@ -71,6 +71,15 @@
       </el-table-column>
     </el-table>
 
+    <!-- 分页组件 -->
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
     <!-- 改签对话框 -->
     <el-dialog title="订单改签" :visible.sync="rebookDialog" width="500px" append-to-body @open="handleDialogOpen">
       <div class="tip-box">
@@ -147,7 +156,9 @@ export default {
         memberMobile: undefined,
         idcard: undefined,
         performName: undefined,
-        status: undefined
+        status: undefined,
+        pageNum: 1,
+        pageSize: 10
       },
       // 改签列表数据
       rebookList: [],
@@ -172,7 +183,9 @@ export default {
       codeTime: null,
       // 成功对话框
       successDialog: false,
-      newOrderId: ''
+      newOrderId: '',
+      // 总条数
+      total: 0
     }
   },
   created() {
@@ -183,6 +196,7 @@ export default {
       this.loading = true
       reSubmitPageList(this.queryParams).then(response => {
         this.rebookList = response.data.rows
+        this.total = response.data.total
         this.loading = false
       })
     },
@@ -191,6 +205,7 @@ export default {
     },
     resetQuery() {
       this.$refs.queryForm.resetFields()
+      this.queryParams.pageNum = 1  // 重置时将页码重置为1
       this.handleQuery()
     },
     handleRebook(row) {