yangc 8 years ago
parent
commit
213bf1ec19

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

@@ -1691,6 +1691,7 @@ define(['app/app'], function (app) {
         $scope.onItemClick = function (resource) {
             if (resource.items.length > 0) {
                 $scope.resourceItems = resource.items;
+                $scope.activeResource = resource
             } else {
                 $scope.resourceItems = [];
                 if (!resource.activeLevel) {
@@ -1750,6 +1751,18 @@ define(['app/app'], function (app) {
         }
 
         $scope.onItemChange = function () {
+            var activeCount = 0;
+            var resourceItems = $scope.resourceItems;
+            // console.log(resourceItems);
+            angular.forEach(resourceItems, function (item) {
+                if (item.$checked) {
+                    activeCount++;
+                }
+            })
+            // console.log(activeCount);
+            // console.log( $scope.activeResource)
+            $scope.activeResource.$checked = activeCount == resourceItems.length;
+
             angular.forEach($scope.resources, function (resource) {
                 if (resource.$active) {
                     var c = 0;

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

@@ -593,7 +593,7 @@
         color: #666;
         margin-left: 0;
     }
-    .count01 ul li >a {
+    .count01 >ul li >a {
         background: #fff;
         color: #5078cb;
         text-align: center;
@@ -993,13 +993,13 @@
                                  <label for="checkAll"></label>
                              </lable>
                              全选</th>-->
-                        <th width="134">UU账号</th>
-                        <th width="92">姓名</th>
-                        <th width="58">性别</th>
-                        <th width="124">手机号</th>
-                        <th width="198">邮箱</th>
-                        <th width="224">角色</th>
-                        <th width="98">操作</th>
+                        <th width="143">UU账号</th>
+                        <th width="101">姓名</th>
+                        <th width="67">性别</th>
+                        <th width="133">手机号</th>
+                        <th width="207">邮箱</th>
+                        <th width="233">角色</th>
+                        <th width="107">操作</th>
                     </tr>
                     </thead>
                     <tbody>

+ 3 - 0
src/main/webapp/resources/view/vendor/modal/role_detail.html

@@ -348,6 +348,9 @@
 <div class="modal-header">
 	<h3 class="modal-title">
 		<span ng-bind="role.id?'编辑角色':'添加自定义角色'"></span>
+		<button style="position: relative;bottom: 10px;right: -5px;" type="button" class="close" data-dismiss="alert" ng-click="cancel()" aria-label="Close">
+			<span aria-hidden="true">×</span>
+		</button>
 	</h3>
 </div>
 <form name="roleForm" class="roleForm" novalidate ng-submit="save()">