数据集、图表、看板表格默认排序改为按创建时间倒序排列

This commit is contained in:
datagear 2020-02-06 00:04:35 +08:00
parent 3853a185df
commit 700329caa6
4 changed files with 6 additions and 1 deletions

View File

@ -1007,6 +1007,9 @@
//.DataTable().settings()结构
else if(settings[0])
columnMetas = settings[0].aoColumns;
//构造DataTable前的设置
else if(settings.columns)
columnMetas = settings.columns;
return columnMetas;
},

View File

@ -220,7 +220,7 @@ selectonly 是否选择操作允许为null
po.initPagination();
var tableSettings = po.buildDataTableSettingsAjax(tableColumns, po.url("pagingQueryData"));
tableSettings.order = [[2, "asc"]];
tableSettings.order = [[$.getDataTableColumn(tableSettings, "createTime"), "desc"]];
po.initDataTable(tableSettings);
po.bindResizeDataTable();
})

View File

@ -204,6 +204,7 @@ selectonly 是否选择操作允许为null
po.initPagination();
var tableSettings = po.buildDataTableSettingsAjax(tableColumns, po.url("pagingQueryData"));
tableSettings.order = [[$.getDataTableColumn(tableSettings, "createTime"), "desc"]];
po.initDataTable(tableSettings);
po.bindResizeDataTable();
})

View File

@ -197,6 +197,7 @@ selectonly 是否选择操作允许为null
po.initPagination();
var tableSettings = po.buildDataTableSettingsAjax(tableColumns, po.url("pagingQueryData"));
tableSettings.order = [[$.getDataTableColumn(tableSettings, "createTime"), "desc"]];
po.initDataTable(tableSettings);
po.bindResizeDataTable();
})