mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-04-24 23:47:17 +08:00
fix: 修改“岗位管理”-点击重置、查询按钮时设置表格到默认排序,并查询后台数据,使表格上的列排序图标保持“默认=岗位编码升序”。
This commit is contained in:
parent
9563c073cf
commit
e07236ed1c
@ -121,21 +121,14 @@ export function usePostHook() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function onSearch(tableRef) {
|
async function onSearch(tableRef) {
|
||||||
// 点击搜索的时候,需要重置分页
|
// 点击搜索的时候,需要重置排序,重新排序的时候会重置分页并发起查询请求
|
||||||
pagination.currentPage = 1;
|
tableRef.getTableRef().sort("postSort", "ascending");
|
||||||
// 点击搜索的时候,需要清空表格上列的排序
|
|
||||||
tableRef.getTableRef().clearSort();
|
|
||||||
// 使用默认排序发起请求
|
|
||||||
getPostList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetForm(formEl, tableRef) {
|
function resetForm(formEl, tableRef) {
|
||||||
if (!formEl) return;
|
if (!formEl) return;
|
||||||
// 清空查询参数
|
// 清空查询参数
|
||||||
formEl.resetFields();
|
formEl.resetFields();
|
||||||
// 清空排序
|
|
||||||
searchFormParams.orderColumn = undefined;
|
|
||||||
searchFormParams.orderDirection = undefined;
|
|
||||||
// 清空时间查询 TODO 这块有点繁琐 有可以优化的地方吗?
|
// 清空时间查询 TODO 这块有点繁琐 有可以优化的地方吗?
|
||||||
// Form组件的resetFields方法无法清除datepicker里面的数据。
|
// Form组件的resetFields方法无法清除datepicker里面的数据。
|
||||||
searchFormParams.beginTime = undefined;
|
searchFormParams.beginTime = undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user