Browse Source

修复权限交互Bug

suntg 8 years ago
parent
commit
9456c5fdea

+ 8 - 12
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js

@@ -1901,17 +1901,14 @@ define(['app/app'], function (app) {
             });
         };
         $scope.del = function () {
-            /*new ngAlert({
-                title: '提示',
-                content: '确定删除角色(' + $scope.role.desc + ')吗?'
-            }, function () {*/
-            AccountRole.remove({id: role.id}, function () {
-                toaster.pop('success', '提示', '角色:' + $scope.role.desc + ' 删除成功');
-                $modalInstance.close(true);
-            }, function (response) {
-                toaster.pop('error', '错误', response.data);
-            });
-            //})
+            if (confirm('确定删除角色(' + $scope.role.desc + ')吗?')) {
+                AccountRole.remove({id: role.id}, function () {
+                    toaster.pop('success', '提示', '角色:' + $scope.role.desc + ' 删除成功');
+                    $modalInstance.close(true);
+                }, function (response) {
+                    toaster.pop('error', '错误', response.data);
+                });
+            }
         };
     }]);
 
@@ -1966,7 +1963,6 @@ define(['app/app'], function (app) {
                 if (user.userUU) {
                     angular.forEach($scope.rolesData, function (item) {
                         if (item.checked) {
-                            delete item.checked;
                             $scope.checked.push(item);
                         }
                     });

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

@@ -14,6 +14,7 @@
         margin-left: 14px;
     }
     .user-role-manage .default-role-area {
+        height: 256px;
         padding: 21px 22px 10px 22px;
         border-bottom: 1px solid #ededed;
     }