caipin 5 lat temu
rodzic
commit
1c8fd2962a

+ 2 - 1
app/service/cloudEditionService.js

@@ -21,7 +21,7 @@ var cloudService={
 	 * 获得养护列表
 	 * compilation_id 编办ID
 	 */
-    getCuringList: async function(compilation_id,page=15){
+    getCuringList: async function(compilation_id,page=1){
        
     	//获得远程养护用户
     	//分页数据
@@ -500,6 +500,7 @@ var getPage= async function(modelsTable,where,currentPage,pageSize,parameter,tot
         'totalPage':totalPage,
         'startPage':startPage,
         'endPage':endPage,
+        'pageWidth':pageWidth,
         'parameter':encodeURI(parameter)
     };
     return page;

+ 0 - 31
global/js/cloud/buildHtml.js

@@ -32,38 +32,7 @@ function fnStructureCuringUser(data){
     $('div[curingListBox]').show();
     $('p[upClientBox]').hide();
 }
-//构建养护用户分页
-function fnCuringPage(data){
-    var html='';
-    if( data.previousPage == 0) {
-        html+='<li class="page-item disabled"><span class="page-link" aria-label="Previous"> <span aria-hidden="true"><i class="fal fa-chevron-left"></i></span> </span> </li>';
-    }else{
-        html+='<li class="page-item "> <a' +
-            ' parameter="'+ data.parameter+'" currentPage="'+ data.previousPage +'" class="page-link" href="javascript:void(0)" aria-label="Previous"> <span aria-hidden="true"><i class="fal fa-chevron-left"></i></span> </a> </li>';
-    }
 
-    for (i = 1; i <= data.totalPage; i++) {
-        if(data.currentPage == i){
-            html+='<li class="page-item active" aria-current="page"> <span class="page-link"> ' +
-                ''+ i +'<span class="sr-only">(current)</span> </span> </li>';
-        }else{
-            html+='<li class="page-item">' +
-                ' <a parameter="'+data.parameter+'" currentPage="'+i+'" class="page-link" href="javascript:void(0)">' +
-                ''+i+'</a> ' +
-                '</li>';
-        }
-    }
-
-    if( data.nextPage == data.currentPage||data.totalPage==0) {
-        html+='<li class="page-item disabled"> <span class="page-link"  aria-label="Next"> <span aria-hidden="true"><i class="fal fa-chevron-right"></i></span> </span> </li>';
-    }else{
-        html+='<li class="page-item"> <a ' +
-            'parameter="'+ data.parameter +'" currentPage="'+ data.nextPage +'" class="page-link" href="#" aria-label="Next"  > <span aria-hidden="true"><i class="fal fa-chevron-right"></i></span> </a> </li>';
-    }
-
-    $('ul[curingPage]').html(html);
-    $('div[page]').show();
-}
 
 
 //构建养护用户信息

+ 10 - 3
views/cloud/curing.html

@@ -7,6 +7,7 @@
 
 <script src="<%= WEB_SITE_GLOBAL %>js/contacts/client.js"></script>
 <script src="<%= WEB_SITE_GLOBAL %>js/cloud/curing.js"></script>
+<script src="<%= WEB_SITE_GLOBAL %>js/cloud/page.js"></script>
 <style>
     input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{
         -webkit-appearance: none !important;
@@ -160,7 +161,8 @@
                                     </table>
                                     <!--翻页-->
                                     <div page class=" justify-content-center">
-                                        <ul curingPage class="pagination pagination-sm">
+                                    	<div pageDetail >
+                                        <ul  class="pagination pagination-sm">
 
                                             <% if( pageData.previousPage == 0) {  %>
                                             <li class="page-item disabled">
@@ -176,7 +178,7 @@
                                             </li>
                                             <% }; %>
 
-						<% if( pageData.currentPage>=15 ) {  %>
+						<% if( pageData.currentPage>=pageData.pageWidth ) {  %>
 								
 	  							<li class="page-item">
                                    <a parameter="<%= pageData.parameter %>" currentPage="1" class="page-link" href="javascript:void(0)">1</a>
@@ -204,7 +206,7 @@
 
 
 
- 											<% if( pageData.totalPage >3 && pageData.totalPage!= pageData.currentPage ) {  %>
+ 											<% if( pageData.totalPage >pageData.pageWidth && pageData.totalPage!= pageData.currentPage ) {  %>
 												<li class="page-item disabled">
 	                                                <span class="page-link" aria-label="Previous">
 	                                                    <span aria-hidden="true">...</span>
@@ -227,7 +229,12 @@
                                             <% }; %>
 
                                         </ul>
+                                        </div>
                                     </div>
+                                    
+                                    
+                                    
+                                    
                                     </div>
                                     <!--已升级列表不存在-->
                                     <p upClientBox class="text-center" style="display:none">已升级用户列表不存在&nbsp;"<b curingMobile ></b>"&nbsp;,您可以尝试<a href="#search-new" upClient class="btn btn-sm btn-outline-primary ml-3" data-toggle="modal" data-target="#search-new">升级新用户</a></p>