diff --git a/demo/web/static/index.html b/demo/web/static/index.html index 7146930..fad328c 100644 --- a/demo/web/static/index.html +++ b/demo/web/static/index.html @@ -620,6 +620,18 @@ async function loadCustomers() { } // --- 客户详情 --- + +/** 切换 AI 沟通摘要的折叠/展开状态 */ +function toggleSummary() { + const body = document.getElementById('summary-body'); + const arrow = document.getElementById('summary-arrow'); + if (!body || !arrow) return; + const collapsed = body.style.display === 'none'; + body.style.display = collapsed ? '' : 'none'; + arrow.classList.toggle('rotate-90', collapsed); + arrow.classList.toggle('rotate-0', !collapsed); +} + async function showCustomerDetail(id) { currentCustomerId = id; currentMsgPage = 1; @@ -643,34 +655,39 @@ async function showCustomerDetail(id) { const summary = document.getElementById('detail-summary'); summary.innerHTML = ` -
-

AI 沟通摘要

+
+
+ +

AI 沟通摘要

+
分析时间: ${customer.last_analysis ? new Date(customer.last_analysis).toLocaleString('zh-CN') : '-'}
-
-

${customer.summary || '暂无摘要'}

-
- ${(customer.key_points || []).length > 0 ? ` -
-

${customer.stage === '成交' ? '关键成交点' : '需要突破的问题点'}

- -
- ` : ''} -
-
- 异议: - ${(customer.objections || []).join('、') || '无'} +
+
+

${customer.summary || '暂无摘要'}

-
- 下一步: - ${customer.next_action || '-'} + ${(customer.key_points || []).length > 0 ? ` +
+

${customer.stage === '成交' ? '关键成交点' : '需要突破的问题点'}

+
    + ${(customer.key_points || []).map(p => ` +
  • + + ${p} +
  • + `).join('')} +
+
+ ` : ''} +
+
+ 异议: + ${(customer.objections || []).join('、') || '无'} +
+
+ 下一步: + ${customer.next_action || '-'} +
`;