完善文档

This commit is contained in:
2026-04-19 15:59:20 +08:00
parent 4972d1e3be
commit fe411724f4
10 changed files with 853 additions and 25 deletions

View File

@@ -56,7 +56,7 @@ include __DIR__ . '/../includes/header.php';
<th>分数变动</th>
<th>原因</th>
<th>操作人</th>
<?php if ($role === '班主任' || $role === '班长' || $role === '志愿委员'): ?>
<?php if ($role === '班主任' || $role === '班长'): ?>
<th>操作</th>
<?php endif; ?>
</tr>
@@ -108,14 +108,14 @@ async function loadHistory(page = 1) {
<td class="${pointsClass}">${record.points_change > 0 ? '+' : ''}${record.points_change}</td>
<td>${escapeHtml(record.reason)}</td>
<td>${escapeHtml(record.recorder_name)}</td>`;
<?php if ($role === '班主任' || $role === '班长' || $role === '志愿委员'): ?>
<?php if ($role === '班主任' || $role === '班长'): ?>
html += `<td><button class="btn btn-sm btn-danger" onclick="revokeRecord(${record.record_id})">撤销</button></td>`;
<?php endif; ?>
html += `</tr>`;
});
if (res.data.records.length === 0) {
const colSpan = <?php echo ($role === '班主任' || $role === '班长' || $role === '志愿委员') ? '6' : '5'; ?>;
const colSpan = <?php echo ($role === '班主任' || $role === '班长') ? '6' : '5'; ?>;
html = `<tr><td colspan="${colSpan}" style="text-align:center;">暂无记录</td></tr>`;
}