Authored by wangtao

用户管理,资源授权优化

@@ -1105,7 +1105,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions', @@ -1105,7 +1105,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions',
1105 type: 1, 1105 type: 1,
1106 area: ['90%','80%'], 1106 area: ['90%','80%'],
1107 resize:false, 1107 resize:false,
1108 - btn: ['确定','取消'], 1108 + btn: ['关闭'],
1109 content: laytpl($('#userResourceAuthorization').html()).render(JSON.stringify({})), 1109 content: laytpl($('#userResourceAuthorization').html()).render(JSON.stringify({})),
1110 success: function (index, layero) { 1110 success: function (index, layero) {
1111 renderResAuthByUser(usernames[0]) 1111 renderResAuthByUser(usernames[0])
@@ -1121,31 +1121,31 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions', @@ -1121,31 +1121,31 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions',
1121 }) 1121 })
1122 }, 1122 },
1123 yes: function(index, layero){ 1123 yes: function(index, layero){
1124 - //获取表格中的数据  
1125 - var $showTypeSelect= $('#res_user_table').next().find('.user_showType');  
1126 - var resIds="";  
1127 - $.each($showTypeSelect,function (i,v) {  
1128 - var redis = $(this).attr("data-resId");  
1129 - var showType = $(this).val();  
1130 - var username = $(this).attr("data-username");  
1131 - resIds+=(username+'##'+redis+'##'+showType+',');  
1132 - });  
1133 - if(resIds.length>0){  
1134 - resIds[resIds.length-1]=resIds[resIds.length-1].substring(0,resIds[resIds.length-1].length-1);  
1135 - }  
1136 - //保存数据到资源用户表中  
1137 - admin.req({  
1138 - url:common.domainName + '/api-web/sysUserToResType/resourceSave'  
1139 - , data:{  
1140 - ids:resIds  
1141 - }  
1142 - }).done(function (res) {  
1143 - if(res.success){  
1144 - layer.msg('保存成功!', {icon: 1, time: 3000});  
1145 - }else{  
1146 - layer.msg('保存失败!', {icon: 7, time: 3000});  
1147 - }  
1148 - }); 1124 + // //获取表格中的数据
  1125 + // var $showTypeSelect= $('#res_user_table').next().find('.user_showType');
  1126 + // var resIds="";
  1127 + // $.each($showTypeSelect,function (i,v) {
  1128 + // var redis = $(this).attr("data-resId");
  1129 + // var showType = $(this).val();
  1130 + // var username = $(this).attr("data-username");
  1131 + // resIds+=(username+'##'+redis+'##'+showType+',');
  1132 + // });
  1133 + // if(resIds.length>0){
  1134 + // resIds[resIds.length-1]=resIds[resIds.length-1].substring(0,resIds[resIds.length-1].length-1);
  1135 + // }
  1136 + // //保存数据到资源用户表中
  1137 + // admin.req({
  1138 + // url:common.domainName + '/api-web/sysUserToResType/resourceSave'
  1139 + // , data:{
  1140 + // ids:resIds
  1141 + // }
  1142 + // }).done(function (res) {
  1143 + // if(res.success){
  1144 + // layer.msg('保存成功!', {icon: 1, time: 3000});
  1145 + // }else{
  1146 + // layer.msg('保存失败!', {icon: 7, time: 3000});
  1147 + // }
  1148 + // });
1149 layer.close(index); //如果设定了yes回调,需进行手工关闭 1149 layer.close(index); //如果设定了yes回调,需进行手工关闭
1150 } 1150 }
1151 }); 1151 });
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 <select class="form-control input-sm" name="enabled" lay-filter="enabled"> 25 <select class="form-control input-sm" name="enabled" lay-filter="enabled">
26 <option value="">=状态=</option> 26 <option value="">=状态=</option>
27 <option value="1">正常</option> 27 <option value="1">正常</option>
28 - <option value="0">禁用</option> 28 + <option value="0">冻结</option>
29 </select> 29 </select>
30 </div> 30 </div>
31 </div> 31 </div>
@@ -137,4 +137,4 @@ @@ -137,4 +137,4 @@
137 fn(params); 137 fn(params);
138 }); 138 });
139 }; 139 };
140 -</script>  
  140 +</script>