/** * 交叉评查文件信息组件 */ interface FileInfoProps { fileInfo: { fileName: string; contractNumber: string; fileSize?: string; fileFormat?: string; pageCount?: number; uploadTime?: string; uploadUser?: string; auditStatus?: number; path?: string; previousRoute?: string; fileType?: string; }; onConfirmResults: () => void; } export function FileInfo({ fileInfo, onConfirmResults }: FileInfoProps) { const handleDownloadFile = () => { if (fileInfo.path) { // 创建一个隐藏的下载链接 const link = document.createElement('a'); link.href = fileInfo.path; link.download = fileInfo.fileName; document.body.appendChild(link); link.click(); document.body.removeChild(link); } else { alert('文件路径不存在,无法下载'); } }; const handleExportReport = () => { alert('导出交叉评查报告功能'); }; return (