Files
canglan dbf70f602e 静态资源加修改时间版本号,修复部署后浏览器缓存旧 JS 的问题
页面 JS/CSS 引用统一改为 asset_url()(附加 ?v=filemtime):
部署更新文件后浏览器自动拉取新版本,避免出现"新按钮点击无反应"等旧缓存现象。
2026-10-10 16:13:22 +08:00

113 lines
4.2 KiB
PHP

<?php
/**
* 班级操行分管理系统 - 管理端个人记录查询
*
* 开发者: Canglan
* 联系方式: admin@sea-studio.top
* 版权归属: Sea Network Technology Studio
* 许可证: MIT License
*
* 版权所有 © 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 = current_group_name();
require_perm('view_all_records');
include __DIR__ . '/../includes/header.php';
?>
<?php include __DIR__ . '/../includes/nav.php'; ?>
<div class="container">
<div class="card">
<div class="filter-bar">
<div class="filter-group" style="min-width: 220px;">
<label>学生</label>
<select id="queryStudentId" onchange="onQueryStudentChange()">
<option value="">-- 请选择学生 --</option>
</select>
</div>
<div class="filter-group">
<label>学期</label>
<select id="querySemesterId" onchange="onQuerySemesterChange()"></select>
</div>
<div class="filter-group" style="flex: 0 0 auto;">
<button class="btn btn-primary" onclick="queryStudentRecords(1)">查询</button>
</div>
<div class="filter-group" style="flex: 0 0 auto;">
<button class="btn btn-secondary" onclick="exportStudentRecords()">导出个人记录</button>
</div>
</div>
<div id="queryPlaceholder" style="text-align: center; color: var(--color-text-secondary); padding: 32px 0;">
请选择学生后点击“查询”,查看基础分、加分、月度分及月度加减分理由汇总
</div>
</div>
<div id="queryResult" style="display: none;">
<div class="card">
<div class="card-title" id="queryStudentTitle">学生汇总</div>
<div class="stats-grid" id="querySummaryCards"></div>
<div id="querySummaryHint" style="font-size: 12px; color: var(--color-text-secondary);"></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>
</tr>
</thead>
<tbody id="queryMonthlyList"></tbody>
</table>
</div>
</div>
<div class="card">
<div class="card-title">月度加减分理由汇总</div>
<div id="queryReasonSummary"></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 style="white-space: nowrap;">时间</th>
<?php if (has_perm('revoke_any') || has_perm('revoke_own')): ?>
<th>状态/操作</th>
<?php endif; ?>
</tr>
</thead>
<tbody id="queryRecordList"></tbody>
</table>
</div>
<div class="pagination" id="queryPagination"></div>
</div>
</div>
</div>
<script>window.PAGE_CONFIG = { role: '<?php echo htmlspecialchars($role, ENT_QUOTES, 'UTF-8'); ?>', userId: <?php echo intval($_SESSION['user_id']); ?> };</script>
<script src="<?php echo asset_url('/assets/js/modules/modal-utils.js'); ?>"></script>
<script src="<?php echo asset_url('/assets/js/record-query.js'); ?>"></script>
<?php include __DIR__ . '/../includes/footer.php'; ?>