ID: CHWY-AI-9921 close
1
信息输入 / Information Input
2
AI 分析 / AI Analysis
3
生成草稿 / Draft Generation
4
审查 / Review

description 文档详情 / Document Details

处理中 / Processing

AI 正在分析全球法律标准和跨境合规参数... / AI is analyzing global legal standards and cross-border compliance parameters...

check_circle 语义分析完成 / Semantic analysis complete
扫描 500+ 模板 / Scanning 500+ templates
实时预览 / Real-time Preview

草稿协议 / Draft Agreement

文档 ID / Document ID: GENERATED-BY-AI-AUTO-2024

This SERVICE AGREEMENT (the "Agreement") is entered into as of [DATE], by and between:

甲方 / Party A: [合同方输入 / Contracting Parties Input]

乙方 / Party B: Global Compliance Services Ltd.

1. 目的 / PURPOSE: 本协议的目的是为以下事项建立框架 / The purpose of this agreement is to establish the framework for [目的输入... / Purpose Input...]

2. 关键条款 / KEY TERMS: 双方同意基于国际贸易协议的以下条件 / Both parties agree to the following conditions based on international trade protocols. [关键条款输入将在此实时显示... / Key Terms Input will appear here in real-time as you type...]

3. 司法管辖区 / JURISDICTION: 本协议应受新加坡法律管辖并按其解释 / This agreement shall be governed by and construed in accordance with the laws of Singapore, without regard to its conflict of law principles.

4. 保密性 / CONFIDENTIALITY: 各方应维护另一方披露的所有标记为保密或根据信息性质和披露情况应合理理解为保密的信息的保密性 / Each Party shall maintain the confidentiality of all information disclosed by the other Party that is marked as confidential or that should reasonably be understood to be confidential given the nature of the information and the circumstances of disclosure.

授权签名 / Authorized Signature

打印姓名和职位 / Print Name & Title

授权签名 / Authorized Signature

打印姓名和职位 / Print Name & Title

`; // 创建Blob对象 const blob = new Blob(['\ufeff', htmlContent], { type: 'application/msword' }); const url = URL.createObjectURL(blob); // 创建下载链接 const link = document.createElement('a'); const docId = currentDocumentData ? currentDocumentData.docId.replace(/[^a-zA-Z0-9]/g, '_') : 'DOCUMENT_' + new Date().getTime(); link.href = url; link.download = `法律文档_${docId}.doc`; document.body.appendChild(link); link.click(); document.body.removeChild(link); URL.revokeObjectURL(url); } // 下载PDF文档函数 function downloadPdfDocument() { const previewContent = previewSection.querySelector('.max-w-2xl.mx-auto'); if (!previewContent) return; // 显示加载提示 const originalText = downloadPdfBtn.innerHTML; downloadPdfBtn.innerHTML = 'sync'; downloadPdfBtn.disabled = true; // 使用html2canvas将内容转换为图片,然后使用jsPDF生成PDF html2canvas(previewContent, { scale: 2, useCORS: true, logging: false, backgroundColor: '#ffffff' }).then(canvas => { const imgData = canvas.toDataURL('image/png'); const { jsPDF } = window.jspdf; const pdf = new jsPDF('p', 'mm', 'a4'); const imgWidth = 210; // A4 width in mm const pageHeight = 297; // A4 height in mm const imgHeight = (canvas.height * imgWidth) / canvas.width; let heightLeft = imgHeight; let position = 0; pdf.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight); heightLeft -= pageHeight; while (heightLeft >= 0) { position = heightLeft - imgHeight; pdf.addPage(); pdf.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight); heightLeft -= pageHeight; } const docId = currentDocumentData ? currentDocumentData.docId.replace(/[^a-zA-Z0-9]/g, '_') : 'DOCUMENT_' + new Date().getTime(); pdf.save(`法律文档_${docId}.pdf`); // 恢复按钮 downloadPdfBtn.innerHTML = originalText; downloadPdfBtn.disabled = false; }).catch(error => { console.error('PDF生成失败:', error); alert('PDF生成失败,请重试 / PDF generation failed, please try again'); downloadPdfBtn.innerHTML = originalText; downloadPdfBtn.disabled = false; }); } // 更新预览区域 function updatePreview(content) { const previewContent = previewSection.querySelector('.max-w-2xl.mx-auto'); if (previewContent) { previewContent.innerHTML = content; // 启用下载按钮 if (downloadWordBtn) downloadWordBtn.disabled = false; if (downloadPdfBtn) downloadPdfBtn.disabled = false; } } });