From bc2b5cf668bbe6ebbb4f090bc476781d8630c2bb Mon Sep 17 00:00:00 2001
From: tony.cheng <chengmingwei_1984122@126.com>
Date: Thu, 12 Mar 2026 16:05:59 +0800
Subject: [PATCH] feat: 优化外呼提示文案,使用perTypeName字段动态显示当事人类型

---
 web-app/src/App.js |   35 ++++++++++++++++++++++++++++++-----
 1 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/web-app/src/App.js b/web-app/src/App.js
index c687f46..813675c 100644
--- a/web-app/src/App.js
+++ b/web-app/src/App.js
@@ -1,4 +1,4 @@
-import React, { useState } from 'react';
+import React, { useState, useRef } from 'react';
 import { Spin } from 'antd';
 import './App.css';
 
@@ -32,7 +32,10 @@
 
 function AppContent() {
   const [activeModal, setActiveModal] = useState(null);
-  const { loading } = useCaseData();
+  const { loading, refreshData } = useCaseData();
+  
+  // TabContainer ref - 用于切换Tab
+  const tabContainerRef = useRef(null);
 
   // 工具配置
   const toolConfig = {
@@ -66,6 +69,25 @@
     setActiveModal(null);
   };
 
+  /**
+   * 切换Tab页签
+   * @param {string} tabKey - Tab键名
+   */
+  const handleSwitchTab = (tabKey) => {
+    if (tabContainerRef.current) {
+      tabContainerRef.current.switchTab(tabKey);
+    }
+  };
+
+  /**
+   * 刷新案件数据
+   */
+  const handleRefreshData = () => {
+    if (refreshData) {
+      refreshData();
+    }
+  };
+
   const renderModalContent = () => {
     if (!activeModal || !toolConfig[activeModal]) return null;
     const Component = toolConfig[activeModal].component;
@@ -92,7 +114,7 @@
             <MediationProgress />
 
             {/* 选项卡容器 */}
-            <TabContainer />
+            <TabContainer ref={tabContainerRef} />
           </div>
 
           {/* B区域:右侧工具栏 */}
@@ -114,8 +136,11 @@
           </ToolModal>
         )}
 
-        {/* 智能外呼通话显示组件 - 全局显示 */}
-        <OutboundCallWidget />
+        {/* 智能外呼通话显示组件 - 默认隐藏,可主动触发显示 */}
+        <OutboundCallWidget
+          onSwitchTab={handleSwitchTab}
+          onRefreshData={handleRefreshData}
+        />
       </div>
     </Spin>
   );

--
Gitblit v1.8.0