Authored by 鲁尚清

【#886】【用户管理】给该用户资源授权时保存页面报错--之前是根据表格中展示类型的来拼接resId的,因为目前没有展示类型,所有获取不到resId,现在更改为根据选中的表格数据拼接resId, #1

... ... @@ -1124,12 +1124,25 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions',
//获取表格中的数据
var $showTypeSelect= $('#res_user_table').next().find('.user_showType');
var resIds="";
$.each($showTypeSelect,function (i,v) {
//start 用户资源授权保存失败,先注释掉, 2022-06-08
/* $.each($showTypeSelect,function (i,v) {
var redis = $(this).attr("data-resId");
var showType = $(this).val();
var username = $(this).attr("data-username");
resIds+=(username+'##'+redis+'##'+showType+',');
});
*/
var ids = [];
var data = table.checkStatus('res_user_table').data;
if (data && data.length > 0) {
$.each(data, function (i, obj) {
var redis = obj.resId;
var showType = obj.showType?obj.showType:'';
var username = usernames[0];
resIds+=(username+'##'+redis+'##'+showType+',');
});
}
//end lsq 2022-06-08
if(resIds.length>0){
resIds[resIds.length-1]=resIds[resIds.length-1].substring(0,resIds[resIds.length-1].length-1);
}
... ...