build: https 지원하도록 수정

thkim
thkim 2024-03-22 13:33:58 +09:00
parent 4642e5d820
commit f454a5900f
12 changed files with 500 additions and 23 deletions

View File

@ -41,8 +41,6 @@ SimpleDialog.propTypes = {
};
export default function LoadingProgress({open, setOpen}) {
return (
<div>
<SimpleDialog

View File

@ -1,4 +1,4 @@
export const SERVER_URL = "http://"+process.env.REACT_APP_EGOV_CONTEXT_URL; // REST API 서버 Domain URL
export const SERVER_URL = String(process.env.REACT_APP_EGOV_CONTEXT_URL).indexOf('http') !== -1 ? + process.env.REACT_APP_EGOV_CONTEXT_URL : "http://"+process.env.REACT_APP_EGOV_CONTEXT_URL; // REST API 서버 Domain URL
export const DEFAULT_BBS_ID = "BBSMSTR_AAAAAAAAAAAA"; // default = 공지사항 게시판 아이디
export const NOTICE_BBS_ID = "BBSMSTR_AAAAAAAAAAAA"; // 공지사항 게시판 아이디
export const GALLERY_BBS_ID = "BBSMSTR_BBBBBBBBBBBB"; // 갤러리 게시판 아이디

View File

@ -1,5 +1,6 @@
import React, { useState, useEffect } from 'react';
import { Link, useLocation, useNavigate } from 'react-router-dom';
import { Link, useLocation } from 'react-router-dom';
import LinearProgress from '@mui/material/LinearProgress';
import * as EgovNet from 'api/egovFetch';
@ -27,13 +28,13 @@ const StyledDiv = styled.div`
width: 300px;
}
&:nth-child(4) {
width: 120px;
width: 110px;
}
&:nth-child(5) {
width: 80px;
width: 70px;
}
&:nth-child(6) {
width: 70px;
width: 60px;
}
&:nth-child(7) {
width: 50px;
@ -60,13 +61,13 @@ const StyledDiv = styled.div`
width: 300px;
}
&:nth-child(4) {
width: 120px;
width: 110px;
}
&:nth-child(5) {
width: 80px;
width: 70px;
}
&:nth-child(6) {
width: 70px;
width: 60px;
}
&:nth-child(7) {
width: 50px;
@ -77,6 +78,18 @@ const StyledDiv = styled.div`
text-align: center;
}
}
.code-name {
color: #001574;
padding: 0px 0px 3px 0px;
border-bottom: 0px solid #e8e8e8;
&:hover {
border-bottom: 1px solid #001574;
}
font-weight: 500;
}
}
}
@ -108,7 +121,7 @@ function ProgressStatus(props) {
const location = useLocation();
const [listItem, setListItem] = useState([]);
const [listItem, setListItem] = useState();
const [paginationInfo, setPaginationInfo] = useState({});
const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || { pageIndex: 1, searchCnd: '0', searchWrd: '' });
@ -181,16 +194,21 @@ function ProgressStatus(props) {
<span>수정</span>
<span>삭제</span>
</div>
<div className="result">
{/* <!-- case : 데이터 없을때 --> */}
{listItem.length === 0 &&
{typeof listItem === 'undefined' &&
<p className="no_data" key="0"><LinearProgress /></p>
}
{listItem && listItem.length === 0 &&
<p className="no_data" key="0">검색된 결과가 없습니다.</p>
}
{listItem.map((it)=>(
}
{listItem && listItem.map((it)=>(
<div className='list_item' key={it.seq}>
<div>{it.number}</div>
<div>{it.drftTypeNm}</div>
<div>{it.categoryNm}<br /><Link to={URL.ADMIN__COMMITTEE__PROGRESS_STATUS__DETAIL} state={{drftSeq: it.seq}} className="home">{it.title}</Link></div>
<div>{it.categoryNm}<br /><Link to={URL.ADMIN__COMMITTEE__PROGRESS_STATUS__DETAIL} state={{drftSeq: it.seq}} className="code-name">{it.title}</Link></div>
<div>{it.orgNm}</div>
<div>진행단계표시</div>
<div>{it.regDate}</div>
@ -199,6 +217,8 @@ function ProgressStatus(props) {
</div>
))}
</div>
</div>
{/* <!--// 게시판목록 --> */}

View File

@ -8,6 +8,9 @@ import CODE from 'constants/code';
import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin';
import ReferenceCodePopupInput from './ReferenceCodePopupInput';
import styled from "styled-components";
import { makeStyles } from "@mui/styles";
@ -376,9 +379,9 @@ function ProgressStatusEdit(props) {
<dl>
<dt><label>기준코드</label><span className="req">필수</span></dt>
<dd>
<input className="f_input2 w_full" type="text" name="categoryId" title="기준코드" placeholder="여기를 눌러 기준코드를 선택하세요"
value={requestItems.categoryId}
onChange={(e) => setRequestItems({ ...requestItems, categoryId: e.target.value })}
<ReferenceCodePopupInput
requestItems={requestItems}
setRequestItems={setRequestItems}
/>
</dd>
</dl>

View File

@ -0,0 +1,65 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import Box from '@mui/material/Box';
import { Dialog, DialogContent, makeStyles, Theme, Typography } from "@material-ui/core";
import ReferenceCodePopupDialogCotents from './ReferenceCodePopupDialogCotents';
const useStyles = makeStyles((theme) => ({
backDrop: {
backdropFilter: "blur(3px)",
backgroundColor:'rgba(0,0,30,0.4)'
},
}));
function SimpleDialog(props) {
const classes = useStyles();
const { onClose, open } = props;
const handleClose = () => {
onClose();
};
return (
<Dialog
open={open}
onClose={handleClose}
disableEscapeKeyDown={false}
BackdropProps={{
classes: {
root: classes.backDrop,
},
}}
>
<DialogContent style={{ textAlign: "center", background: 'rgba(0,0,0,0)' }}>
<Box sx={{ display: 'flex', width: '100%', padding: '0px' }}>
<ReferenceCodePopupDialogCotents />
</Box>
</DialogContent>
</Dialog>
);
}
SimpleDialog.propTypes = {
onClose: PropTypes.func.isRequired,
open: PropTypes.bool.isRequired,
};
export default function ReferenceCodePopupDialog({open, setOpen}) {
const handleClose = () => {
setOpen(false);
};
return (
<div>
<SimpleDialog
open={open}
onClose={handleClose}
/>
</div>
);
}

View File

@ -0,0 +1,191 @@
import * as React from 'react';
import Box from '@mui/material/Box';
import { styled, ThemeProvider, createTheme } from '@mui/material/styles';
import List from '@mui/material/List';
import ListItemButton from '@mui/material/ListItemButton';
import ListItemText from '@mui/material/ListItemText';
import Paper from '@mui/material/Paper';
import ListSubheader from '@mui/material/ListSubheader';
import ReferenceCodePopupDialogCotentsHeader from './ReferenceCodePopupDialogCotentsHeader';
import ReferenceCodePopupDialogCotentsListItem from './ReferenceCodePopupDialogCotentsListItem';
const data = [
{
codeTitle: "KDS 10 00 00",
codeName: '설계기준',
depth: 1,
children: [
{
codeTitle: "KDS 10 10 00",
codeName: '공통편',
depth: 2,
children: [
{
codeTitle: "KDS 10 10 00",
codeName: '공통편',
depth: 3,
children: [
{
codeTitle: "KDS 10 00 00",
codeName: '공통 설계기준',
depth: 4,
children: [
]
},
{
codeTitle: "KDS 10 20 00",
codeName: '지반 설계 기준',
depth: 4,
children: [
]
},
{
codeTitle: "KDS 12 00 00",
codeName: '건설측량 설계기준',
depth: 4,
children: [
]
},
{
codeTitle: "KDS 14 00 00",
codeName: '구조 설계기준',
depth: 4,
children: [
]
},
{
codeTitle: "KDS 17 00 00",
codeName: '내진 설계기준',
depth: 4,
children: [
]
},
]
},
{
codeTitle: "KDS 10 20 00",
codeName: '시설물편',
depth: 3,
children: [
]
},
]
},
{
codeTitle: "KDS 10 20 00",
codeName: '시설물편',
depth: 2,
children: [
]
},
]
},
{ codeTitle: "KCS 20 00 00", codeName: '표준시방서', depth: 1, },
{ codeTitle: "SMCS 40 00 00", codeName: '서울시 전문시방서', depth: 1, },
{ codeTitle: "EXCS 50 00 00", codeName: '고속도로공사 전문시방서', depth: 1, },
{ codeTitle: "KRCCS 60 00 00", codeName: '농업생산기반시설 전문시방서', depth: 1, },
];
const FireNav = styled(List)({
'& .MuiListItemButton-root': {
paddingLeft: 0,
paddingRight: 0,
background: '#fafafa',
},
'& .MuiListItemIcon-root': {
minWidth: 0,
marginRight: 16,
},
'& .MuiSvgIcon-root': {
fontSize: 20,
},
});
const ItemHeader = styled('div')(({ theme }) => ({
padding: theme.spacing(1),
borderRadius: '4px',
textAlign: 'center',
}));
const Item = styled('div')(({ theme }) => ({
padding: theme.spacing(1),
borderRadius: '4px',
textAlign: 'center',
}));
export default function ReferenceCodePopupDialogCotents() {
const [open, setOpen] = React.useState(true);
const [selectedValue, setSelectedValue] = React.useState('a');
const handleChange = (event) => {
setSelectedValue(event.target.value);
};
return (
<Box sx={{ display: 'flex' }}>
<ThemeProvider
theme={createTheme({
components: {
MuiListItemButton: {
defaultProps: {
disableTouchRipple: true,
},
},
},
palette: {
mode: 'dark',
primary: { main: 'rgb(102, 157, 246)' },
background: { paper: 'rgb(5, 30, 52)' },
},
})}
>
<Paper elevation={0} sx={{ maxWidth: 520 }}>
<FireNav component="nav" disablePadding>
<ListItemButton component="a" href="#customized-list">
<ListItemText
sx={{ my: 0 }}
primary="문서번호 또는 코드명을 선택 하시면 하위 문서를 검색 하실 수 있습니다"
primaryTypographyProps={{
backgroundColor: '#001e4f',
color: '#ffffff',
fontSize: 15,
fontWeight: 'medium',
letterSpacing: 0,
padding: '10px',
borderRadius: '6px',
}}
/>
</ListItemButton>
<List
sx={{ width: '100%', bgcolor: 'background.paper' }}
component="nav"
aria-labelledby="nested-list-subheader"
subheader={
<ListSubheader component="div" id="nested-list-subheader">
<ReferenceCodePopupDialogCotentsHeader />
</ListSubheader>
}
>
<ListItemButton>
<ReferenceCodePopupDialogCotentsListItem
data={data}
/>
</ListItemButton>
</List>
</FireNav>
</Paper>
</ThemeProvider>
</Box>
);
}

View File

@ -0,0 +1,29 @@
import * as React from 'react';
import Box from '@mui/material/Box';
import { styled, } from '@mui/material/styles';
const ItemHeader = styled('div')(({ theme }) => ({
padding: theme.spacing(1),
borderRadius: '4px',
textAlign: 'left',
}));
export default function ReferenceCodePopupDialogCotentsHeader() {
return (
<Box
sx={{
display: 'grid',
gridAutoFlow: 'row',
gridTemplateColumns: 'repeat(3, 1fr)',
gap: 1,
}}
>
<ItemHeader>문서번호</ItemHeader>
<ItemHeader>코드명</ItemHeader>
<ItemHeader sx={{textAlign: 'center'}}>선택</ItemHeader>
</Box>
);
}

View File

@ -0,0 +1,125 @@
import * as React from 'react';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import ListItemButton from '@mui/material/ListItemButton';
import Divider from '@mui/material/Divider';
import Box from '@mui/material/Box';
import Collapse from '@mui/material/Collapse';
import { styled } from '@mui/material/styles';
const Item = styled('div')(({ theme }) => ({
padding: theme.spacing(1),
borderRadius: '4px',
textAlign: 'left',
}));
const ItemComponent = (props) => {
const {item, index} = props;
const [open, setOpen] = React.useState(false);
const handleClick = () => {
setOpen(!open);
};
return (
<ListItem disablePadding sx={{ width: '100%'}}>
<List sx={{width: '100%'}}>
<ListItem disablePadding sx={{ width: '100%'}}>
<ListItemButton onClick={handleClick} sx={{width: '100%'}}>
<Box
sx={{
display: 'grid',
gridAutoFlow: 'row',
gridTemplateColumns: 'repeat(3, 1fr)',
gap: 1,
width: '100%'
}}
>
<Item>{item.codeTitle}</Item>
<Item>{item.codeName}</Item>
<Item sx={{textAlign: 'center'}}>
<button type="button" class="btn btn_blue_h31 px-1">선택</button>
</Item>
</Box>
</ListItemButton>
</ListItem>
{
item.children &&
item.children.map(function(item, index) {
//<div>item.codeTitle</div>
console.log('thkim 2024-03-21 11:29 %o', item);
return (
<ItemComponent item={item} index={index} />
);
})
}
</List>
</ListItem>
);
};
const ItemComponentChild = (props) => {
const {open, item} = props;
return (
<Collapse in={open} timeout="auto" unmountOnExit sx={{width: '100%'}}>
<List component="div" disablePadding sx={{width: '100%'}}>
<ListItemButton sx={{ pl: 4, width: '100%' }}>
<Box
sx={{
display: 'grid',
gridAutoFlow: 'row',
gridTemplateColumns: 'repeat(3, 1fr)',
gap: 1,
width: '100%'
}}
>
<Item>{item.codeTitle}</Item>
<Item>{item.codeName}</Item>
<Item sx={{textAlign: 'center'}}>
<button type="button" class="btn btn_blue_h31 px-1">선택</button>
</Item>
</Box>
</ListItemButton>
</List>
</Collapse>
);
};
export default function ReferenceCodePopupDialogCotentsListItem(props) {
const {codeTitle, codeName, data} = props;
const [selectedValue, setSelectedValue] = React.useState('a');
const handleChange = (event) => {
setSelectedValue(event.target.value);
};
//data
return (
<List sx={{width: '100%'}}>
{
data &&
data.map(function(item, index) {
//<div>item.codeTitle</div>
console.log('thkim 2024-03-21 11:29 %o', item);
return (
<ItemComponent item={item} index={index} />
);
})
}
</List>
);
}

View File

@ -0,0 +1,34 @@
import React, { useState, useEffect } from 'react';
import ReferenceCodePopupDialog from './ReferenceCodePopupDialog'
import styled from "styled-components";
const StyledDiv = styled.div`
input {
background: #fafafa;
cursor: pointer;
}
`;
function ReferenceCodePopupInput(props) {
const {requestItems,setRequestItems} = props;
const [open, setOpen] = useState(false);
return (
<StyledDiv>
<input className="f_input2 w_full" type="text" name="categoryId" title="기준코드 선택" placeholder="여기를 눌러 기준코드를 선택하세요"
value={requestItems.categoryId}
onChange={(e) => setRequestItems({ ...requestItems, categoryId: e.target.value })}
onClick={(e) => {
setOpen(true);
}}
/>
<ReferenceCodePopupDialog open={open} setOpen={setOpen}/>
</StyledDiv>
);
}
export default ReferenceCodePopupInput;

View File

@ -19,9 +19,17 @@ const StyledDiv = styled.div`
.head > span:nth-child(3) {
width: 180px;
}
.result .list_item > div:nth-child(3) {
width: 180px;
.result .list_item {
& > div {
&:nth-child(3) {
width: 180px;
}
}
.title {
color: #001574;
}
}
}
.board-bot {
@ -162,7 +170,7 @@ function PopUp(props) {
{listPopup && listPopup.map((it)=>(
<div className='list_item' key={it.seq}>
<div>{it.number}</div>
<div className="al"><Link to={URL.ADMIN__CONTENTS__POP_UP__MODIFY} state={{popupId: it.seq} } key={it.seq}>{it.popupTitle}</Link></div>
<div className="al"><Link to={URL.ADMIN__CONTENTS__POP_UP__MODIFY} state={{popupId: it.seq} } key={it.seq} className='title'>{it.popupTitle}</Link></div>
<div>{it.startDate} ~ {it.endDate}</div>
<div>{it.useYn === 'Y' ? <Switch {...label} key={it.seq} onChange={(e) => onChangeActivationSwitch(e, it.seq)} defaultChecked /> : <Switch key={it.seq} onChange={(e) => onChangeActivationSwitch(e, it.seq)} {...label} />}</div>
</div>

View File

@ -31,6 +31,10 @@ const StyledDiv = styled.div`
width: 200px;
}
}
.title {
color: #001574;
}
}
@ -176,7 +180,7 @@ function StandardResearch(props) {
{list && list.map((it)=>(
<div className='list_item' key={it.id}>
<div>{it.number}</div>
<div className="al"><Link to={URL.ADMIN__CONTENTS__STANDARDS_RESEARCH__MODIFY} state={{rsId: it.id} } key={it.id}>{it.title}</Link></div>
<div className="al"><Link to={URL.ADMIN__CONTENTS__STANDARDS_RESEARCH__MODIFY} state={{rsId: it.id} } key={it.id} className='title' >{it.title}</Link></div>
<div>{it.researchStartDate} ~ {it.researchEndDate}</div>
<div>{it.director}</div>
</div>

View File

@ -1,6 +1,6 @@
# Access-Control-Allow-Origin
Globals.Allow.Origin = http://118.219.150.34:50680/
Globals.Allow.Origin = https://back.dbnt.co.kr
server.port=50688