feat: support WPS report material workbooks

This commit is contained in:
hectorzhao
2026-09-04 17:10:04 +08:00
parent 48d0363920
commit fb39c8b606
29 changed files with 2737 additions and 734 deletions
@@ -0,0 +1,56 @@
import { useState } from 'react';
import { Button, Modal } from '@/components/ui';
export type ReportWorkbookFormat = 'excel_drawing' | 'wps_cell_image';
export function ReportExportFormatModal({
busy = false,
onClose,
onConfirm,
title = '选择报备文件格式',
}: {
busy?: boolean;
onClose: () => void;
onConfirm: (format: ReportWorkbookFormat) => void;
title?: string;
}) {
const [format, setFormat] = useState<ReportWorkbookFormat>('excel_drawing');
return (
<Modal
footer={
<>
<Button disabled={busy} onClick={onClose} variant="ghost">
</Button>
<Button disabled={busy} onClick={() => onConfirm(format)}>
{busy ? '生成中…' : '确认导出'}
</Button>
</>
}
onClose={onClose}
open
title={title}
>
<div className="report-export-format-options" role="radiogroup" aria-label="报备文件格式">
<button
aria-checked={format === 'excel_drawing'}
onClick={() => setFormat('excel_drawing')}
role="radio"
type="button"
>
<strong> Excel </strong>
<span> Drawing Microsoft Excel </span>
</button>
<button
aria-checked={format === 'wps_cell_image'}
onClick={() => setFormat('wps_cell_image')}
role="radio"
type="button"
>
<strong>WPS </strong>
<span>使 DISPIMG cellimages.xml WPS </span>
</button>
</div>
</Modal>
);
}