Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/1788/head
zouap 3 years ago
parent
commit
e71c65b0cd
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      public/home/search.js

+ 4
- 2
public/home/search.js View File

@@ -55,6 +55,7 @@ var OnlySearchLabel=false;
var startIndex =1;
var endIndex = 5;
var totalPage = 1;
var totalNum = 0;

function initPageInfo(){
currentPage = 1;
@@ -142,6 +143,7 @@ function displayResult(tableName,page,jsonResult,onlyReturnNum,keyword){
}
if(!onlyReturnNum){
totalPage =Math.ceil(jsonResult.Total/pageSize);
totalNum = jsonResult.Total;
}
}
@@ -564,11 +566,11 @@ function page(current){
}

function setPage(currentPage){
if (isEmpty(pageData)){
if(totalPage==0){
return;
}
console.log("currentPage=" + currentPage);
$('#page_total').text("共 " + pageData.Total + " 条");
$('#page_total').text("共 " + totalNum + " 条");
if(currentPage > 1){
$('#startPage').removeClass("disabled");
$('#lastPage').removeClass("disabled");


Loading…
Cancel
Save