Procházet zdrojové kódy

编辑角色分页初步修改

yangc před 8 roky
rodič
revize
85696ac3f0

+ 15 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js

@@ -640,5 +640,20 @@ define(['app/app'], function(app) {
                 $modalInstance.close(false);
             }
         };
+
+
+		$scope.pages = [];
+		$scope.pageParams = {
+			page: 1,
+			total: 10,
+			count: 6
+		};
+
+        //初始化分页数据
+		var initPages = function () {
+			$scope.totalPages = Math.ceil = ($scope.rolesData.length/6);
+		}
+
+
 	}]);
 });

+ 3 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_account_management.html

@@ -269,7 +269,7 @@
         padding: 15px;
     }
     .auth-info-area .role-info .role-tag-area {
-        padding-left: 13px;
+        padding: 5px 0 0 13px;
         text-align: left!important;
     }
     .auth-info-area .role-info .role-tag-area .role-tag {
@@ -504,6 +504,8 @@
     }
     .auth-info-area .role-info .role-tag-area.detail-role-tag .role-tag {
         margin-right: 5px;
+        margin-bottom: 5px;
+        float: left;
     }
 </style>
 <!--右侧主体部分-->

+ 82 - 0
src/main/webapp/resources/view/vendor/modal/edit_user_role.html

@@ -97,6 +97,72 @@
         background: #c8c6c6;
         margin-right: 8px;
     }
+
+    .user-role-manage .ng-table-pagination a {
+        border: none;
+        font-size: 12px;
+        cursor: pointer;
+    }
+    .pagination li:first-child a, .pagination li:last-child a{
+        font-size: 20px;
+    }
+    .user-role-manage ul.pagination.ng-table-pagination > li > a > span {
+        height: 17px;
+        line-height: 17px;
+    }
+
+    .user-role-manage div.ng-table-pager  input.page-number {
+        vertical-align: inherit;
+        display: inline-block;
+        width: 37px;
+        height: 28px;
+        padding: 6px 6px;
+        font-size: 12px;
+        line-height: 1.42857143;
+        color: #9B9792;
+        text-align: center;
+        background-color: #F6F5F4;
+        background-image: none;
+        border: 1px solid #ccc;
+        border-top-left-radius: 4px;
+        border-bottom-left-radius: 4px;
+        box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+        transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+    }
+
+    .user-role-manage div.ng-table-pager a.page-a {
+        color: #fff;
+        cursor: pointer;
+        background-color: #4574E8;
+        border-color: #4574E8;
+        padding: 5.55px 6px;
+        font-size: 12px;
+        border-top-right-radius: 4px;
+        border-bottom-right-radius: 4px;
+        text-decoration: none;
+        height: 31px;
+    }
+
+    .user-role-manage div.ng-table-pager div.page-go-block {
+        float: right;
+        font-size: 0px;
+        height: 31px;
+        margin-top: 20px;
+        line-height: 31px;
+    }
+    .user-role-manage .ng-table-pager .ng-table-pagination{
+        text-align: center;
+        max-width: 460px;
+    }
+    .user-role-manage .ng-table-pager .ng-table-pagination a{
+        color: #4574E8 !important;
+        height: 31px;
+        line-height: 13px;
+    }
+    .pagination li.active a span{
+        background-color: #4574E8;
+        color: white !important;
+    }
 </style>
 
 <div class="user-role-manage">
@@ -113,6 +179,22 @@
             <img ng-src="static/img/vendor/images/{{role.checked?'check-active':'check'}}.jpg" alt="" >
         </div>
     </div>
+    <div class="ng-cloak ng-table-pager text-center">
+        <ul class="pagination ng-table-pagination">
+            <li ng-class="{'disabled': !page.active && !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type">
+                <a ng-switch-when="prev" ng-click="setPage(page.type, -1)">&laquo;</a>
+                <a ng-switch-when="first" ng-click="setPage(page.type, page.number)"><span ng-bind="page.number"></span></a>
+                <a ng-switch-when="page" ng-click="setPage(page.type, page.number)"><span ng-bind="page.number"></span></a>
+                <a ng-switch-when="more" ng-click="setPage(page.type, -1)">&#8230;</a>
+                <a ng-switch-when="last" ng-click="setPage(page.type, page.number)"><span ng-bind="page.number"></span></a>
+                <a ng-switch-when="next" ng-click="setPage(page.type, -1)">&raquo;</a>
+            </li>
+        </ul>
+        <div class="page-go-block">
+            <input class="page-number" type="text" ng-model="params.currentPage" ng-keydown="listenEnter()"/>
+            <a class="page-a" ng-click="setPage('page', params.currentPage)">GO</a>
+        </div>
+    </div>
     <div class="user-role-footer">
         <span ng-click="cancelModal()">取消</span>
         <span ng-click="close(true)">确定</span>