码迷,mamicode.com
首页 > 其他好文 > 详细

分页控件

时间:2018-08-28 17:02:48      阅读:212      评论:0      收藏:0      [点我收藏+]

标签:strong   param   att   star   str   query   selectall   onclick   回调   

模板

模板1:天地 - 地图右侧小分页控件

//Html

<div dojoType="bootstrap.layout.Pagination" showPageSize=0  pageSize="20" pageModel="20"  dojoAttachPoint="wfrmPage"></div>

//Js

//查询之后,给分页控件赋值

var pageItem = {};

pageItem.pageAllSize = json.count;

pageItem.pageNum = this.currentPage;

pageItem.pageSize = this.pageSize;

this.wfrmPage.onRefreshPage(pageItem);

//绑定点击方法

this.connects.push(dojo.connect(this.wfrmPage, "onClick", this, dojo.hitch(this,this.onClick_btnPage)));

//分页

onClick_btnPage:function(paginator){

     this.currentPage = paginator.pageNum;

     this.pageSize = paginator.pageSize;

     if (paginator.blChange){

         this.switchPageQuery();

     }

},

//分页回调

switchPageQuery: function(){

   this.getParameters();//获取页面数据

   this.onClick_btnQuery(content);//查询

},

 

模板2:TD - PPIS - 分页

//html

<!-- 分页 -->

<div class="row">

<div class="col-xs-12 text-right">

<div dojoType="bootstrap.layout.Pagination" dojoAttachPoint="wfrmPage"></div>

</div>

</div>

//js

//分页

this.connects.push(dojo.connect(this.wfrmPage, "onClick", this, dojo.hitch(this,this.onClick_btnPage)));

//分页

onClick_btnPage:function(paginator){

        this.queryCondition.currentPage = paginator.pageNum;

        this.queryCondition.pageSize = paginator.pageSize;

         if (paginator.blChange){

            this.gridCostCount.selection.deselectAll();

        this.pagingQuery();// 分页查询数据

        }

},

//查询方法中

var pageItem = {};

pageItem.pageAllSize = json.count;

pageItem.pageNum = this.queryCondition.currentPage;

pageItem.pageSize = this.queryCondition.pageSize;

this.wfrmPage.onRefreshPage(pageItem);

//公共变量赋值

queryCondition: {//初始化查询值

needPage: true,

needCount: true,

currentPage: 1,

pageSize: 20

},

// 分页查询数据

pagingQuery:function(){

if(!this.verify_queryParam()){

this.btnQuery.cancel();

return;

}

this.queryCondition.id = this.assetIds;

this.queryAssetList(this.queryCondition);

},

//查询

onClick_btnQuery: function(){

this.queryCondition.currentPage = 1;// 页码

this.pagingQuery();// 分页查询

},

//后台

start = (queryParam.getCurrentPage() - 1) * queryParam.getPageSize() + 1;

end = start - 1 + queryParam.getPageSize();

分页控件

标签:strong   param   att   star   str   query   selectall   onclick   回调   

原文地址:https://www.cnblogs.com/7q4w1e/p/9549185.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!