From 50860c9631a08178faafc4f736aa6e14a2a28f1d Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Wed, 26 Jul 2023 10:20:15 +0800 Subject: [PATCH] * Add queryResult. --- module/dataview/js/browse.js | 11 +++++++---- module/dataview/view/browse.html.php | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/module/dataview/js/browse.js b/module/dataview/js/browse.js index ed2c5f3276..96496d763a 100644 --- a/module/dataview/js/browse.js +++ b/module/dataview/js/browse.js @@ -18,7 +18,7 @@ $(function() if(result) window.location.href = url; }); - initPager(pageID, recPerPage, recTotal); + initPager(pageID, recPerPage, recTotal, fieldCount); $('.first-page,.left-page,.last-page,.right-page').click(function() { @@ -69,8 +69,9 @@ function queryTableData() $('#datas').empty(); $('#datas').append(resp.html); - recTotal = resp.recTotal; - initPager(pageID, recPerPage, recTotal); + recTotal = resp.recTotal; + fieldCount = resp.fieldCount; + initPager(pageID, recPerPage, recTotal, fieldCount); }); } @@ -83,7 +84,7 @@ function queryTableData() * @access public * @return void */ -function initPager(pageID, recPerPage, recTotal) +function initPager(pageID, recPerPage, recTotal, fieldCount) { var pageID = parseInt(pageID); var recPerPage = parseInt(recPerPage); @@ -112,5 +113,7 @@ function initPager(pageID, recPerPage, recTotal) $('.first-page,.left-page,.last-page,.right-page').removeClass('disabled'); if(pageID == 1) $('.first-page,.left-page').addClass('disabled'); if(pageID == pageTotal) $('.last-page,.right-page').addClass('disabled'); + + $('#queryResult').html(queryResult.replace('%s', recTotal).replace('%s', fieldCount)); } diff --git a/module/dataview/view/browse.html.php b/module/dataview/view/browse.html.php index 75397b7717..91f8809c7d 100644 --- a/module/dataview/view/browse.html.php +++ b/module/dataview/view/browse.html.php @@ -14,7 +14,9 @@ + dataview->error->warningDesign);?> +dataview->queryResult);?> @@ -163,6 +165,7 @@ +