分页调整

This commit is contained in:
670788339
2025-11-07 15:16:19 +08:00
parent 783a60a257
commit ddee3ea13f

View File

@@ -117,12 +117,11 @@
<div class="tableBox"> <div class="tableBox">
<div class="pa"> <div class="pa">
<!-- <div class="pagination-info" style="margin-bottom: 10px; text-align: center; color: #666;">
{{ tableDataTotal }} 条记录
</div>-->
<a-pagination <a-pagination
v-if="tableDataTotal > 0" v-if="tableDataTotal > 0"
:showSizeChanger="false" :show-total="total => `${tableDataTotal}`"
:showSizeChanger="true"
:pageSizeOptions="['10', '20', '30', '40']"
:showQuickJumper="true" :showQuickJumper="true"
:hideOnSinglePage="false" :hideOnSinglePage="false"
:pageSize="pageSize" :pageSize="pageSize"
@@ -130,6 +129,7 @@
:total="tableDataTotal" :total="tableDataTotal"
class="pagination" class="pagination"
@change="changePagination" @change="changePagination"
@showSizeChange="handleSizeChange"
/> />
</div> </div>
</div> </div>
@@ -210,18 +210,18 @@
</a-table> </a-table>
<div class="course-pagination"> <div class="course-pagination">
<!-- <div class="pagination-info" style="margin-bottom: 10px; text-align: center; color: #666;">
{{ courseTableTotal }} 条记录
</div>-->
<a-pagination <a-pagination
v-if="courseTableTotal > 0" v-if="courseTableTotal > 0"
:showSizeChanger="false" :show-total="total => `${courseTableTotal}`"
:showSizeChanger="true"
:pageSizeOptions="['10', '20', '30', '40']"
:showQuickJumper="true" :showQuickJumper="true"
:hideOnSinglePage="false" :hideOnSinglePage="false"
:pageSize="coursePageSize" :pageSize="coursePageSize"
v-model:current="courseSearchParam.pageNo" v-model:current="courseSearchParam.pageNo"
:total="courseTableTotal" :total="courseTableTotal"
@change="changeCoursePagination" @change="changeCoursePagination"
@showSizeChange="changeCourseSizePagination"
/> />
</div> </div>
</div> </div>
@@ -451,12 +451,17 @@ export default {
getTagList(); getTagList();
}; };
// 分页变化 const handleSizeChange = (page, pageSize) => {
const changePagination = (page) => { state.searchParam.pageNo = 1;
state.searchParam.pageNo = page; state.searchParam.pageSize = pageSize;
getTagList(); getTagList();
}; };
const changePagination = (page, pageSize) => {
state.searchParam.pageNo = page;
state.searchParam.pageSize = pageSize;
getTagList();
};
// 表格排序变化 // 表格排序变化
const handleTableChange = (pagination, filters, sorter) => { const handleTableChange = (pagination, filters, sorter) => {
@@ -575,9 +580,14 @@ export default {
state.courseDialogVisible = false; state.courseDialogVisible = false;
}; };
// 课程分页变化 const changeCoursePagination = (page, pageSize) => {
const changeCoursePagination = (page) => {
state.courseSearchParam.pageNo = page; state.courseSearchParam.pageNo = page;
state.courseSearchParam.pageSize = pageSize;
getCourseListByTag();
};
const changeCourseSizePagination = (page, pageSize) => {
state.courseSearchParam.pageNo = 1;
state.courseSearchParam.pageSize = pageSize;
getCourseListByTag(); getCourseListByTag();
}; };
@@ -649,6 +659,7 @@ export default {
searchSubmit, searchSubmit,
searchReset, searchReset,
changePagination, changePagination,
handleSizeChange,
handleTableChange, handleTableChange,
handleRelTableChange, handleRelTableChange,
handlePublicChange, handlePublicChange,
@@ -656,6 +667,7 @@ export default {
showCourseByTagg, showCourseByTagg,
closeCourseDialog, closeCourseDialog,
changeCoursePagination, changeCoursePagination,
changeCourseSizePagination,
unbindCurrentTag, unbindCurrentTag,
formatDate, formatDate,
exportTag, exportTag,