Commit a7528ad100a98c87a9fa9d1dda2399c6bd700b35

Authored by Min
1 parent da41b249

1.五彩:subBill子从表使用虚拟表格滚动

2.处理预览PFD,使用iframe方式
src/components/Common/OfficePreview/index.js
... ... @@ -15,7 +15,7 @@ const OfficePreview = props => {
15 15 .pop()
16 16 .split("_")
17 17 .pop();
18   - const fileUrl = `${commonConfig.file_host}file/download?savePathStr=${encodeURIComponent(officeFileUrl)}&sModelsId=100&token=${app.token}`;
  18 + const fileUrl = `${commonConfig.file_host}file/downloadView?savePathStr=${encodeURIComponent(officeFileUrl)}&sModelsId=100&token=${app.token}`;
19 19 const fileType = title
20 20 .split(".")
21 21 .pop()
... ... @@ -40,7 +40,11 @@ const OfficePreview = props => {
40 40 }}
41 41 >
42 42 <div style={{ width: "100%", height: "100%" }} ref={officeRef}>
43   - {fileType === "PDF" && <PrintPdf style={{ height: "100%" }} previewUrl={fileUrl} />}
  43 + {fileType === 'PDF' && (
  44 + <div className="pdfContainer" style={{ width: '100%', height: '100%' }}>
  45 + <iframe src={fileUrl} style={{ width: '100%', height: '100%' }} frameborder="0"></iframe>
  46 + </div>
  47 + )}
44 48 {['MP4', 'WEBM', 'OGG'].includes(fileType) && (
45 49 <div style={{ width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center", overflow: "hidden" }}>
46 50 <video src={fileUrl} controls style={{ height: "100%" }} />
... ...