From 067134b942b6382b3f931f55d99c827e3abb3078 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Fri, 23 Aug 2019 22:52:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E5=88=97=E6=8E=92=E5=BA=8F=E6=BC=94?= =?UTF-8?q?=E7=A4=BA=EF=BC=8C=E6=8C=87=E5=AE=9A=E7=82=B9=E5=87=BB=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E5=8F=AF=E8=AE=BE=E5=AE=9A=E5=88=9D=E6=AC=A1=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E6=96=B9=E5=BC=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/modules/demo/demoDataGridGroupGrid.html | 1 - .../main/resources/views/modules/test/testDataList.html | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/web/src/main/resources/views/modules/demo/demoDataGridGroupGrid.html b/web/src/main/resources/views/modules/demo/demoDataGridGroupGrid.html index be95fcd7..20eb1b04 100644 --- a/web/src/main/resources/views/modules/demo/demoDataGridGroupGrid.html +++ b/web/src/main/resources/views/modules/demo/demoDataGridGroupGrid.html @@ -178,7 +178,6 @@ $('#dataGrid').dataGrid({ frozenCols: true, // 启用冻结列,并在colModel中设置frozen:true showRownum: true, // 是否显示行号,默认true showFooter: true, // 是否显示底部合计行,数据载入详见 ajaxSuccess - multiSort: true, // 是否支持多列排序 // ================ 设置多级表头 BEGIN ============== // 设置多级表头 diff --git a/web/src/main/resources/views/modules/test/testDataList.html b/web/src/main/resources/views/modules/test/testDataList.html index b23a77ed..8d46d1f7 100644 --- a/web/src/main/resources/views/modules/test/testDataList.html +++ b/web/src/main/resources/views/modules/test/testDataList.html @@ -149,7 +149,7 @@ $('#dataGrid').dataGrid({ {header:'${text("状态")}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){ return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true); }}, - {header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"}, + {header:'${text("创建时间")}', name:'createDate', index:'a.create_date', firstsortorder:'desc', width:150, align:"center"}, {header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:150, align:"left"}, {header:'${text("操作")}', name:'actions', width:200, sortable:false, title:false, formatter: function(val, obj, row, act){ var actions = []; @@ -198,8 +198,8 @@ $('#dataGrid').dataGrid({ return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true); }}, {header:'${text("日期时间")}', name:'testDatetime', width:150, align:"center"}, - {header:'${text("用户名称")}', name:'testUser.userName', width:150, align:"center"}, - {header:'${text("机构名称")}', name:'testOffice.officeName', width:150, align:"center"}, + {header:'${text("用户名称")}', name:'testUser.userName', sortable:false, width:150, align:"center"}, + {header:'${text("机构名称")}', name:'testOffice.officeName', sortable:false, width:150, align:"center"}, {header:'${text("区域名称")}', name:'testAreaName', width:150, align:"center"} ], // 加载成功后执行事件 @@ -208,6 +208,8 @@ $('#dataGrid').dataGrid({ } }); }, + + multiSort: true, // 是否支持多列排序,给列指定 firstsortorder 可设定初次排序方式 // 加载成功后执行事件 ajaxSuccess: function(data){