diff --git a/src/pages/ReportEditor.tsx b/src/pages/ReportEditor.tsx index 570c1af..7a96e5a 100644 --- a/src/pages/ReportEditor.tsx +++ b/src/pages/ReportEditor.tsx @@ -2633,6 +2633,7 @@ export default function ReportEditor() { suppressContentEditableWarning onBlur={(e) => setDiffModal(prev => prev ? { ...prev, newHtml: e.target.innerHTML } : null)} dangerouslySetInnerHTML={{ __html: diffModal.newHtml }} + style={{ fontFamily: 'SimSun, "Microsoft YaHei", serif', fontSize: '12pt', lineHeight: '1.5' }} > diff --git a/src/utils/print.ts b/src/utils/print.ts index 9e2dcbd..a7f6067 100644 --- a/src/utils/print.ts +++ b/src/utils/print.ts @@ -41,6 +41,8 @@ export const printDocument = (htmlContent: string, docTitle: string = '图文报 .smart-field-wrapper .field-label { color: #64748b; user-select: none; } .smart-field-wrapper .field-value { min-width: 24px; padding: 0 2px; margin: 0; border: 1px solid #cbd5e1; border-radius: 2px; display: inline-block; background: #f8fafc; color: #0f172a; line-height: inherit; font-size: inherit; vertical-align: baseline; box-sizing: border-box; outline: none; text-align: center; } .report-signature-img { max-width: 120px; max-height: 40px; width: auto; height: auto; object-fit: contain; vertical-align: middle; display: inline-block; } + .ai-region { border: none !important; background: transparent !important; padding: 0 !important; margin: 0 !important; } + .ai-region > [contenteditable="false"] { display: none !important; } @media print { .smart-field-wrapper .field-value { outline: none !important; box-shadow: none !important; border: none !important; border-bottom: 1px solid #000 !important; border-radius: 0 !important; background: transparent !important; padding: 0 2px 0px 2px !important; line-height: 1 !important; } .smart-field-wrapper .field-value.no-underline { border-bottom: none !important; } diff --git a/工程分析/20260419_1822/实现方案.md b/工程分析/20260419_1822/实现方案.md new file mode 100644 index 0000000..3a37444 --- /dev/null +++ b/工程分析/20260419_1822/实现方案.md @@ -0,0 +1,58 @@ +# 实现方案 + +## 修改文件 1:`src/utils/print.ts` + +在 iframe 的 `