fix(客户详情): 修复SOP分析功能并优化通话记录显示逻辑
重构SOP分析功能,移除不必要的recordContext参数,改为使用组件内部数据。优化通话记录显示逻辑,当存在通话记录时优先显示record_context内容。在sale.vue中添加对SOP分析事件的处理,通过ref调用CustomerDetail组件的方法。
This commit is contained in:
@@ -69,7 +69,8 @@
|
||||
:call-info="callRecords"
|
||||
@view-form-data="handleViewFormData"
|
||||
@view-chat-data="handleViewChatData"
|
||||
@view-call-data="handleViewCallData" />
|
||||
@view-call-data="handleViewCallData"
|
||||
@analyze-sop="handleAnalyzeSop" />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -84,6 +85,7 @@
|
||||
</div>
|
||||
<div class="section-content">
|
||||
<CustomerDetail
|
||||
ref="customerDetailRef"
|
||||
:selected-contact="selectedContact"
|
||||
:form-info="formInfo"
|
||||
:chat-records="chatRecords"
|
||||
@@ -169,6 +171,7 @@ const goBack = () => {
|
||||
// STATE
|
||||
const selectedContactId = ref(null);
|
||||
const contextPanelRef = ref(null);
|
||||
const customerDetailRef = ref(null);
|
||||
const selectedStage = ref('全部'); // 选中的销售阶段
|
||||
|
||||
const isPageLoading = ref(true); // 页面整体加载状态
|
||||
@@ -725,6 +728,14 @@ const handleViewChatData = async (contact) => {
|
||||
const handleViewCallData = (contact) => {
|
||||
// TODO: 实现通话录音查看逻辑
|
||||
};
|
||||
|
||||
// 处理SOP分析事件
|
||||
const handleAnalyzeSop = (analyzeData) => {
|
||||
console.log('收到SOP分析请求:', analyzeData);
|
||||
if (customerDetailRef.value && analyzeData.content) {
|
||||
customerDetailRef.value.startSopAnalysis(analyzeData.content);
|
||||
}
|
||||
};
|
||||
// 销售漏斗
|
||||
const SalesFunnel = ref([])
|
||||
async function CenterGetSalesFunnel() {
|
||||
|
||||
Reference in New Issue
Block a user