Authored by 张凯

Merge branch 'master-500-dev' of http://113.200.75.45:82/monitor_v3/hg-monitor-w…

…eb into master-500-dev-joke
... ... @@ -19,6 +19,15 @@ layui.define(['common', "commonDetail"], function (exports) {
// 打开拓扑
common.viewResTopo(params.resId)
break;
case 'fileViewer':
// 文件预览
layer.open({
type: 2,
id:(new Date()).getTime(),
area: ["98%","98%"],
content: '/src/lib/extend/pdfjs/web/viewer.html?test=' + params.path
})
break;
case "openLayer":
// 打开弹框
layer.open({
... ...
... ... @@ -1101,7 +1101,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions',
type: 1,
area: ['90%', '80%'],
resize: false,
btn: ['确定', '取消'],
// btn: ['确定', '取消'],
btn: ['确定'],
content: laytpl($('#userResourceAuthorization').html()).render(JSON.stringify({})),
success: function (index, layero) {
renderResAuthByUser(usernames[0])
... ... @@ -1118,30 +1119,30 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions',
},
yes: function (index, layero) {
//获取表格中的数据
var $showTypeSelect = $('#res_user_table').next().find('.user_showType');
var resIds = "";
$.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 + ',');
});
if (resIds.length > 0) {
resIds[resIds.length - 1] = resIds[resIds.length - 1].substring(0, resIds[resIds.length - 1].length - 1);
}
//保存数据到资源用户表中
admin.req({
url: common.domainName + '/api-web/sysUserToResType/resourceSave'
, data: {
ids: resIds
}
}).done(function (res) {
if (res.success) {
layer.msg('保存成功!', {icon: 1, time: 3000});
} else {
layer.msg('保存失败!', {icon: 7, time: 3000});
}
});
// var $showTypeSelect = $('#res_user_table').next().find('.user_showType');
// var resIds = "";
// $.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 + ',');
// });
// if (resIds.length > 0) {
// resIds[resIds.length - 1] = resIds[resIds.length - 1].substring(0, resIds[resIds.length - 1].length - 1);
// }
// //保存数据到资源用户表中
// admin.req({
// url: common.domainName + '/api-web/sysUserToResType/resourceSave'
// , data: {
// ids: resIds
// }
// }).done(function (res) {
// if (res.success) {
// layer.msg('保存成功!', {icon: 1, time: 3000});
// } else {
// layer.msg('保存失败!', {icon: 7, time: 3000});
// }
// });
layer.close(index); //如果设定了yes回调,需进行手工关闭
}
});
... ...