xjj 2 năm trước cách đây
mục cha
commit
f2785ff9ef

+ 3 - 3
src/components/FileViewer/index.js

@@ -4,7 +4,7 @@ import { memo } from 'react';
 
 
 const FileViewerModal = ({ data, visible, onCancel, downloadFile }) => {
 const FileViewerModal = ({ data, visible, onCancel, downloadFile }) => {
   const type = data?.url?.split('.')[data?.url?.split('.').length - 1];
   const type = data?.url?.split('.')[data?.url?.split('.').length - 1];
-  console.log(data?.url, type);
+  console.log(data?.url, type, visible);
 
 
   return (
   return (
     <Modal
     <Modal
@@ -16,7 +16,7 @@ const FileViewerModal = ({ data, visible, onCancel, downloadFile }) => {
       onOk={onCancel}
       onOk={onCancel}
       bodyStyle={{ height: '680px', overflowY: 'hidden' }}
       bodyStyle={{ height: '680px', overflowY: 'hidden' }}
     >
     >
-      {data?.url && (
+      {/* {data?.url && (
         <FileViewer
         <FileViewer
           key={data?.name}
           key={data?.name}
           fileType={type}
           fileType={type}
@@ -30,7 +30,7 @@ const FileViewerModal = ({ data, visible, onCancel, downloadFile }) => {
             </div>
             </div>
           )}
           )}
         />
         />
-      )}
+      )} */}
     </Modal>
     </Modal>
   );
   );
 };
 };

+ 1 - 3
src/pages/Detail/FormAndFilesNode.js

@@ -61,9 +61,7 @@ const FormAndFilesNode = ({ title, formData, excelFileData, loading, downloadFil
           style={{ marginLeft: 10 }}
           style={{ marginLeft: 10 }}
           onClick={() => {
           onClick={() => {
             setExcelFileVisible(true);
             setExcelFileVisible(true);
-            setTimeout(() => {
-              setExportData(record);
-            }, 1500);
+            setExportData(record);
           }}
           }}
         >
         >
           预览
           预览