优化用户数据维护时,当选择用户为当前登录用户时,配置角色、配置客户端、删除用户、用户同步等按钮

master
Guo XIn 1 year ago
parent c2b3585567
commit e3ff14e35f
  1. 10
      shandan-system/src/main/resources/static/js/sys/user/user.js

@ -42,6 +42,16 @@ layui.use(['element', 'form', 'dropdown', 'table', 'layer', 'laydate', 'tree', '
{id: 'del', title: '删除用户'},
{id: 'sync', title: '用户同步'}
],
ready: function(panelElem, elem){
let userId = $(elem).data('userId')
if(userId === user.userId){
panelElem.find('ul > li').each((index, item)=>{
if("配置角色|配置客户端|删除用户|用户同步".includes($(item).text())){
$(item).off('click').css('color', '#cacaca');
}
})
}
},
click(data, othis) {
let userId = $(this.elem).data('userId')
switch (data.id) {