feat: 多班级版班级管理系统 v2.0
技术栈:Go (Gin + GORM) + PHP + MySQL 5.7 + Redis 主要功能: - 多班级完全隔离(class_id 贯穿全系统) - 后端从 Python FastAPI 重写为 Go Gin(端口 56789) - 超级管理员独立登录(env 配置路径,默认账密 admin/Admin123) - 科任老师/课代表新角色 - 课代表作业管理页面 - 排行榜分项排行(操行分/考勤/作业) - 角色加减分上下限由班主任配置 - 家长改密功能(可开关) - 班级角色按需开关 - 宿舍号格式:南0-000 - 周度/月度重置功能 - MySQL 5.7 兼容 - Nginx 反向代理部署 开发者: Canglan 版权归属: Sea Network Technology Studio 许可证: Apache License 2.0
This commit is contained in:
100
frontend/admin/attendance.php
Normal file
100
frontend/admin/attendance.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
/**
|
||||
* 多班级版班级管理系统 - 管理端考勤管理
|
||||
*
|
||||
* 开发者: Canglan
|
||||
* 联系方式: admin@sea-studio.top
|
||||
* 版权归属: Sea Network Technology Studio
|
||||
* 许可证: Apache License 2.0
|
||||
*
|
||||
* 版权所有 © Sea Network Technology Studio
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/../config.php';
|
||||
|
||||
if (!isset($_SESSION['user_id']) || $_SESSION['user_type'] !== 'admin') {
|
||||
header('Location: /index.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
$page_title = '考勤管理';
|
||||
$role = $_SESSION['role'] ?? '';
|
||||
|
||||
if (!in_array($role, ['班主任', '考勤委员'])) {
|
||||
header('Location: /admin/dashboard.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
include __DIR__ . '/../includes/header.php';
|
||||
?>
|
||||
|
||||
<?php include __DIR__ . '/../includes/nav.php'; ?>
|
||||
|
||||
<div class="container">
|
||||
<!-- 考勤操作工具栏 -->
|
||||
<div class="card">
|
||||
<div class="attendance-toolbar">
|
||||
<div class="toolbar-field">
|
||||
<label class="toolbar-label">日期</label>
|
||||
<input type="date" id="attendanceDate" value="<?php echo date('Y-m-d'); ?>">
|
||||
</div>
|
||||
<div class="toolbar-field">
|
||||
<label class="toolbar-label">时段</label>
|
||||
<select id="attendanceSlot">
|
||||
<option value="morning">早上 7:15</option>
|
||||
<option value="afternoon">中午 14:00</option>
|
||||
<option value="evening">晚修 19:30</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="status-group" style="margin-left:auto;">
|
||||
<button class="status-btn active" data-status="absent" onclick="selectStatus(this)" id="btnAbsent">缺勤</button>
|
||||
<button class="status-btn" data-status="late" onclick="selectStatus(this)" id="btnLate">迟到</button>
|
||||
<button class="status-btn" data-status="leave" onclick="selectStatus(this)" id="btnLeave">请假</button>
|
||||
</div>
|
||||
<button class="btn btn-danger" onclick="submitAttendance()">提交考勤</button>
|
||||
</div>
|
||||
<div class="attendance-toolbar">
|
||||
<div class="toolbar-field">
|
||||
<label class="toolbar-label">扣分</label>
|
||||
<input type="number" id="customDeduction" placeholder="默认值" min="0" max="20" style="width:80px;" title="留空或0使用默认值">
|
||||
</div>
|
||||
<div class="toolbar-field" style="flex:1;min-width:180px;">
|
||||
<label class="toolbar-label">原因</label>
|
||||
<input type="text" id="attendanceReason" placeholder="选填">
|
||||
</div>
|
||||
<button class="btn btn-primary" style="margin-left:auto;" onclick="selectAllStudents()">全选</button>
|
||||
<button class="btn" onclick="deselectAllStudents()">取消全选</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 学生方格网格 -->
|
||||
<div class="card">
|
||||
<div class="card-title">点击选择有考勤异常的学生</div>
|
||||
<div class="student-grid" id="studentGrid">
|
||||
<!-- JS 动态生成 -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 历史考勤记录 -->
|
||||
<div class="card">
|
||||
<div class="card-title">考勤记录</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr><th>学号</th><th>姓名</th><th>状态</th><th>原因</th><th>记录人</th><th>扣分</th></tr>
|
||||
</thead>
|
||||
<tbody id="attendanceList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.student-cell { display: flex; flex-direction: column; align-items: center; }
|
||||
.student-cell-name { font-size: 14px; font-weight: 500; }
|
||||
.student-cell-no { font-size: 11px; color: #999; }
|
||||
</style>
|
||||
<script src="/assets/js/modules/modal-utils.js"></script>
|
||||
<script src="/assets/js/attendance-manage.js"></script>
|
||||
|
||||
<?php include __DIR__ . '/../includes/footer.php'; ?>
|
||||
Reference in New Issue
Block a user