Squashed commit of the following:

升级seata到1.7.0;升级dynamic-datasource-spring-boot-starter到3.5.2
    支持多字段默认排序defSort数组、解决多列排序无效 #8659
    支持多字段默认排序defSort数组
    提供JeecgBoot 运行环境python检查脚本
    提供jeecgboot-oracle11g.dmp
This commit is contained in:
JEECG
2025-08-12 09:25:01 +08:00
parent ac446691c4
commit cd809a6573
13 changed files with 400 additions and 41 deletions

View File

@ -238,12 +238,20 @@ export function useDataSource(
const { sortInfo = {}, filterInfo } = searchState;
// 扩展默认排序多字段数组写法
let defSortInfo: Recordable<any> | undefined = {};
if (defSort && Array.isArray(defSort) && defSort.length > 0) {
defSortInfo['defSortString'] = JSON.stringify(defSort);
} else {
defSortInfo = defSort;
}
let params: Recordable = {
...pageParams,
// 由于 getFieldsValue 返回的不是逗号分割的数据,所以改用 validate
...(useSearchForm ? await validate() : {}),
...searchInfo,
...defSort,
...defSortInfo,
...(opt?.searchInfo ?? {}),
...sortInfo,
...filterInfo,

View File

@ -190,7 +190,7 @@ export interface BasicTableProps<T = any> {
// 额外的请求参数
searchInfo?: Recordable;
// 默认的排序参数
defSort?: Recordable;
defSort?: Recordable | Recordable[];
// 使用搜索表单
useSearchForm?: boolean;
// 表单配置

View File

@ -123,11 +123,17 @@
style: { textAlign: 'left' },
},
},
//自定义默认排序
defSort: {
column: 'createTime,sex',
order: 'desc',
},
//自定义默认多字段排序
defSort: [
{
column: 'name',
order: 'desc',
},
{
column: 'sex',
order: 'asc',
},
],
striped: true,
useSearchForm: true,
showTableSetting: true,