ExtJS4.2 Grid 페이지 표시줄 검색

4012 단어 extjs4
function SearchCondition(){

        this.startTime = "";

        this.endTime = "";

        this.targetInfo = "";

        this.logType = "";

        this.manager = "";

        this.reset = function(){

            this.startTime = "";

            this.endTime = "";

            this.targetInfo = "";

            this.logType = "";

            this.manager = "";

        }

    } 

    

var logStore = Ext.create("Ext.data.Store", {

        pageSize : 30,

        searchCondition:new SearchCondition(),

        model : 'opearationLogModel',

        proxy:{

            type : 'ajax',

            url:"********",

            reader:{

                root: '***',

                totalProperty: '***',

                type : 'json'

            }

        },

        remoteSort:true,

        listeners:{

             'beforeload': function( s, operation, eOpts ){

                 s.proxy.extraParams= {

                         startTime: logStore.searchCondition.startTime, 

                         endTime: logStore.searchCondition.endTime,

                         targetInfo: logStore.searchCondition.targetInfo, 

                         logType: logStore.searchCondition.logType, 

                         manager: logStore.searchCondition.manager

                     };

             },

            'load': function( s, records, successful, eOpts ){

            }

         }

    });



logStore.sort({property:'operateTime', direction:'DESC'});



function querybtnClk(){         

         logStore.searchCondition.reset();

         logStore.searchCondition.startTime = startTime;

         logStore.searchCondition.endTime = endTime;

         logStore.searchCondition.targetInfo = ***;

         logStore.searchCondition.logType = ****;

         logStore.searchCondition.manager = ***;

         

         barPagingBar.bind(logStore);

         barPagingBar.doRefresh();

    }

좋은 웹페이지 즐겨찾기