-
} placeholder="搜索访客名称..." value={search} onChange={e => setSearch(e.target.value)} allowClear size="small" />
-
-
-
- ({ value: v, label: v }))} />
- setDateRange(dates as [Dayjs | null, Dayjs | null])} />
-
+
} placeholder="搜索访客..." value={search} onChange={e => setSearch(e.target.value)} allowClear size="small" />
+
({ value: k, label: v }))} />
- {filtered.length === 0 ? (
-
- ) : (
- filtered.map(r => (
-
setSelectedId(r.id)}
- >
+ {loading ?
:
+ sessions.filter(s => !search || s.status.includes(search) || String(s.customer_id).includes(search)).map(s => (
+
setSelectedId(s.id)}>
-
-
-
-
-
{r.visitorName}
-
{r.channel} · {r.agent}
-
+
+
客户{s.customer_id}
ID: {s.id}
-
{statusLabels[r.status]}
+
{statusLabels[s.status] || s.status}
-
{r.lastMessage}
- {r.time}
- {r.satisfaction && {'★'.repeat(r.satisfaction)}}
+ {new Date(s.created_at).toLocaleString('zh-CN')}
+ {s.satisfaction_score && {'★'.repeat(s.satisfaction_score)}}
- ))
- )}
+ ))}
+ {!loading && sessions.length === 0 &&
}