增加用户访问数据总表

This commit is contained in:
super
2026-03-22 21:27:41 +08:00
parent 12318f8770
commit 7ffe5279a3
3 changed files with 46 additions and 1 deletions

View File

@@ -444,6 +444,7 @@
// ========== 用户管理 ==========
var userPage = 1, userPageSize = 15;
var currentUserRole = 'admin';
var currentUserUsername = '';
var adminsList = [];
function roleLabel(role) {
if (role === 'super_admin') return '超级管理员';
@@ -469,6 +470,7 @@
return;
}
currentUserRole = res.current_user_role || 'admin';
currentUserUsername = (res.current_user_username || '').trim();
adminsList = res.admins || [];
var items = res.items || [];
if (items.length === 0) {
@@ -514,7 +516,7 @@
function updateDedupeTotalDataAccess() {
var tab = document.querySelector('.tab[data-tab="dedupe-total-data"]');
var panel = document.getElementById('panel-dedupe-total-data');
var canUse = currentUserRole === 'admin' || currentUserRole === 'super_admin';
var canUse = currentUserRole === 'super_admin' || (currentUserRole === 'admin' && currentUserUsername === '刘丽泓');
if (tab) tab.style.display = canUse ? '' : 'none';
if (panel) panel.style.display = canUse ? '' : 'none';
if (!canUse && tab && tab.classList.contains('active')) {