将前端文件从html目录迁移到views目录,按功能模块组织 重构认证中间件和路由处理,简化页面权限控制 更新静态资源引用路径,统一使用/public前缀 添加学生仪表板页面,优化移动端显示 移除旧版html和js文件,更新样式和脚本
508 lines
15 KiB
HTML
508 lines
15 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>å¦ç”Ÿæˆ<EFBFBD>绩管ç<EFBFBD>†ç³»ç»Ÿ - 教师仪表æ<C2A8>?/title>
|
||
<link rel="stylesheet" href="/public/css/style.css">
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||
</head>
|
||
/* 仪表æ<C2A8>¿å¸ƒå±€ */
|
||
.dashboard-container {
|
||
display: flex;
|
||
min-height: calc(100vh - 80px);
|
||
}
|
||
|
||
/* ä¾§è¾¹æ ?*/
|
||
.sidebar {
|
||
width: 250px;
|
||
background: linear-gradient(180deg, #43e97b 0%, #38f9d7 100%);
|
||
color: white;
|
||
padding: 30px 0;
|
||
position: sticky;
|
||
top: 80px;
|
||
height: calc(100vh - 80px);
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.sidebar-header {
|
||
padding: 0 25px 30px;
|
||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||
margin-bottom: 20px;
|
||
}
|
||
|
||
.user-info {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 15px;
|
||
}
|
||
|
||
.user-avatar {
|
||
width: 50px;
|
||
height: 50px;
|
||
border-radius: 50%;
|
||
background: white;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: #43e97b;
|
||
font-size: 20px;
|
||
}
|
||
|
||
.user-details h3 {
|
||
margin: 0 0 5px;
|
||
font-size: 1.1rem;
|
||
}
|
||
|
||
.user-details p {
|
||
margin: 0;
|
||
font-size: 0.9rem;
|
||
opacity: 0.8;
|
||
}
|
||
|
||
.sidebar-menu {
|
||
list-style: none;
|
||
padding: 0;
|
||
margin: 0;
|
||
}
|
||
|
||
.sidebar-menu li {
|
||
margin: 5px 0;
|
||
}
|
||
|
||
.sidebar-menu a {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 15px;
|
||
padding: 15px 25px;
|
||
color: white;
|
||
text-decoration: none;
|
||
transition: all 0.3s ease;
|
||
border-left: 3px solid transparent;
|
||
}
|
||
|
||
.sidebar-menu a:hover {
|
||
background: rgba(255, 255, 255, 0.1);
|
||
border-left-color: white;
|
||
}
|
||
|
||
.sidebar-menu a.active {
|
||
background: rgba(255, 255, 255, 0.2);
|
||
border-left-color: white;
|
||
}
|
||
|
||
.sidebar-menu i {
|
||
width: 20px;
|
||
text-align: center;
|
||
}
|
||
|
||
/* 主内容区 */
|
||
.main-content {
|
||
flex: 1;
|
||
padding: 30px;
|
||
background: #f8f9ff;
|
||
}
|
||
|
||
.content-header {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
margin-bottom: 30px;
|
||
}
|
||
|
||
.page-title {
|
||
font-size: 1.8rem;
|
||
color: #333;
|
||
margin: 0;
|
||
}
|
||
|
||
.breadcrumb {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
color: #666;
|
||
font-size: 0.9rem;
|
||
}
|
||
|
||
.breadcrumb a {
|
||
color: #43e97b;
|
||
text-decoration: none;
|
||
}
|
||
|
||
.breadcrumb i {
|
||
font-size: 0.8rem;
|
||
}
|
||
|
||
/* 功能å<C2BD>¡ç‰‡ */
|
||
.function-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||
gap: 25px;
|
||
margin-bottom: 40px;
|
||
}
|
||
|
||
.function-card {
|
||
background: white;
|
||
border-radius: 15px;
|
||
padding: 30px;
|
||
text-align: center;
|
||
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
|
||
transition: all 0.3s ease;
|
||
cursor: pointer;
|
||
border: 2px solid transparent;
|
||
}
|
||
|
||
.function-card:hover {
|
||
transform: translateY(-5px);
|
||
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
|
||
border-color: #43e97b;
|
||
}
|
||
|
||
.function-icon {
|
||
width: 80px;
|
||
height: 80px;
|
||
border-radius: 50%;
|
||
background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
margin: 0 auto 20px;
|
||
font-size: 32px;
|
||
color: white;
|
||
}
|
||
|
||
.function-title {
|
||
font-size: 1.3rem;
|
||
color: #333;
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
.function-description {
|
||
color: #666;
|
||
line-height: 1.5;
|
||
margin-bottom: 20px;
|
||
}
|
||
|
||
/* 快速æ“<C3A6>ä½?*/
|
||
.quick-actions {
|
||
background: white;
|
||
border-radius: 15px;
|
||
padding: 25px;
|
||
margin-bottom: 30px;
|
||
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
|
||
}
|
||
|
||
.section-title {
|
||
font-size: 1.4rem;
|
||
color: #333;
|
||
margin-bottom: 20px;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
}
|
||
|
||
.section-title i {
|
||
color: #43e97b;
|
||
}
|
||
|
||
.action-buttons {
|
||
display: flex;
|
||
gap: 15px;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.action-btn {
|
||
padding: 12px 25px;
|
||
background: #f8f9ff;
|
||
border: 1px solid #e0e0e0;
|
||
border-radius: 10px;
|
||
color: #333;
|
||
text-decoration: none;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
transition: all 0.3s ease;
|
||
}
|
||
|
||
.action-btn:hover {
|
||
background: #43e97b;
|
||
color: white;
|
||
border-color: #43e97b;
|
||
}
|
||
|
||
/* 最近活�*/
|
||
.recent-activities {
|
||
background: white;
|
||
border-radius: 15px;
|
||
padding: 25px;
|
||
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
|
||
}
|
||
|
||
.activity-list {
|
||
list-style: none;
|
||
padding: 0;
|
||
margin: 0;
|
||
}
|
||
|
||
.activity-item {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 15px;
|
||
padding: 15px 0;
|
||
border-bottom: 1px solid #eee;
|
||
}
|
||
|
||
.activity-item:last-child {
|
||
border-bottom: none;
|
||
}
|
||
|
||
.activity-icon {
|
||
width: 40px;
|
||
height: 40px;
|
||
border-radius: 50%;
|
||
background: #f8f9ff;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: #43e97b;
|
||
}
|
||
|
||
.activity-content {
|
||
flex: 1;
|
||
}
|
||
|
||
.activity-title {
|
||
font-weight: 600;
|
||
color: #333;
|
||
margin-bottom: 5px;
|
||
}
|
||
|
||
.activity-time {
|
||
font-size: 0.9rem;
|
||
color: #999;
|
||
}
|
||
|
||
/* å“<C3A5>应å¼<C3A5>设è®?*/
|
||
@media (max-width: 992px) {
|
||
.dashboard-container {
|
||
flex-direction: column;
|
||
}
|
||
|
||
.sidebar {
|
||
width: 100%;
|
||
height: auto;
|
||
position: static;
|
||
padding: 20px 0;
|
||
}
|
||
|
||
.sidebar-menu {
|
||
display: flex;
|
||
overflow-x: auto;
|
||
padding: 0 20px;
|
||
}
|
||
|
||
.sidebar-menu li {
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.sidebar-menu a {
|
||
padding: 10px 15px;
|
||
border-left: none;
|
||
border-bottom: 3px solid transparent;
|
||
}
|
||
|
||
.sidebar-menu a:hover,
|
||
.sidebar-menu a.active {
|
||
border-left-color: transparent;
|
||
border-bottom-color: white;
|
||
}
|
||
}
|
||
|
||
@media (max-width: 768px) {
|
||
.main-content {
|
||
padding: 20px;
|
||
}
|
||
|
||
.content-header {
|
||
flex-direction: column;
|
||
align-items: flex-start;
|
||
gap: 15px;
|
||
}
|
||
|
||
.function-grid {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
.action-buttons {
|
||
flex-direction: column;
|
||
}
|
||
|
||
.action-btn {
|
||
justify-content: center;
|
||
}
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<!-- 顶部导航æ ?-->
|
||
<nav class="navbar">
|
||
<div class="navbar-brand">
|
||
<i class="fas fa-graduation-cap"></i>
|
||
<span>XX妿 ¡æˆ<EFBFBD>绩管ç<EFBFBD>†ç³»ç»Ÿ</span>
|
||
</div>
|
||
<div class="navbar-menu">
|
||
<a href="/" class="btn btn-secondary">
|
||
<i class="fas fa-home"></i> 主页
|
||
</a>
|
||
<div class="navbar-user">
|
||
<span class="user-name" id="userName">æ<EFBFBD>Žè€<EFBFBD>师</span>
|
||
<button id="logoutBtn" class="btn btn-primary">
|
||
<i class="fas fa-sign-out-alt"></i> 退� </button>
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<!-- 仪表æ<C2A8>¿å®¹å™?-->
|
||
<div class="dashboard-container">
|
||
<!-- 左侧侧边æ ?-->
|
||
<aside class="sidebar">
|
||
<div class="sidebar-header">
|
||
<div class="user-info">
|
||
<div class="user-avatar">
|
||
<i class="fas fa-chalkboard-teacher"></i>
|
||
</div>
|
||
<div class="user-details">
|
||
<h3 id="teacherName">æ<EFBFBD>Žè€<EFBFBD>师</h3>
|
||
<p>教师 | 部门ï¼?span id="teacherDept">计算机å¦é™?/span></p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<ul class="sidebar-menu">
|
||
<li>
|
||
<a href="#" class="active">
|
||
<i class="fas fa-tachometer-alt"></i>
|
||
<span>仪表æ<EFBFBD>?/span>
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="/teacher/grade_entry">
|
||
<i class="fas fa-edit"></i>
|
||
<span>æˆ<EFBFBD>绩录入</span>
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="grade_query.html">
|
||
<i class="fas fa-search"></i>
|
||
<span>æˆ<EFBFBD>绩查询</span>
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="grade_manage.html">
|
||
<i class="fas fa-cog"></i>
|
||
<span>æˆ<EFBFBD>绩管ç<EFBFBD>†</span>
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="#">
|
||
<i class="fas fa-chart-bar"></i>
|
||
<span>统计分æž<EFBFBD></span>
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="#">
|
||
<i class="fas fa-download"></i>
|
||
<span>æ•°æ<EFBFBD>®å¯¼å‡º</span>
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="#">
|
||
<i class="fas fa-user"></i>
|
||
<span>个人信æ<EFBFBD>¯</span>
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
</aside>
|
||
|
||
<!-- 主内容区 -->
|
||
<main class="main-content">
|
||
<div class="content-header">
|
||
<div>
|
||
<h1 class="page-title">教师仪表æ<EFBFBD>?/h1>
|
||
<div class="breadcrumb">
|
||
<a href="/">主页</a>
|
||
<i class="fas fa-chevron-right"></i>
|
||
<span>教师仪表æ<EFBFBD>?/span>
|
||
</div>
|
||
</div>
|
||
<div class="current-time" id="currentTime"></div>
|
||
</div>
|
||
|
||
<!-- 功能å<C2BD>¡ç‰‡ -->
|
||
<div class="function-grid">
|
||
<div class="function-card" onclick="window.location.href='grade_entry.html'">
|
||
<div class="function-icon">
|
||
<i class="fas fa-edit"></i>
|
||
</div>
|
||
<h3 class="function-title">æˆ<EFBFBD>绩录入</h3>
|
||
<p class="function-description">
|
||
为å¦ç”Ÿå½•入新的课程æˆ<C3A6>绩,支æŒ<C3A6>批é‡<C3A9>导入和å<C592>•个录入ã€? </p>
|
||
<button class="btn btn-primary">开始录�/button>
|
||
</div>
|
||
|
||
<div class="function-card" onclick="window.location.href='grade_query.html'">
|
||
<div class="function-icon">
|
||
<i class="fas fa-search"></i>
|
||
</div>
|
||
<h3 class="function-title">æˆ<EFBFBD>绩查询</h3>
|
||
<p class="function-description">
|
||
查询å¦ç”Ÿæˆ<C3A6>绩,支æŒ<C3A6>按ç<E280B0>级ã€<C3A3>课程ã€<C3A3>妿œŸç‰å¤šç»´åº¦ç›é€‰ã€? </p>
|
||
<button class="btn btn-primary">开始查�/button>
|
||
</div>
|
||
|
||
<div class="function-card" onclick="window.location.href='grade_manage.html'">
|
||
<div class="function-icon">
|
||
<i class="fas fa-cog"></i>
|
||
</div>
|
||
<h3 class="function-title">æˆ<EFBFBD>绩管ç<EFBFBD>†</h3>
|
||
<p class="function-description">
|
||
ä¿®æ”¹æˆ–åˆ é™¤å·²å½•å…¥çš„æˆ<C3A6>绩,管ç<C2A1>†æˆ<C3A6>绩记录和状æ€<C3A6>ã€? </p>
|
||
<button class="btn btn-primary">开始管ç<EFBFBD>?/button>
|
||
</div>
|
||
|
||
<div class="function-card" onclick="window.location.href='#'">
|
||
<div class="function-icon">
|
||
<i class="fas fa-chart-bar"></i>
|
||
</div>
|
||
<h3 class="function-title">统计分æž<EFBFBD></h3>
|
||
<p class="function-description">
|
||
查看æˆ<C3A6>绩统计图表,分æž<C3A6>æ•™å¦æ•ˆæžœå’Œå¦ç”Ÿè¡¨çްã€? </p>
|
||
<button class="btn btn-primary">查看统计</button>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 快速æ“<C3A6>ä½?-->
|
||
<div class="quick-actions">
|
||
<h2 class="section-title">
|
||
<i class="fas fa-bolt"></i>
|
||
快速æ“<C3A6>ä½? </h2>
|
||
<div class="action-buttons">
|
||
<a href="/teacher/grade_entry" class="action-btn">
|
||
<i class="fas fa-plus"></i>
|
||
录入新æˆ<C3A6>ç»? </a>
|
||
<a href="grade_query.html" class="action-btn">
|
||
<i class="fas fa-search"></i>
|
||
查询æˆ<C3A6>绩
|
||
</a>
|
||
<a href="#" class="action-btn">
|
||
<i class="fas fa-download"></i>
|
||
导出æˆ<C3A6>绩å<C2A9>? </a>
|
||
<a href="#" class="action-btn">
|
||
<i class="fas fa-chart-pie"></i>
|
||
生æˆ<C3A6>统计报告
|
||
</a>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 最近活åŠ
|