فهرست منبع

feat: 分页调整

whh 9 ماه پیش
والد
کامیت
b5290b0f9b
2فایلهای تغییر یافته به همراه7 افزوده شده و 6 حذف شده
  1. 1 0
      src/components/Pagination/index.vue
  2. 6 6
      src/views/business/comparison/index.vue

+ 1 - 0
src/components/Pagination/index.vue

@@ -78,6 +78,7 @@ const pageSize = computed({
   }
 })
 function handleSizeChange(val) {
+  console.log( val );
   if (currentPage.value * val > props.total) {
     currentPage.value = 1
   }

+ 6 - 6
src/views/business/comparison/index.vue

@@ -82,15 +82,14 @@
           </template>
         </el-table-column> -->
       </el-table>
-      
+  
       <pagination
-        v-show="total>0"
+        v-show="total > 0"
         :total="total"
-        :page.sync="queryParams.pageNum"
-        :limit.sync="queryParams.pageSize"
+        v-model:page="queryParams.pageNum"
+        v-model:limit="queryParams.pageSize"
         @pagination="getList"
       />
-
     </el-card>
     <!-- 添加或修改信义预测对比对话框 -->
     <el-dialog :title="title" v-model="open" width="900px" append-to-body>
@@ -221,11 +220,12 @@ export default {
       const [ begin, end ] = this.queryParams.daterange || [];
       let timeBegin = '';
       let timeEnd = '';
-      console.log( begin, end );
+   
       if ( begin ) {
         timeBegin = dayjs(begin).format('YYYY/MM/DD H');
         timeEnd = dayjs(end).format('YYYY/MM/DD H');
       }
+      console.log( this.addDateRange(this.queryParams) );
       const params = { ...this.queryParams, timeBegin, timeEnd };
       delete params.daterange;
       listComparison(params).then(response => {