diff --git a/src/views/biz/admin/judge/JudgeDataDetailForm.jsx b/src/views/biz/admin/judge/JudgeDataDetailForm.jsx index 0a50791..e268014 100644 --- a/src/views/biz/admin/judge/JudgeDataDetailForm.jsx +++ b/src/views/biz/admin/judge/JudgeDataDetailForm.jsx @@ -35,18 +35,16 @@ const ModifyJudgeDataForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav } }; - const viewImg = async (methodName) => { - // judgeFileDownload( + const viewImg = async (methodName, labelName, fileName) => { const res = await judgeImgDownload({ scDatagb: rowData.scDatagb, scCode: rowData.scCode, methodName }); - console.log(res); - setChildTitle('ddd'); + setChildTitle(`${labelName} - ${fileName}`); setChildOpen(true); - setImgUrl(res); - setImgName('dddd'); + setImgUrl(URL.createObjectURL(res)); + setImgName(fileName); }; return ( diff --git a/src/views/cmm/CmmImgViewModal.jsx b/src/views/cmm/CmmImgViewModal.jsx index 8559b45..35dc34e 100644 --- a/src/views/cmm/CmmImgViewModal.jsx +++ b/src/views/cmm/CmmImgViewModal.jsx @@ -10,8 +10,8 @@ const style = { top: '50%', left: '50%', transform: 'translate(-50%, -50%)', - width: 1050, - minHeight: 500, + width: 1000, + minHeight: 800, bgcolor: 'background.paper', border: '2px solid #000', boxShadow: 24, @@ -53,7 +53,7 @@ CmmImgViewModal.propTypes = { open: PropTypes.bool, setOpen: PropTypes.func, title: PropTypes.string, - imgUrl: PropTypes.object, + imgUrl: PropTypes.string, imgName: PropTypes.string }; diff --git a/src/views/cmm/file-ctl/FileForm.jsx b/src/views/cmm/file-ctl/FileForm.jsx index 33fd2cc..13f1792 100644 --- a/src/views/cmm/file-ctl/FileForm.jsx +++ b/src/views/cmm/file-ctl/FileForm.jsx @@ -6,7 +6,7 @@ const FileForm = ({ isDownload = false, isDisabled = false, labelName, - selectedFile, + selectedFile = '', handleChangeFile, handleFileDownload = () => {}, alert diff --git a/src/views/cmm/file-ctl/ImageFileViewForm.jsx b/src/views/cmm/file-ctl/ImageFileViewForm.jsx index 2965a1a..4e71e2e 100644 --- a/src/views/cmm/file-ctl/ImageFileViewForm.jsx +++ b/src/views/cmm/file-ctl/ImageFileViewForm.jsx @@ -1,5 +1,5 @@ import { InputAdornment, TextField } from '@mui/material'; -import { FileDownload } from '@mui/icons-material'; +import { FileDownload, Info } from '@mui/icons-material'; import PropTypes from 'prop-types'; const ImageFileViewForm = ({ labelName = '', fileName, methodName = '', handleViewImg = () => {} }) => ( @@ -11,12 +11,12 @@ const ImageFileViewForm = ({ labelName = '', fileName, methodName = '', handleVi fullWidth label={labelName} value={fileName} - onClick={() => handleViewImg(methodName)} + onClick={() => handleViewImg(methodName, labelName, fileName)} InputProps={{ display: 'none', endAdornment: ( - + ) }}