From 92ef9fe163ce4db27337d5573e3ba6c80f521da4 Mon Sep 17 00:00:00 2001 From: ericwyuan Date: Fri, 21 Aug 2026 14:03:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E4=BA=BA=E7=89=A9=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=98=BE=E7=A4=BA=E4=BA=BA=E7=89=A9=E4=BB=A3=E8=A1=A8?= =?UTF-8?q?=E7=94=BB=E9=9D=A2=20-=20=E6=AF=8F=E4=B8=AA=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E5=8F=96=E5=85=B6=E4=B8=80=20label=20=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=9A=84=E6=88=AA=E5=9B=BE=E4=BD=9C=E4=B8=BA?= =?UTF-8?q?=E5=A4=B4=E5=83=8F=EF=BC=88Oracle=20event=20thumb=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fam-ui/src/app.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/fam-ui/src/app.py b/fam-ui/src/app.py index a52c79a..4327a9a 100644 --- a/fam-ui/src/app.py +++ b/fam-ui/src/app.py @@ -802,13 +802,33 @@ elif page == "👤 人物管理": f'border:1px solid #713f12;padding:1px 8px;border-radius:10px;' f'margin-left:8px;">未命名') label_str = ' · '.join(g['labels']) + # 人物代表画面:取该身份任一 label 出现事件的截图(头像) + rep_img = '' + if _oracle_url: + for lb in g['labels']: + try: + cursor.execute( + "SELECT e.id FROM sync_events e WHERE e.person_list_json LIKE %s " + "ORDER BY e.id LIMIT 1", (f'%{lb}%',)) + r2 = cursor.fetchone() + if r2 and r2['id']: + rep_img = ( + f'') + break + except Exception: + continue st.markdown( f'
' f'{esc(key)}{tag}
' f'
' f'标识: {esc(label_str)}
' f'
' - f'出现 {g["appearances"]} 次 · 首次 {esc(first_str)}
', + f'出现 {g["appearances"]} 次 · 首次 {esc(first_str)}' + f'{rep_img}', unsafe_allow_html=True) if not is_named: # 未命名身份:每个 label 都给一个命名框