From 4642e5d8206b479ba9efb4b0fffe6ea132150217 Mon Sep 17 00:00:00 2001 From: thkim Date: Tue, 19 Mar 2024 10:48:06 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=B2=A8=EB=B6=80=ED=8C=8C=EC=9D=BC=20-?= =?UTF-8?q?=20=EC=97=85=EB=A1=9C=EB=93=9C=20=ED=9B=84=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90=EC=84=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=EC=8B=9C=20=ED=98=84=ED=8C=8C=EC=9D=BC=20=EC=97=86?= =?UTF-8?q?=EC=96=B4=EC=A7=90=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EA=B1=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/file/AttachFile.jsx | 4 +- .../src/components/file/FileDragDrop.jsx | 4 +- .../components/progress/LoadingProgress.jsx | 53 +++++++++++++++++++ .../admin/contents/PopUp/PopupEditor.jsx | 20 +++---- 4 files changed, 67 insertions(+), 14 deletions(-) create mode 100644 egovframe-template-simple-react-contribution/src/components/progress/LoadingProgress.jsx diff --git a/egovframe-template-simple-react-contribution/src/components/file/AttachFile.jsx b/egovframe-template-simple-react-contribution/src/components/file/AttachFile.jsx index d9f4915..bd57628 100644 --- a/egovframe-template-simple-react-contribution/src/components/file/AttachFile.jsx +++ b/egovframe-template-simple-react-contribution/src/components/file/AttachFile.jsx @@ -67,7 +67,6 @@ function AttachFile(props) { //기존 server에 upload된 file인 props.serverFiles file들을 렌더링 초기에 넣어 놓기 useEffect(function () { - if( !props.serverFiles ) { return; @@ -79,7 +78,8 @@ function AttachFile(props) { props.serverFiles[idx].index=nNewIndex++; items.push( props.serverFiles[idx] ); } - setFileItem(items); + setFileItem(items); + props.setFiles(items); // eslint-disable-next-line react-hooks/exhaustive-deps }, [props.serverFiles]); diff --git a/egovframe-template-simple-react-contribution/src/components/file/FileDragDrop.jsx b/egovframe-template-simple-react-contribution/src/components/file/FileDragDrop.jsx index 8fc6842..66c9008 100644 --- a/egovframe-template-simple-react-contribution/src/components/file/FileDragDrop.jsx +++ b/egovframe-template-simple-react-contribution/src/components/file/FileDragDrop.jsx @@ -9,11 +9,9 @@ import { FileUploader } from "react-drag-drop-files"; */ function FileDragDrop({fileTypes, children, multiple, label, onDrop, handleChange, file, setFile, dropMessageStyle, name, maxSize, disabled}) { - const temp = 0; - return ( ({ + backDrop: { + backdropFilter: "blur(3px)", + backgroundColor:'rgba(0,0,30,0.4)' + }, +})); + +function SimpleDialog(props) { + + const { open } = props; + const classes = useStyles(); + + return ( + + + + + + + + ); +} + +SimpleDialog.propTypes = { + open: PropTypes.bool.isRequired, +}; + +export default function LoadingProgress({open, setOpen}) { + + + return ( +
+ +
+ ); +} \ No newline at end of file diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/contents/PopUp/PopupEditor.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/contents/PopUp/PopupEditor.jsx index 953f5a9..4917e2c 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/contents/PopUp/PopupEditor.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/contents/PopUp/PopupEditor.jsx @@ -5,6 +5,8 @@ import LinearProgress from '@mui/material/LinearProgress'; import AttachFile from "../../../../components/file/AttachFile"; import RichTextEditor from "../../../../components/editor/RichTextEditor"; import AlertDialogSlide from "../../../../components/alert/AlertDialogSlide"; +import LoadingProgress from "../../../../components/progress/LoadingProgress"; + import CODE from 'constants/code'; @@ -20,8 +22,7 @@ const StyledDiv = styled.div` .board_view2 { margin-bottom: 30px; dl.file-attach-wrapper dd { - padding: 0px; - + padding: 14px; .file_attach { width: 100%; @@ -183,12 +184,14 @@ function PopupEditor(props) { } const requestTask = (callbackParams) => { + setOpenLoadingProgress(true); EgovNet.requestFetch(callbackParams.requestUrl, requestOptions, (resp) => { + setOpenLoadingProgress(false); if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) { if (modeInfo.mode === CODE.MODE_MODIFY) { - alert("게시글이 수정 되었습니다."); + //alert("게시글이 수정 되었습니다."); } navigate({ pathname: URL.ADMIN__CONTENTS__POP_UP }); } else { @@ -295,12 +298,10 @@ function PopupEditor(props) { const [serverFiles, setServerFiles] = useState(); const [files, setFiles] = useState(); - /* - let files = null; - const setFiles = (myFiles) => { - files = myFiles; - }; - */ + + + + const [openLoadingProgress, setOpenLoadingProgress] = React.useState(false); const Location = React.memo(function Location() { @@ -427,6 +428,7 @@ function PopupEditor(props) { {/* */} + {/* */}