|
@@ -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
|
});
|