注册 手机版
政府信息公开
政府信息公开
  • X
  • 搜索位置
  • 标题
  • 全文
  • 匹配度
  • 模糊
  • 精准
  • 排序
  • 相关程度
  • 发布日期

当前位置:政策

序号 标题 发文字号 成文日期 发布日期
共' + this.total + '条记录
' } if (this.afterRefreshFn) { this.afterRefreshFn.call(this); } }; KPagination.prototype.setTotalPage = function (totalPage) { this.totalPage = parseInt(totalPage); this.refresh(); }; KPagination.prototype.setTotalCount = function (totalCount) { this.total = parseInt(totalCount); this.refresh(); }; KPagination.prototype.setCurrentPage = function (currentPage) { this.currentPage = parseInt(currentPage); this.refresh(); }; /** * 构建分页数组 * @returns {Array} */ KPagination.prototype.build = function () { var arr = [], i = 1, start = 1, end = this.totalPage; if (this.showPrev) { // 代表前一页 arr.push('p-' + Math.max(1, Math.min(this.currentPage - 1, this.totalPage))); } if (this.totalPage <= this.offset) { // 总页码数在显示的数量范围内 while (i <= this.totalPage) { arr.push(i); i++; } } else if (this.currentPage < this.offset - this.offsetHalf + 1) { while (i <= this.offset) { arr.push(i); i++; } } else if(this.currentPage < this.offset) { start = this.currentPage - this.offsetHalf; end = this.currentPage + this.offsetHalf; for(i = start;i<=end;i++){ arr.push(i); } } else if (this.currentPage > this.totalPage - (this.offset - this.offsetHalf)) { for (i = this.totalPage - this.offset + 1; i <= this.totalPage; i++) { arr.push(i); } } else { start = Math.max(this.currentPage - this.offsetHalf, 1); end = Math.min(this.currentPage + this.offsetHalf, this.totalPage); for (i = start; i <= end; i++) { arr.push(i); } } if (this.showNext) { arr.push('n-' + Math.max(1, Math.min(this.currentPage + 1, this.totalPage))); } return arr; }; KPagination.prototype.generateHtml = function (numArr) { var arr = [], cls; for (var i = 0; i < numArr.length; i++) { if (numArr[i] === '.') { arr.push('
...
'); } else if (typeof numArr[i] === 'string') { cls = 'whj_border whj_padding whj_bgc whj_hover' var str = numArr[i]; var tmp = str.split('-'); var tmpNum = tmp[1]; if (tmpNum == this.currentPage) { cls = 'whj_border whj_padding whj_bgc whj_hoverDisable'; } if (tmp[0] === 'p') { // 上一页 arr.push('
上一页
'); } else if (tmp[0] === 'n') { // 下一页 arr.push('
下一页
'); } } else { cls = 'whj_border whj_padding whj_bgc whj_hover'; if (this.currentPage == numArr[i]) { cls = ' whj_border whj_padding whj_bgc whj_checked'; } arr.push('
' + numArr[i] + '
'); } } if(this.showFirstLast) { arr.unshift('
首页
'); arr.push('
尾页
'); } return arr.join(''); }; return KPagination; });