Commit c13eb85a52708e58e431254e9d6e2efdd1eff8f1

Authored by Min
1 parent 74bf4ff2

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

2.处理预览PFD,使用iframe方式
src/components/Common/CommonNewBill.js
... ... @@ -2021,7 +2021,7 @@ const BillComponent = Form.create({
2021 2021 onChange: props.onTitleChange.bind(this, "slave"),
2022 2022 dragTableHeight:344
2023 2023 },
2024   - noVlistTable: bPagination,
  2024 + noVlistTable: sModelsId === '192116810113315220489243410' ? false : bPagination,
2025 2025 onDelRow: props.onDelRow,
2026 2026 onDelRowSelect: props.onDelRowSelect,
2027 2027 data: bSingleTree && commonUtils.isNotEmptyArr(slaveData) ? commonUtils.genTreeByArr(slaveData, "sId", "sFatherSlaveId") : slaveData,
... ...
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()
... ... @@ -34,16 +34,27 @@ const OfficePreview = props => {
34 34 <Modal title={title} visible={officePreviewVisible} width="100%" height="100%" style={{ top: 0 }} footer={null} onCancel={onCancel}>
35 35 <div
36 36 style={{
37   - width: "100%",
38   - height: "calc(100vh - 67px)",
39   - overflow: "auto",
  37 + width: '100%',
  38 + height: 'calc(100vh - 67px)',
  39 + overflow: 'auto',
40 40 }}
41 41 >
42   - <div style={{ width: "100%", height: "100%" }} ref={officeRef}>
43   - {fileType === "PDF" && <PrintPdf style={{ height: "100%" }} previewUrl={fileUrl} />}
  42 + <div style={{ width: '100%', height: '100%' }} ref={officeRef}>
  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   - <div style={{ width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center", overflow: "hidden" }}>
46   - <video src={fileUrl} controls style={{ height: "100%" }} />
  49 + <div style={{
  50 + width: "100%",
  51 + height: "100%",
  52 + display: "flex",
  53 + alignItems: "center",
  54 + justifyContent: "center",
  55 + overflow: "hidden"
  56 + }}>
  57 + <video src={fileUrl} controls style={{ height: '100%' }} />
47 58 </div>
48 59 )}
49 60 </div>
... ...