zoukankan      html  css  js  c++  java
  • easyui 排序实现

    1.对easyui  datagrid 返回的数据,进行排序处理,便于搜索到我们的有用的信息。

        例如:

         

     2.datagrid 需要设置 sortable : true

         

    {
                        field : 'crtTime',
                        title : '创建时间',
                        width : 100,
                        sortable :true,
                        align : 'center',
                        formatter : crtTimeFtt
                    }, 

     3.F12 debug查看发送的请求信息

     4.截取部分控制器代码

    /*
         * 
         */
        @RequestMapping(value="dabc/{aucId}",method = RequestMethod.GET, produces = { "application/json" })
        @ResponseBody
        public ListWithTotalCount<SettlementDealDto> sessssssQuery(@ModelAttribute("selectedAgency") SysAgencyDto selectedAgency,@PathVariable String aucId,String customerNo,String name,String account,String mobile,
                String certNo,String goodName,String brandNo, int page, int rows,String order, String sort){
            
            Pageable pageable;
            if (sort != null && !sort.isEmpty()) {
                pageable = new PageRequest(page - 1, rows, Direction.fromStringOrNull(order), sort);
            } else {
                pageable = new PageRequest(page - 1, rows);
            }

    4.部分字段的排序需要做处理,无法直接使用 sortable:true 完成排序动作

  • 相关阅读:
    TCL 双引号和花括号的区别
    在Vivado中调用ModelSim生成FSM的状态转移图
    基于配置文件的方式来配置AOP
    Spring MVC_Hello World
    重用切点表达式
    Spring MVC概述(2)
    Shiro_DelegatingFilterProxy
    Shiro-工作流程
    切面的优先级
    Shiro-集成Spring
  • 原文地址:https://www.cnblogs.com/mr-wuxiansheng/p/6296726.html
Copyright © 2011-2022 走看看