刘帅
2026-09-08 572df690f72ed4a077d934823f261dec39b3cc7d
cloud-server-management/src/main/webapp/static/modular/system/user/user.js
@@ -121,6 +121,27 @@
    }
};
/** The button is rendered only for admin; the API repeats the permission check and records an audit event. */
MgrUser.viewSensitiveData = function () {
    if (!this.check()) return;
    layer.confirm('查看完整手机号和身份证号将记录审计日志,是否继续?', {icon: 3, title: '敏感信息查看'}, function (index) {
        $.ajax({
            url: Feng.ctxPath + '/system/sensitive/employee/' + MgrUser.seItem.id,
            type: 'GET',
            success: function (data) {
                if (!data) { Feng.info('未查询到员工信息'); return; }
                var html = '<div style="padding:20px;line-height:28px">'
                    + '<div>姓名:' + (data.name || '') + '</div>'
                    + '<div>手机号:' + (data.phone || '') + '</div>'
                    + '<div>身份证号:' + (data.idCard || '') + '</div></div>';
                layer.open({type: 1, title: '员工敏感信息(已记录审计日志)', area: ['420px', '260px'], content: html});
            },
            error: function () { Feng.error('无权查看敏感信息或查询失败'); }
        });
        layer.close(index);
    });
};
/**
 * 点击角色分配
 * @param