Browse Source

角色禁用不允许分配

RuoYi 5 tháng trước cách đây
mục cha
commit
e511d4ed27

+ 6 - 5
ruoyi-admin/src/main/resources/templates/system/user/authRole.html

@@ -63,11 +63,12 @@
 		        columns: [{
 		            checkbox: true,
 		            formatter:function (value, row, index) {
-		            	if($.common.isEmpty(value)) {
-		            		return { checked: row.flag };
-		            	} else {
-		            		return { checked: value }
-		            	}
+		                var state = row.status == '1' ? true : false;
+		                if ($.common.isEmpty(value)) {
+		                    return { checked: row.flag, disabled: state };
+		                } else {
+		                    return { checked: value, disabled: state };
+		                }
 		            }
 		        },
 		        {