对页面的按钮进行权限控制

This commit is contained in:
季圣华
2020-09-04 23:50:40 +08:00
parent c7180a0d0d
commit 957583e54e
18 changed files with 141 additions and 40 deletions

View File

@@ -172,16 +172,18 @@
columns: [[
{field: 'id', width: 35, align: "center", checkbox:true},
{
title: '操作', field: 'isystem', align: "center", width: 80, formatter: function (value, rec, index) {
title: '操作', field: 'isystem', align: "center", width: 80,
formatter: function (value, rec, index) {
var str = '';
if(rec.loginName != "jsh") {
str += '<img src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editUser(\'' + index + '\');"/>&nbsp;&nbsp;&nbsp;';
}
if (rec.id != rec.tenantId && rec.loginName != "admin") {
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteUser(' + rec.id + ');"/>';
}
else {
str += '';
if(isShowOpFun()) {
if (rec.id != rec.tenantId && rec.loginName != "admin") {
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteUser(' + rec.id + ');"/>';
} else {
str += '';
}
}
return str;
}
@@ -233,6 +235,7 @@
}
});
dgResize();
toolbarStatus();
showUserDetails(1, initPageSize);
}
@@ -469,6 +472,9 @@
};
$('#userDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/>&nbsp;编辑用户信息');
$(".window-mask").css({width: webW, height: webH});
if(!isShowOpFun()){
$("#saveusername").hide();
}
$('#usernameFM').form('load', row);
userID = rowsdata.id;
//焦点在名称输入框==定焦在输入文字后面