All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.openmonitor.jui.dest.grid.page.js Maven / Gradle / Ivy

Go to download

一个简单易用的接口开放平台,平台封装了常用的参数校验、结果返回等功能,开发者只需实现业务代码即可。https://gitee.com/durcframework/easyopen

There is a newer version: 1.16.20
Show newest version
(function(){JUI.Class("Page",{init:function(b){this.grid=b;this.pageIndex=this.grid.opt("pageNumber");this.pageSize=this.grid.opt("pageSize");this.total=0;this.pageCount=0;this.pagination=this.grid.opt("pagination")},getPageData:function(){var b={};b[this.grid.opt("requestPageIndexName")]=this.pageIndex;b[this.grid.opt("requestPageSizeName")]=this.pageSize;return b},reload:function(){this.grid.reload()},goPage:function(b){this.pageIndex=b;this.reload()},canFirst:function(){return this.pageIndex!=1},first:function(){if(this.canFirst()){this.goPage(1)}},canPre:function(){return this.pageIndex>1},pre:function(){if(this.canPre()){this.goPage(this.pageIndex-1)}},canNext:function(){return this.pageIndex0},last:function(){if(this.pageIndex!=this.pageCount){var b=this.pageCount;this.goPage(b)}},setPageSize:function(b){this.pageSize=parseInt(b)||10;this.onChange()},onChange:function(){this.goPage(1)},setPageInfo:function(b){this.total=b[this.grid.opt("serverTotalName")]||0;this.pageCount=a(this.pageSize,this.total)}});function a(b,c){return b==0?1:parseInt((c+b-1)/b)}})();




© 2015 - 2024 Weber Informatics LLC | Privacy Policy