| | |
| | | import React, { useState } from 'react'; |
| | | import { Spin } from 'antd'; |
| | | import './App.css'; |
| | | |
| | | // Context |
| | | import { CaseDataProvider, useCaseData } from './contexts/CaseDataContext'; |
| | | |
| | | // 调解看板组件 |
| | | import TopSection from './components/dashboard/TopSection'; |
| | |
| | | import SimilarCaseContent from './components/tools/SimilarCaseContent'; |
| | | |
| | | function App() { |
| | | return ( |
| | | <CaseDataProvider> |
| | | <AppContent /> |
| | | </CaseDataProvider> |
| | | ); |
| | | } |
| | | |
| | | function AppContent() { |
| | | const [activeModal, setActiveModal] = useState(null); |
| | | const [currentStep, setCurrentStep] = useState(1); |
| | | const { loading } = useCaseData(); |
| | | |
| | | // 工具配置 |
| | | const toolConfig = { |
| | |
| | | }; |
| | | |
| | | return ( |
| | | <Spin spinning={loading} tip="加载案件数据中..."> |
| | | <div className="app"> |
| | | {/* Font Awesome CDN */} |
| | | <link |
| | |
| | | {/* A区域:左侧主要内容 */} |
| | | <div className="area-a"> |
| | | {/* AI调解进度 */} |
| | | <MediationProgress currentStep={currentStep} /> |
| | | <MediationProgress /> |
| | | |
| | | {/* 选项卡容器 */} |
| | | <TabContainer /> |
| | |
| | | </section> |
| | | |
| | | {/* 底部悬浮控制看板 */} |
| | | <FloatingControlPanel currentStep={currentStep} elapsedTime="25分钟" /> |
| | | <FloatingControlPanel /> |
| | | |
| | | {/* 工具弹窗 */} |
| | | {activeModal && toolConfig[activeModal] && ( |
| | |
| | | </ToolModal> |
| | | )} |
| | | </div> |
| | | </Spin> |
| | | ); |
| | | } |
| | | |