分页调整

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="pa">
<!-- <div class="pagination-info" style="margin-bottom: 10px; text-align: center; color: #666;">
{{ tableDataTotal }} 条记录
</div>-->
<a-pagination
v-if="tableDataTotal > 0"
:showSizeChanger="false"
:show-total="total => `${tableDataTotal}`"
:showSizeChanger="true"
:pageSizeOptions="['10', '20', '30', '40']"
:showQuickJumper="true"
:hideOnSinglePage="false"
:pageSize="pageSize"
@@ -130,6 +129,7 @@
:total="tableDataTotal"
class="pagination"
@change="changePagination"
@showSizeChange="handleSizeChange"
/>
</div>
</div>
@@ -210,18 +210,18 @@
</a-table>
<div class="course-pagination">
<!-- <div class="pagination-info" style="margin-bottom: 10px; text-align: center; color: #666;">
{{ courseTableTotal }} 条记录
</div>-->
<a-pagination
v-if="courseTableTotal > 0"
:showSizeChanger="false"
:show-total="total => `${courseTableTotal}`"
:showSizeChanger="true"
:pageSizeOptions="['10', '20', '30', '40']"
:showQuickJumper="true"
:hideOnSinglePage="false"
:pageSize="coursePageSize"
v-model:current="courseSearchParam.pageNo"
:total="courseTableTotal"
@change="changeCoursePagination"
@showSizeChange="changeCourseSizePagination"
/>
</div>
</div>
@@ -451,12 +451,17 @@ export default {
getTagList();
};
// 分页变化
const changePagination = (page) => {
state.searchParam.pageNo = page;
const handleSizeChange = (page, pageSize) => {
state.searchParam.pageNo = 1;
state.searchParam.pageSize = pageSize;
getTagList();
};
const changePagination = (page, pageSize) => {
state.searchParam.pageNo = page;
state.searchParam.pageSize = pageSize;
getTagList();
};
// 表格排序变化
const handleTableChange = (pagination, filters, sorter) => {
@@ -514,7 +519,7 @@ export default {
console.log("修改热点 参数 : ",record);
changeTagHot(record.id).then ((res) => {
console.log("修改热点 结果 : ",res);
if (res.status === 200) {
if (res.status === 200 ) {
console.log("更新成功");
}else {
record.isHot = false;
@@ -575,9 +580,14 @@ export default {
state.courseDialogVisible = false;
};
// 课程分页变化
const changeCoursePagination = (page) => {
const changeCoursePagination = (page, pageSize) => {
state.courseSearchParam.pageNo = page;
state.courseSearchParam.pageSize = pageSize;
getCourseListByTag();
};
const changeCourseSizePagination = (page, pageSize) => {
state.courseSearchParam.pageNo = 1;
state.courseSearchParam.pageSize = pageSize;
getCourseListByTag();
};
@@ -649,6 +659,7 @@ export default {
searchSubmit,
searchReset,
changePagination,
handleSizeChange,
handleTableChange,
handleRelTableChange,
handlePublicChange,
@@ -656,6 +667,7 @@ export default {
showCourseByTagg,
closeCourseDialog,
changeCoursePagination,
changeCourseSizePagination,
unbindCurrentTag,
formatDate,
exportTag,