新增教师资料更新功能,包括个人信息修改和密码更新 添加操作日志记录系统,记录用户关键操作 实现系统设置模块,支持动态配置系统参数 重构数据库模型,新增教师表和系统设置表 优化成绩录入逻辑,支持平时分、期中和期末成绩计算 添加数据导出功能,支持学生、教师和成绩数据导出 完善管理员后台,增加统计图表和操作日志查看
244 lines
8.3 KiB
HTML
244 lines
8.3 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>成绩录入 - 教师端</title>
|
|
<!-- Bootstrap 5 CSS -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<!-- Font Awesome -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
|
<!-- Google Fonts -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet">
|
|
<style>
|
|
:root {
|
|
--sidebar-width: 260px;
|
|
--primary-color: #1cc88a;
|
|
--secondary-color: #858796;
|
|
--light-bg: #f8f9fc;
|
|
--teacher-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
|
|
}
|
|
|
|
body {
|
|
font-family: 'Noto Sans SC', sans-serif;
|
|
background-color: var(--light-bg);
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
/* 侧边栏样式 */
|
|
.sidebar {
|
|
width: var(--sidebar-width);
|
|
height: 100vh;
|
|
position: fixed;
|
|
left: 0;
|
|
top: 0;
|
|
background: var(--teacher-gradient);
|
|
color: white;
|
|
z-index: 1000;
|
|
transition: all 0.3s;
|
|
}
|
|
|
|
.sidebar-header {
|
|
padding: 2rem 1.5rem;
|
|
text-align: center;
|
|
border-bottom: 1px solid rgba(255,255,255,0.1);
|
|
}
|
|
|
|
.sidebar-brand {
|
|
font-size: 1.25rem;
|
|
font-weight: 700;
|
|
color: white;
|
|
text-decoration: none;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.user-profile {
|
|
padding: 2rem 1rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.user-avatar {
|
|
width: 80px;
|
|
height: 80px;
|
|
background: rgba(255,255,255,0.2);
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin: 0 auto 1rem;
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.user-info h6 { margin-bottom: 0.25rem; font-weight: 600; }
|
|
.user-info p { font-size: 0.85rem; opacity: 0.8; margin-bottom: 0; }
|
|
|
|
.nav-menu { padding: 1rem 0; }
|
|
.nav-item { padding: 0.25rem 1rem; }
|
|
|
|
.nav-link {
|
|
color: rgba(255,255,255,0.8);
|
|
padding: 0.8rem 1.25rem;
|
|
border-radius: 0.5rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
transition: all 0.2s;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.nav-link:hover, .nav-link.active {
|
|
color: white;
|
|
background: rgba(255,255,255,0.15);
|
|
}
|
|
|
|
.nav-link i { width: 20px; text-align: center; }
|
|
|
|
/* 主内容区 */
|
|
.main-content {
|
|
margin-left: var(--sidebar-width);
|
|
padding: 2rem;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.top-navbar {
|
|
background: white;
|
|
padding: 1rem 2rem;
|
|
border-radius: 1rem;
|
|
box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
|
|
margin-bottom: 2rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.page-heading h4 { margin-bottom: 0; font-weight: 700; color: #333; }
|
|
|
|
@media (max-width: 992px) {
|
|
.sidebar { left: -var(--sidebar-width); }
|
|
.main-content { margin-left: 0; }
|
|
.sidebar.active { left: 0; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<!-- 侧边栏 -->
|
|
<div class="sidebar">
|
|
<div class="sidebar-header">
|
|
<a href="#" class="sidebar-brand">
|
|
<i class="fas fa-chalkboard-teacher"></i>
|
|
<span>成绩管理系统</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="user-profile">
|
|
<div class="user-avatar">
|
|
<i class="fas fa-user-tie"></i>
|
|
</div>
|
|
<div class="user-info text-white">
|
|
<h6 id="teacherName">加载中...</h6>
|
|
<p>教师 | <span id="teacherId">...</span></p>
|
|
</div>
|
|
</div>
|
|
|
|
<nav class="nav-menu">
|
|
<div class="nav-item">
|
|
<a href="/teacher/dashboard" class="nav-link">
|
|
<i class="fas fa-tachometer-alt"></i>
|
|
<span>教师仪表板</span>
|
|
</a>
|
|
</div>
|
|
<div class="nav-item">
|
|
<a href="/teacher/grade_entry" class="nav-link active">
|
|
<i class="fas fa-edit"></i>
|
|
<span>成绩录入</span>
|
|
</a>
|
|
</div>
|
|
<div class="nav-item">
|
|
<a href="/teacher/grade_management" class="nav-link">
|
|
<i class="fas fa-tasks"></i>
|
|
<span>成绩管理</span>
|
|
</a>
|
|
</div>
|
|
<div class="nav-item">
|
|
<a href="/teacher/profile" class="nav-link">
|
|
<i class="fas fa-user-edit"></i>
|
|
<span>个人资料</span>
|
|
</a>
|
|
</div>
|
|
<div class="nav-item mt-4">
|
|
<a href="javascript:void(0)" id="logoutBtn" class="nav-link text-warning">
|
|
<i class="fas fa-sign-out-alt"></i>
|
|
<span>退出登录</span>
|
|
</a>
|
|
</div>
|
|
</nav>
|
|
</div>
|
|
|
|
<!-- 主内容 -->
|
|
<div class="main-content">
|
|
<!-- 顶部导航 -->
|
|
<div class="top-navbar">
|
|
<div class="page-heading">
|
|
<h4>成绩录入</h4>
|
|
</div>
|
|
<div class="d-flex align-items-center gap-3">
|
|
<div class="text-end d-none d-md-block">
|
|
<div class="small text-muted" id="currentTime"></div>
|
|
<div class="fw-bold" id="userName">加载中...</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 录入卡片 -->
|
|
<div class="card border-0 shadow-sm">
|
|
<div class="card-body p-4">
|
|
<div class="row mb-4 align-items-end">
|
|
<div class="col-md-4">
|
|
<label class="form-label text-muted small fw-bold">选择课程</label>
|
|
<select id="courseSelect" class="form-select">
|
|
<option value="">加载课程中...</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-8 text-end">
|
|
<div class="alert alert-info d-inline-block mb-0 py-2 px-3 small">
|
|
<i class="fas fa-info-circle me-1"></i> 请先选择课程,系统将自动加载该课程的学生名单
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-hover align-middle">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th>学号</th>
|
|
<th>姓名</th>
|
|
<th style="width: 120px;">平时成绩</th>
|
|
<th style="width: 120px;">期中成绩</th>
|
|
<th style="width: 120px;">期末成绩</th>
|
|
<th>总评</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="studentTableBody">
|
|
<tr>
|
|
<td colspan="7" class="text-center py-5 text-muted">
|
|
<i class="fas fa-arrow-up mb-2"></i><br>
|
|
请选择课程以加载学生列表
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Bootstrap 5 JS -->
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="/public/js/auth.js"></script>
|
|
<script src="/public/js/teacher.js"></script>
|
|
</body>
|
|
</html> |