From a6be73d4391080bf012825bcdd95645e0a89bdcb Mon Sep 17 00:00:00 2001
From: tony.cheng <chengmingwei_1984122@126.com>
Date: Wed, 04 Feb 2026 18:09:49 +0800
Subject: [PATCH] feat: 完善调解平台功能并集成API服务
---
web-app/src/components/dashboard/TopSection.jsx | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/web-app/src/components/dashboard/TopSection.jsx b/web-app/src/components/dashboard/TopSection.jsx
index 370a311..fe61d02 100644
--- a/web-app/src/components/dashboard/TopSection.jsx
+++ b/web-app/src/components/dashboard/TopSection.jsx
@@ -1,15 +1,20 @@
import React from 'react';
+import { useCaseData } from '../../contexts/CaseDataContext';
+import { translateMediationState } from '../../utils/stateTranslator';
/**
* 顶部区域组件 - 标题、AI状态、案件信息
*/
-const TopSection = ({ caseInfo = {}, aiStatus = 'AI调解中' }) => {
- const {
- caseNumber = 'LD-2026-0014',
- disputeType = '劳动争议/拖欠、克扣工资',
- startTime = '2026-01-15 09:30',
- endTime = '2026-01-15 11:00',
- } = caseInfo;
+const TopSection = () => {
+ const { caseData } = useCaseData();
+ const timeline = caseData || {};
+
+ // 从 timeline 中获取数据,提供默认值
+ const caseNumber = timeline.case_ref || 'LD-2026-0014';
+ const disputeType = timeline.case_type_first_name || '劳动争议/拖欠、克扣工资';
+ const startTime = timeline.mediation?.start_date || '2026-01-15 09:30';
+ const endTime = timeline.mediation?.end_date || '2026-01-15 11:00';
+ const aiStatus = translateMediationState(timeline.mediation?.state) || 'AI调解中';
return (
<section className="top-section">
--
Gitblit v1.8.0