import React, { useState } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; import { useQuery } from '@tanstack/react-query'; import { Card, Steps, Row, Col, Statistic, Typography, Upload, Button, Space, Tag, Descriptions, Progress, Alert, Divider, message, } from 'antd'; import { CloudUploadOutlined, ScanOutlined, MergeCellsOutlined, ApartmentOutlined, AuditOutlined, FileTextOutlined, InboxOutlined, RightOutlined, } from '@ant-design/icons'; import { fetchCase, fetchImages, fetchTransactions, fetchAssessments, uploadImages } from '../../services/api'; const { Dragger } = Upload; const Workspace: React.FC = () => { const { id = '1' } = useParams(); const navigate = useNavigate(); const [currentStep, setCurrentStep] = useState(3); const { data: currentCase } = useQuery({ queryKey: ['case', id], queryFn: () => fetchCase(id) }); const { data: imagesData } = useQuery({ queryKey: ['images', id], queryFn: () => fetchImages(id) }); const { data: txData } = useQuery({ queryKey: ['transactions', id], queryFn: () => fetchTransactions(id) }); const { data: assessData } = useQuery({ queryKey: ['assessments', id], queryFn: () => fetchAssessments(id) }); const images = imagesData ?? []; const txList = txData?.items ?? []; const assessments = assessData?.items ?? []; const highConfirm = assessments.filter((a) => a.confidenceLevel === 'high').length; const pendingReview = assessments.filter((a) => a.reviewStatus === 'pending').length; if (!currentCase) return null; const steps = [ { title: '上传截图', icon: , description: `${images.length} 张已上传`, }, { title: 'OCR识别', icon: , description: `${images.filter((i: any) => i.ocrStatus === 'done').length}/${images.length} 已完成`, }, { title: '交易归并', icon: , description: `${txList.length} 笔交易`, }, { title: '资金分析', icon: , description: '已生成路径图', }, { title: '认定复核', icon: , description: `${pendingReview} 笔待复核`, }, { title: '报告导出', icon: , description: '待生成', }, ]; return (
{currentCase.title} 待复核 {currentCase.caseNo} · 承办人:{currentCase.handler} · 受害人:{currentCase.victimName} setCurrentStep(v)} /> 支持 JPG/PNG,可批量拖拽 } > { uploadImages(id, fileList as unknown as File[]) .then(() => message.success('截图上传成功')) .catch(() => message.error('上传失败')); return false; }} style={{ padding: '20px 0' }} >

点击或拖拽手机账单截图到此区域

支持微信、支付宝、银行APP、数字钱包等多种来源截图

i.ocrStatus === 'done').length / images.length) * 100 : 0, )} size={80} />
OCR 识别率
!t.isDuplicate).length / txList.length) * 100 : 0, )} size={80} strokeColor="#52c41a" />
去重有效率
高置信占比
{images.length} 张 微信 支付宝 银行 数字钱包 {txList.length} 笔 {txList.filter((t) => !t.isDuplicate).length} 笔 2 个 {pendingReview} 笔 {pendingReview > 0 && ( navigate('/cases/1/review')} > 立即复核 } /> )}
); }; export default Workspace;