添加学号追踪
This commit is contained in:
+11
-3
@@ -166,7 +166,6 @@
|
||||
.mono {
|
||||
font-family: var(--mono);
|
||||
font-size: 12px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.small {
|
||||
font-size: 12px;
|
||||
@@ -216,6 +215,7 @@
|
||||
<strong>声速测定 - 管理后台</strong>
|
||||
<span id="status" class="badge">未连接</span>
|
||||
<div class="spacer"></div>
|
||||
<a href="/admin/students" class="small" style="text-decoration: none; color: var(--accent)">学生列表</a>
|
||||
<label class="small">ADMIN_TOKEN:</label>
|
||||
<input id="token" style="min-width: 260px" placeholder="粘贴 ADMIN_TOKEN" />
|
||||
<button id="saveToken" class="primary">保存</button>
|
||||
@@ -245,6 +245,7 @@
|
||||
<div class="panel-bd">
|
||||
<div class="row" id="filtersTracker">
|
||||
<input id="fSession" placeholder="sessionId(模糊)" style="min-width: 220px" />
|
||||
<input id="fStudent" placeholder="studentId(模糊)" style="min-width: 160px" />
|
||||
<input id="fEvent" placeholder="event(模糊)" style="min-width: 180px" />
|
||||
<input id="fStep" placeholder="step(模糊)" style="min-width: 180px" />
|
||||
<select id="pageSize">
|
||||
@@ -259,6 +260,7 @@
|
||||
|
||||
<div class="row" id="filtersRecord" style="display: none">
|
||||
<input id="rSession" placeholder="sessionId(模糊)" style="min-width: 220px" />
|
||||
<input id="rStudent" placeholder="studentId(模糊)" style="min-width: 160px" />
|
||||
<select id="rNotes">
|
||||
<option value="">notes:全部</option>
|
||||
<option value="has">notes:有</option>
|
||||
@@ -387,9 +389,9 @@
|
||||
const cols =
|
||||
state.mode === 'tracker'
|
||||
?
|
||||
['createdAt', 'event', 'step', 'sessionId', 'ip', 'id']
|
||||
['createdAt', 'event', 'step', 'sessionId', 'studentId', 'ip', 'id']
|
||||
:
|
||||
['createdAt', 'sessionId', 'notes', 'ip', 'id'];
|
||||
['createdAt', 'sessionId', 'studentId', 'notes', 'ip', 'id'];
|
||||
for (const c of cols) {
|
||||
const th = document.createElement('th');
|
||||
th.textContent = c;
|
||||
@@ -425,6 +427,7 @@
|
||||
r.event || '',
|
||||
r.step || '',
|
||||
r.sessionId || '',
|
||||
r.studentId || '',
|
||||
r.ip || '',
|
||||
r.id,
|
||||
]
|
||||
@@ -432,6 +435,7 @@
|
||||
[
|
||||
new Date(r.createdAt).toLocaleString(),
|
||||
r.sessionId || '',
|
||||
r.studentId || '',
|
||||
r.notes || '',
|
||||
r.ip || '',
|
||||
r.id,
|
||||
@@ -482,6 +486,7 @@
|
||||
from,
|
||||
to,
|
||||
sessionId: $('fSession').value.trim(),
|
||||
studentId: $('fStudent').value.trim(),
|
||||
event: $('fEvent').value.trim(),
|
||||
step: $('fStep').value.trim(),
|
||||
};
|
||||
@@ -498,6 +503,7 @@
|
||||
from,
|
||||
to,
|
||||
sessionId: $('rSession').value.trim(),
|
||||
studentId: $('rStudent').value.trim(),
|
||||
notes: $('rNotes').value,
|
||||
};
|
||||
const data = await api('/api/admin/record', params);
|
||||
@@ -560,6 +566,7 @@
|
||||
|
||||
$('reset').addEventListener('click', async () => {
|
||||
$('fSession').value = '';
|
||||
$('fStudent').value = '';
|
||||
$('fEvent').value = '';
|
||||
$('fStep').value = '';
|
||||
$('from').value = '';
|
||||
@@ -583,6 +590,7 @@
|
||||
|
||||
$('rReset').addEventListener('click', async () => {
|
||||
$('rSession').value = '';
|
||||
$('rStudent').value = '';
|
||||
$('rNotes').value = '';
|
||||
$('from').value = '';
|
||||
$('to').value = '';
|
||||
|
||||
Reference in New Issue
Block a user