Browse Source

权限 : 页面逻辑调通2

wangdy 8 years ago
parent
commit
f7ff79738d

+ 3 - 4
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js

@@ -608,17 +608,16 @@ define(['app/app'], function(app) {
         $scope.close = function (save) {
             if (save) {
                 if (user.userUU) {
-                	debugger;
-                	console.log($scope.checked);
                     angular.forEach($scope.rolesData, function (item) {
                     	if (item.checked){
                     		delete item.checked;
                             $scope.checked.push(item);
 						}
                     });
-                    user.roles = $scope.checked;
-                    User.update({}, user, function () {
+                    $scope.user.roles = $scope.checked;
+                    User.update({}, $scope.user, function () {
                         toaster.pop('success', '提示', '保存成功');
+                        user.roles = $scope.checked
                         $modalInstance.close(true);
                     }, function (response) {
                         toaster.pop('error', '保存失败', response.data);

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

@@ -457,6 +457,7 @@
         margin-right: 50px;
         margin-bottom: 20px;
         border-radius: 3px;
+        cursor: pointer;
     }
     .role-manage .default-role-box p {
         text-align: center;
@@ -482,7 +483,6 @@
         background: #f4fff9;
         color: #4aca80;
         border: 2px dashed #4aca80;
-        cursor: pointer;
     }
     .role-manage .define-role-area .add-role-box i {
         font-size: 40px;
@@ -502,6 +502,9 @@
         display: inline-block;
         width: 121px;
     }
+    .auth-info-area .role-info .role-tag-area.detail-role-tag .role-tag {
+        margin-right: 5px;
+    }
 </style>
 <!--右侧主体部分-->
 <div class="count user_right fr">
@@ -872,7 +875,7 @@
                             <td>{{user.userSex == 'M'?'男':'女'}}</td>
                             <td>{{user.userTel}}</td>
                             <td>{{user.userEmail}}</td>
-                            <td class="role-tag-area">
+                            <td class="role-tag-area detail-role-tag">
                                 <span ng-repeat="role in user.roles" class="role-tag bgcolor-{{$index+1}}">{{role.desc.substring(0,1)}}</span>
                             </td>
                             <!--<td class="edit-btn-area">

+ 258 - 1
src/main/webapp/resources/view/vendor/modal/role_detail.html

@@ -1,13 +1,270 @@
 <style>
+	/*account*/
+	.user-role>.role-item{
+		float: left;
+	}
+
+	.user-role>.role-item>.icon{
+		text-align: center;
+		color: #333;
+		padding: 1px 3px;
+		border-radius: 50%;
+		border: 1px solid #333;
+	}
+
+	.user-role>.role-item>.icon.info{
+		color: #56a022;
+		border: 1px solid #56a022;
+	}
+
+	.user-role>.role-item>.icon.warning{
+		color: #8a6d3b;
+		border: 1px solid #8a6d3b;
+	}
+
+	.row-operator {
+		position: relative;
+	}
+
+	.row-operator>.operator-menu {
+		position: absolute;
+		width: 140px;
+		height: 0;
+		line-height: 30px;
+		padding: 0 10px;
+		top: 12px;
+		left: 100%;
+		background-color: #333;
+		border-radius: 0 3px 3px 0;
+		opacity: 0;
+	}
+
+	.row-operator>.operator-menu a {
+		color: #fff;
+	}
+
+	.row-operator>.operator-menu a:hover {
+		color: #56a022;
+	}
+
+	.row-operator:hover>.operator-menu {
+		height: 30px;
+		opacity: .75;
+		-webkit-transition: all 0.25s ease-in-out;
+		-moz-transition: all 0.25s ease-in-out;
+		transition: all 0.25s ease-in-out;
+	}
+
+	.resource-container,.role-container {
+		padding: 15px;
+		min-height: 645px;
+	}
+
+	.simple-list {
+		padding: 10px 15px;
+	}
+
+	.simple-list>li {
+		clear: both;
+		display: block;
+		height: 26px;
+		line-height: 26px;
+		padding: 8px 10px 8px 15px;
+		position: relative;
+	}
+
+	.simple-list>li:before {
+		position: absolute;
+		left: 0;
+		top: 5px;
+		content: "."
+	}
+
+	.simple-list>li .title {
+		width: 200px;
+		float: left;
+	}
+
+	.simple-list>li .content {
+		float: left;
+		color: #999;
+	}
+
+	.resource-container>.resource-item {
+		position: relative;
+		padding-bottom: 15px;
+	}
+
+	.resource-container>.resource-item>.simple-list {
+		display: none;
+	}
+
+	.resource-container>.resource-item.active>.simple-list {
+		display: block;
+	}
+
+	.role-container>.role-list {
+		width: 100%;
+	}
+	.role-container>.role-list:nth-child(1){
+		border-bottom: #e8e8e8 1px solid;
+	}
+	.role-container>.role-list:before,.role-container>.role-list:after {
+		display: table;
+		content: " ";
+		clear: both;
+	}
+
+	.role-container>.role-list>.item {
+		float: left;
+		width: 33%;
+		height: 150px;
+		padding: 10px 25px;
+	}
+	.role-container>.role-list .desc h3 a{
+		font-size: 16px;
+	}
+	.role-container>.role-list>.item>.icon{
+		float: left;
+		width: 60px;
+		height: 60px;
+		line-height: 60px;
+		text-align: center;
+		margin-top: 30px;
+		color: #56a022;
+		font-size: 52px;
+		border-radius: 50%;
+		-webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.03);
+		box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.03);
+		background-color: #f3f3f4;
+	}
+	.role-container>.role-list>.item>.icon i{
+		font-size: 36px;
+		position: relative;
+		top: -10px;
+	}
+	.role-container>.role-list>.item>.desc {
+		margin-left: 80px;
+	}
+
+	.userrole-list {
+		width: 576px;
+		font-size: 12px;
+		max-height: 500px;
+	}
+
+	.userrole-list:before,.userrole-list:after {
+		display: table;
+		content: " ";
+		clear: both;
+	}
+
+	.userrole-list>.item {
+		float: left;
+		width: 192px;
+		height: 120px;
+		padding: 5px 10px;
+		border: 2px dashed;
+		border-color: #fff #ededed #ededed #fff;
+		position: relative;
+	}
+
+	.userrole-list>.item.checked {
+		border-color: #ff7300;
+	}
+
+	.userrole-list>.item>.icon{
+		float: left;
+		width: 60px;
+		height: 60px;
+		line-height: 60px;
+		text-align: center;
+		color: #56a022;
+		font-size: 36px;
+		border-radius: 50%;
+		-webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.03);
+		box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.03);
+		background-color: #f3f3f4;
+	}
+
+	.userrole-list>.item>.desc {
+		margin-left: 70px;
+		text-overflow: ellipsis;
+	}
+
+	.userrole-list>.item:hover>.icon {
+		background-color: #fff1d0;
+	}
+
+	.userrole-list>.item.checked>.checker {
+		position: absolute;
+		left: -2px;
+		top: -2px;
+		width: 0;
+		height: 0;
+		border: 8px solid;
+		border-color: #ff7300 #fff #fff #ff7300;
+	}
+
+	.choose-inline {
+		display: table;
+		width: 100%;
+		margin-top: 10px;
+		padding: 10px;
+		table-layout: fixed;
+		border-collapse: separate;
+		border: 1px solid #e1e1e1;
+	}
+
+	.choose-inline>.item {
+		display: table-cell;
+	}
+
+	.choose-inline>.item>ul {
+		height: 260px;
+		overflow-x: hidden;
+		overflow-y: scroll;
+	}
+
+	.choose-inline>.item>ul>li {
+		line-height: 30px;
+		padding-left: 5px;
+	}
+
+	.choose-inline>.item>ul>li:hover {
+		background: #f1f1f1;
+	}
+
+	.choose-inline>.item>ul>li.active {
+		background: #fff1d0;
+	}
+
+	.choose-inline>.item>ul>li:hover a,.choose-inline>.item>ul>li.active a {
+		color: #ff7300;
+		text-decoration: none;
+	}
+
+	.choose-inline>.item>ul>li>a {
+		color: #666666;
+	}
+
 	.choose-inline>.item .caret {
 		float: right;
 		margin-top: 14px;
 		margin-right: 8px;
 		border-left: 3px solid;
-		border-right: 0;
+		border-right: none;
 		border-top: 3px solid transparent;
 		border-bottom: 3px solid transparent;
 	}
+
+	.role-resources input[type="checkbox"] {
+		margin-right: 5px;
+		height: 16px;
+		vertical-align: text-bottom;
+		margin-top:	0;
+		cursor: pointer;
+	}
 </style>
 
 <div class="modal-header">