-
-
- {{ record.user_alias || record.user_email || `任务 #${record.task_id}` }}
+ 用户
+ 任务
+ 状态
+ 响应摘要
+ 操作
+
+
+
+
+
+ {{ record.user_alias || record.user_email || `用户 #${record.user_id || '未知'}` }}
+
+
+ ID {{ record.user_id || 'unknown' }}
+
-
-
{{ formatFullDateTime(record.check_in_time) }}
-
{{ record.response_text || record.error_message || '无响应内容' }}
+
+
+ {{ record.task_name || `任务 #${record.task_id}` }}
+
+
+ #{{ record.task_id }}
+ ThreadId: {{ record.thread_id }}
+
+
+
{{
+ statusLabel(record.status)
+ }}
+
+ {{ statusLabel(record.trigger_type) }}
+
+
+
+
+ {{ recordResponseSummary(record) }}
+
+
+ {{ formatFullDateTime(record.check_in_time) }}
+
+
+
+
+
+
+
+
+
共 {{ total }} 条,{{ rangeLabel }}
+
+
+
-
- {{
- statusLabel(record.status)
- }}
- {{
- record.task_name || record.thread_id || '无任务名'
- }}
-
-
+
+
+
diff --git a/apps/frontend/src/views/admin/admin-records.ts b/apps/frontend/src/views/admin/admin-records.ts
new file mode 100644
index 0000000..56e38fb
--- /dev/null
+++ b/apps/frontend/src/views/admin/admin-records.ts
@@ -0,0 +1,46 @@
+import type { CheckInRecord } from '@/api'
+
+export function visibleRecordRange(total: number, skip: number, limit: number) {
+ if (total <= 0) return '当前 0 - 0'
+ const start = Math.min(skip + 1, total)
+ const end = Math.min(skip + limit, total)
+ return `当前 ${start} - ${end}`
+}
+
+export function formatRecordDetailContent(value?: string | null) {
+ const text = value?.trim()
+ if (!text) return '无内容'
+
+ try {
+ return JSON.stringify(JSON.parse(text), null, 2)
+ } catch {
+ return text
+ }
+}
+
+function parsedRecordMessage(value?: string | null) {
+ if (!value) return ''
+
+ try {
+ const payload = JSON.parse(value) as unknown
+ if (typeof payload !== 'object' || payload === null) return ''
+ const data = payload as Record
+ const candidates = [data.Data, data.Description, data.message, data.error]
+ const hit = candidates.find((candidate) => typeof candidate === 'string' && candidate.trim())
+ return typeof hit === 'string' ? hit.trim() : ''
+ } catch {
+ return ''
+ }
+}
+
+export function recordResponseSummary(
+ record: Pick,
+ maxLength = 96,
+) {
+ const source = record.response_text || record.error_message || ''
+ const parsed = parsedRecordMessage(source)
+ const raw = parsed || source.trim() || '无响应内容'
+ const normalized = raw.replace(/\s+/g, ' ')
+ if (normalized.length <= maxLength) return normalized
+ return `${normalized.slice(0, Math.max(0, maxLength - 1))}…`
+}