表格排序

This commit is contained in:
670788339
2025-10-28 09:33:11 +08:00
parent bd5178e601
commit 1f8926cde0

View File

@@ -285,7 +285,7 @@ export default {
title: "创建人", title: "创建人",
dataIndex: "sysCreateBy", dataIndex: "sysCreateBy",
key: "sysCreateBy", key: "sysCreateBy",
width: 180, width: 150,
align: "center" align: "center"
}, },
{ {
@@ -299,7 +299,7 @@ export default {
title: "更新人", title: "更新人",
dataIndex: "sysUpdateBy", dataIndex: "sysUpdateBy",
key: "sysUpdateBy", key: "sysUpdateBy",
width: 180, width: 150,
align: "center" align: "center"
}, },
{ {
@@ -323,14 +323,14 @@ export default {
title: "关联课程名称", title: "关联课程名称",
dataIndex: "courseName", dataIndex: "courseName",
key: "courseName", key: "courseName",
width: 200, width: 180,
align: "center" align: "center"
}, },
{ {
title: "关联课程ID", title: "关联课程ID",
dataIndex: "courseId", dataIndex: "courseId",
key: "courseId", key: "courseId",
width: 120, width: 80,
align: "center" align: "center"
}, },
{ {
@@ -437,7 +437,7 @@ export default {
}; };
const handleRelTableChange = (pagination, filters, sorter) => { const handleRelTableChange = (pagination, filters, sorter) => {
if (sorter.field === 'useCount') { if (sorter.field === 'sysCreateTime') {
// 处理排序逻辑 // 处理排序逻辑
console.log('REL排序字段:', sorter.field, '排序方式:', sorter.order); console.log('REL排序字段:', sorter.field, '排序方式:', sorter.order);
if (sorter.order === 'ascend') { if (sorter.order === 'ascend') {
@@ -501,6 +501,7 @@ export default {
state.courseDialogVisible = true; state.courseDialogVisible = true;
state.courseSearchParam.id = tagId; state.courseSearchParam.id = tagId;
state.courseSearchParam.pageNo = 1; state.courseSearchParam.pageNo = 1;
state.courseSearchParam.pageSize = 5;
await getCourseListByTag(); await getCourseListByTag();
}; };