修复权限管理,角色认证,更新工单认领系统,增加表格导出支持区间选择,增加docker管理(开发中

This commit is contained in:
2026-07-09 10:06:44 +08:00
parent 0c2fe393df
commit 3b84698fd3
25 changed files with 8975 additions and 102 deletions
+33 -1
View File
@@ -6,6 +6,9 @@ header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Pragma: no-cache");
header("Expires: Thu, 01 Jan 1970 00:00:00 GMT");
require_once 'auth.php';
// 权限拦截
// 会话超时:30分钟无操作自动登出,与admin后台统一
$expire = 1800;
if (empty($_SESSION['user_id']) || (time() - $_SESSION['login_time'] > $expire)) {
@@ -51,6 +54,7 @@ $langMap = [
'monitor_panel' => '监控面板',
'alert_overview' => '告警监控总览',
'disk_capacity' => '服务器磁盘容量',
'docker_mgr' => 'Docker容器管理',
'alert_list_page' => '历史告警查询',
'work_order_mgr' => '工单系统',
'system_manager' => '角色管理',
@@ -124,6 +128,7 @@ $langMap = [
'monitor_panel' => 'Monitor Panel',
'alert_overview' => 'Alert Overview',
'disk_capacity' => 'Server Disk Capacity',
'docker_mgr' => 'Docker Manager',
'alert_list_page' => 'Alert Pagination List',
'work_order_mgr' => 'Work Order System',
'system_manager' => 'Role & Permission Manage',
@@ -636,24 +641,44 @@ tbody tr:nth-child(even){background:#fbfcfe}
</div>
<div class="sidebar-menu">
<div class="menu-title"><?php echo $t['monitor_panel']; ?></div>
<?php if ($isAdmin === 1 || in_array("dashboard", $allowPages)): ?>
<div class="menu-item active" data-page="alertPage">
<i class="fa fa-line-chart"></i>
<span><?php echo $t['alert_overview']; ?></span>
</div>
<?php endif; ?>
<?php if ($isAdmin === 1 || in_array("disk", $allowPages)): ?>
<div class="menu-item" data-page="diskPage">
<i class="fa fa-hdd-o"></i>
<span><?php echo $t['disk_capacity']; ?></span>
</div>
<?php endif; ?>
<?php if ($isAdmin === 1 || in_array("docker_mgr", $allowPages)): ?>
<div class="menu-item" onclick="location.href='docker_mgr.php'">
<i class="fa fa-cubes"></i>
<span><?php echo $t['docker_mgr']; ?></span>
</div>
<?php endif; ?>
<!-- 告警分页:去掉window.open,同页跳转 -->
<?php if ($isAdmin === 1 || in_array("history_query", $allowPages)): ?>
<div class="menu-item" onclick="location.href='alert_list.php'">
<i class="fa fa-list"></i>
<span><?php echo $t['alert_list_page']; ?></span>
</div>
<?php endif; ?>
<!-- 工单 图标 fa-ticket -->
<?php if ($isAdmin === 1 || in_array("work_order", $allowPages)): ?>
<div class="menu-item" onclick="location.href='work_order.php'" data-page="workOrderPage">
<i class="fa fa-ticket"></i>
<span><?php echo $t['work_order_mgr']; ?></span>
</div>
<?php endif; ?>
<!-- 后台配置快捷外链自动渲染 -->
<?php if (!empty($sidebarLinkList)): ?>
<div class="menu-title"><?php echo $t['quick_link']; ?></div>
@@ -664,16 +689,23 @@ tbody tr:nth-child(even){background:#fbfcfe}
</div>
<?php endforeach; ?>
<?php endif; ?>
<div class="menu-title"><?php echo $t['system_manage']; ?></div>
<?php if ($isAdmin === 1 || in_array("smtp_config", $allowPages)): ?>
<div class="menu-item" onclick="location.href='admin.php'">
<i class="fa fa-cog"></i>
<span><?php echo $t['system_config']; ?></span>
</div>
<?php endif; ?>
<!-- 新增角色管理菜单 -->
<?php if ($isAdmin === 1 || in_array("system_manage", $allowPages)): ?>
<div class="menu-item" onclick="location.href='system_manage.php'">
<i class="fa fa-users"></i>
<span><?php echo $t['system_manager']; ?></span>
</div>
<?php endif; ?>
</div>
</div>
<!-- 右侧主内容区 -->
@@ -686,7 +718,7 @@ tbody tr:nth-child(even){background:#fbfcfe}
</div>
</div>
<div class="header-right">
<span class="user-info"><i class="fa fa-user-circle"></i><?php echo $t['current_user']; ?><?php echo $userName; ?><?php echo $roleText; ?></span>
<span class="user-info"><i class="fa fa-user-circle"></i><?php echo $t['current_user']; ?><?php echo $userName; ?><?php echo $roleRealName; ?></span>
<span class="time-info"><i class="fa fa-clock-o"></i><?php echo $t['sys_time']; ?><span id="updateTime">--</span></span>
<!-- 语言切换下拉框 -->
<div class="lang-box">