|
@@ -1101,7 +1101,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions', |
|
@@ -1101,7 +1101,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions', |
1101
|
type: 1,
|
1101
|
type: 1,
|
1102
|
area: ['90%', '80%'],
|
1102
|
area: ['90%', '80%'],
|
1103
|
resize: false,
|
1103
|
resize: false,
|
1104
|
- btn: ['确定', '取消'],
|
1104
|
+ // btn: ['确定', '取消'],
|
|
|
1105
|
+ btn: ['确定'],
|
1105
|
content: laytpl($('#userResourceAuthorization').html()).render(JSON.stringify({})),
|
1106
|
content: laytpl($('#userResourceAuthorization').html()).render(JSON.stringify({})),
|
1106
|
success: function (index, layero) {
|
1107
|
success: function (index, layero) {
|
1107
|
renderResAuthByUser(usernames[0])
|
1108
|
renderResAuthByUser(usernames[0])
|
|
@@ -1118,30 +1119,30 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions', |
|
@@ -1118,30 +1119,30 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions', |
1118
|
},
|
1119
|
},
|
1119
|
yes: function (index, layero) {
|
1120
|
yes: function (index, layero) {
|
1120
|
//获取表格中的数据
|
1121
|
//获取表格中的数据
|
1121
|
- var $showTypeSelect = $('#res_user_table').next().find('.user_showType');
|
|
|
1122
|
- var resIds = "";
|
|
|
1123
|
- $.each($showTypeSelect, function (i, v) {
|
|
|
1124
|
- var redis = $(this).attr("data-resId");
|
|
|
1125
|
- var showType = $(this).val();
|
|
|
1126
|
- var username = $(this).attr("data-username");
|
|
|
1127
|
- resIds += (username + '##' + redis + '##' + showType + ',');
|
|
|
1128
|
- });
|
|
|
1129
|
- if (resIds.length > 0) {
|
|
|
1130
|
- resIds[resIds.length - 1] = resIds[resIds.length - 1].substring(0, resIds[resIds.length - 1].length - 1);
|
|
|
1131
|
- }
|
|
|
1132
|
- //保存数据到资源用户表中
|
|
|
1133
|
- admin.req({
|
|
|
1134
|
- url: common.domainName + '/api-web/sysUserToResType/resourceSave'
|
|
|
1135
|
- , data: {
|
|
|
1136
|
- ids: resIds
|
|
|
1137
|
- }
|
|
|
1138
|
- }).done(function (res) {
|
|
|
1139
|
- if (res.success) {
|
|
|
1140
|
- layer.msg('保存成功!', {icon: 1, time: 3000});
|
|
|
1141
|
- } else {
|
|
|
1142
|
- layer.msg('保存失败!', {icon: 7, time: 3000});
|
|
|
1143
|
- }
|
|
|
1144
|
- });
|
1122
|
+ // var $showTypeSelect = $('#res_user_table').next().find('.user_showType');
|
|
|
1123
|
+ // var resIds = "";
|
|
|
1124
|
+ // $.each($showTypeSelect, function (i, v) {
|
|
|
1125
|
+ // var redis = $(this).attr("data-resId");
|
|
|
1126
|
+ // var showType = $(this).val();
|
|
|
1127
|
+ // var username = $(this).attr("data-username");
|
|
|
1128
|
+ // resIds += (username + '##' + redis + '##' + showType + ',');
|
|
|
1129
|
+ // });
|
|
|
1130
|
+ // if (resIds.length > 0) {
|
|
|
1131
|
+ // resIds[resIds.length - 1] = resIds[resIds.length - 1].substring(0, resIds[resIds.length - 1].length - 1);
|
|
|
1132
|
+ // }
|
|
|
1133
|
+ // //保存数据到资源用户表中
|
|
|
1134
|
+ // admin.req({
|
|
|
1135
|
+ // url: common.domainName + '/api-web/sysUserToResType/resourceSave'
|
|
|
1136
|
+ // , data: {
|
|
|
1137
|
+ // ids: resIds
|
|
|
1138
|
+ // }
|
|
|
1139
|
+ // }).done(function (res) {
|
|
|
1140
|
+ // if (res.success) {
|
|
|
1141
|
+ // layer.msg('保存成功!', {icon: 1, time: 3000});
|
|
|
1142
|
+ // } else {
|
|
|
1143
|
+ // layer.msg('保存失败!', {icon: 7, time: 3000});
|
|
|
1144
|
+ // }
|
|
|
1145
|
+ // });
|
1145
|
layer.close(index); //如果设定了yes回调,需进行手工关闭
|
1146
|
layer.close(index); //如果设定了yes回调,需进行手工关闭
|
1146
|
}
|
1147
|
}
|
1147
|
});
|
1148
|
});
|