Compare commits
No commits in common. "ce748c7ec1f4b16df6444b8d6cea4a18d6722893" and "3744b08f9a9300c2671fc805322a796080d3706b" have entirely different histories.
ce748c7ec1
...
3744b08f9a
|
|
@ -2,7 +2,6 @@ import * as React from 'react';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import { styled, ThemeProvider, createTheme } from '@mui/material/styles';
|
import { styled, ThemeProvider, createTheme } from '@mui/material/styles';
|
||||||
import List from '@mui/material/List';
|
import List from '@mui/material/List';
|
||||||
import ListItem from '@mui/material/ListItem';
|
|
||||||
import ListItemButton from '@mui/material/ListItemButton';
|
import ListItemButton from '@mui/material/ListItemButton';
|
||||||
import ListItemText from '@mui/material/ListItemText';
|
import ListItemText from '@mui/material/ListItemText';
|
||||||
import Paper from '@mui/material/Paper';
|
import Paper from '@mui/material/Paper';
|
||||||
|
|
@ -73,90 +72,6 @@ const data = [
|
||||||
codeName: '시설물편',
|
codeName: '시설물편',
|
||||||
depth: 3,
|
depth: 3,
|
||||||
children: [
|
children: [
|
||||||
{
|
|
||||||
codeTitle: "TEST 17 00 00",
|
|
||||||
codeName: 'test',
|
|
||||||
depth: 4,
|
|
||||||
children: [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
codeTitle: "TEST 17 00 00",
|
|
||||||
codeName: 'test',
|
|
||||||
depth: 4,
|
|
||||||
children: [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
codeTitle: "TEST 17 00 00",
|
|
||||||
codeName: 'test',
|
|
||||||
depth: 4,
|
|
||||||
children: [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
codeTitle: "TEST 17 00 00",
|
|
||||||
codeName: 'test',
|
|
||||||
depth: 4,
|
|
||||||
children: [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
codeTitle: "TEST 17 00 00",
|
|
||||||
codeName: 'test',
|
|
||||||
depth: 4,
|
|
||||||
children: [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
codeTitle: "TEST 17 00 00",
|
|
||||||
codeName: 'test',
|
|
||||||
depth: 4,
|
|
||||||
children: [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
codeTitle: "TEST 17 00 00",
|
|
||||||
codeName: 'test',
|
|
||||||
depth: 4,
|
|
||||||
children: [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
codeTitle: "TEST 17 00 00",
|
|
||||||
codeName: 'test',
|
|
||||||
depth: 4,
|
|
||||||
children: [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
codeTitle: "TEST 17 00 00",
|
|
||||||
codeName: 'test',
|
|
||||||
depth: 4,
|
|
||||||
children: [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
codeTitle: "TEST 17 00 00",
|
|
||||||
codeName: 'test',
|
|
||||||
depth: 4,
|
|
||||||
children: [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
codeTitle: "TEST 17 00 00",
|
|
||||||
codeName: 'test',
|
|
||||||
depth: 4,
|
|
||||||
children: [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
codeTitle: "TEST 17 00 00",
|
|
||||||
codeName: 'test',
|
|
||||||
depth: 4,
|
|
||||||
children: [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
@ -181,6 +96,7 @@ const FireNav = styled(List)({
|
||||||
'& .MuiListItemButton-root': {
|
'& .MuiListItemButton-root': {
|
||||||
paddingLeft: 0,
|
paddingLeft: 0,
|
||||||
paddingRight: 0,
|
paddingRight: 0,
|
||||||
|
background: '#fafafa',
|
||||||
},
|
},
|
||||||
'& .MuiListItemIcon-root': {
|
'& .MuiListItemIcon-root': {
|
||||||
minWidth: 0,
|
minWidth: 0,
|
||||||
|
|
@ -191,8 +107,20 @@ const FireNav = styled(List)({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
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() {
|
export default function ReferenceCodePopupDialogCotents() {
|
||||||
|
const [open, setOpen] = React.useState(true);
|
||||||
|
|
||||||
const [selectedValue, setSelectedValue] = React.useState('a');
|
const [selectedValue, setSelectedValue] = React.useState('a');
|
||||||
|
|
||||||
|
|
@ -221,17 +149,14 @@ export default function ReferenceCodePopupDialogCotents() {
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<Paper elevation={0} sx={{ maxWidth: 520 }}>
|
<Paper elevation={0} sx={{ maxWidth: 520 }}>
|
||||||
<FireNav
|
<FireNav component="nav" disablePadding>
|
||||||
sx={{ my: 0, }}
|
|
||||||
component="nav" disablePadding>
|
|
||||||
<ListItemButton component="a" href="#customized-list">
|
<ListItemButton component="a" href="#customized-list">
|
||||||
<ListItemText
|
<ListItemText
|
||||||
sx={{ my: 0 }}
|
sx={{ my: 0 }}
|
||||||
primary="문서번호 또는 코드명을 선택 하시면 하위 문서를 검색 하실 수 있습니다"
|
primary="문서번호 또는 코드명을 선택 하시면 하위 문서를 검색 하실 수 있습니다"
|
||||||
primaryTypographyProps={{
|
primaryTypographyProps={{
|
||||||
backgroundColor: '#ffffff',
|
backgroundColor: '#001e4f',
|
||||||
color: '#333333',
|
color: '#ffffff',
|
||||||
border: '1px solid #333333',
|
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
fontWeight: 'medium',
|
fontWeight: 'medium',
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
|
|
@ -242,30 +167,22 @@ export default function ReferenceCodePopupDialogCotents() {
|
||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
|
|
||||||
<List
|
<List
|
||||||
sx={{ width: '100%' }}
|
sx={{ width: '100%', bgcolor: 'background.paper' }}
|
||||||
component="nav"
|
component="nav"
|
||||||
aria-labelledby="nested-list-subheader"
|
aria-labelledby="nested-list-subheader"
|
||||||
subheader={
|
subheader={
|
||||||
<ListSubheader
|
<ListSubheader component="div" id="nested-list-subheader">
|
||||||
sx={{
|
|
||||||
background: '#ffffff',
|
|
||||||
color: '#222222',
|
|
||||||
border: '4px double #333333',
|
|
||||||
borderLeftWidth: '0px',
|
|
||||||
borderRightWidth: '0px',
|
|
||||||
borderBottomWidth: '1px',
|
|
||||||
}}
|
|
||||||
component="div" id="nested-list-subheader">
|
|
||||||
<ReferenceCodePopupDialogCotentsHeader />
|
<ReferenceCodePopupDialogCotentsHeader />
|
||||||
</ListSubheader>
|
</ListSubheader>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<ReferenceCodePopupDialogCotentsListItem
|
<ListItemButton>
|
||||||
data={data}
|
<ReferenceCodePopupDialogCotentsListItem
|
||||||
/>
|
data={data}
|
||||||
|
/>
|
||||||
|
</ListItemButton>
|
||||||
</List>
|
</List>
|
||||||
|
|
||||||
|
|
||||||
</FireNav>
|
</FireNav>
|
||||||
</Paper>
|
</Paper>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,9 @@ import { styled, } from '@mui/material/styles';
|
||||||
|
|
||||||
|
|
||||||
const ItemHeader = styled('div')(({ theme }) => ({
|
const ItemHeader = styled('div')(({ theme }) => ({
|
||||||
padding: '0px',
|
padding: theme.spacing(1),
|
||||||
borderRadius: '4px',
|
borderRadius: '4px',
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
lineHeight: '40px',
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export default function ReferenceCodePopupDialogCotentsHeader() {
|
export default function ReferenceCodePopupDialogCotentsHeader() {
|
||||||
|
|
@ -16,12 +15,10 @@ export default function ReferenceCodePopupDialogCotentsHeader() {
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: ' 16px',
|
|
||||||
display: 'grid',
|
display: 'grid',
|
||||||
gridAutoFlow: 'row',
|
gridAutoFlow: 'row',
|
||||||
gridTemplateColumns: 'auto 160px 90px',
|
gridTemplateColumns: 'repeat(3, 1fr)',
|
||||||
gap: 1,
|
gap: 1,
|
||||||
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ItemHeader>문서번호</ItemHeader>
|
<ItemHeader>문서번호</ItemHeader>
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,9 @@
|
||||||
import React, {useEffect} from 'react';
|
import * as React from 'react';
|
||||||
import List from '@mui/material/List';
|
import List from '@mui/material/List';
|
||||||
import ListItem from '@mui/material/ListItem';
|
import ListItem from '@mui/material/ListItem';
|
||||||
import ListItemButton from '@mui/material/ListItemButton';
|
import ListItemButton from '@mui/material/ListItemButton';
|
||||||
import Divider from '@mui/material/Divider';
|
import Divider from '@mui/material/Divider';
|
||||||
|
|
||||||
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
||||||
import AddIcon from '@mui/icons-material/Add';
|
|
||||||
import RemoveIcon from '@mui/icons-material/Remove';
|
|
||||||
import FolderOpenIcon from '@mui/icons-material/FolderOpen';
|
|
||||||
import InsertDriveFileOutlinedIcon from '@mui/icons-material/InsertDriveFileOutlined';
|
|
||||||
|
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import Collapse from '@mui/material/Collapse';
|
import Collapse from '@mui/material/Collapse';
|
||||||
|
|
||||||
|
|
@ -19,89 +13,90 @@ import { styled } from '@mui/material/styles';
|
||||||
|
|
||||||
|
|
||||||
const Item = styled('div')(({ theme }) => ({
|
const Item = styled('div')(({ theme }) => ({
|
||||||
padding: '0px',
|
padding: theme.spacing(1),
|
||||||
borderRadius: '4px',
|
borderRadius: '4px',
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const ItemComponent = (props) => {
|
const ItemComponent = (props) => {
|
||||||
const {item, index, openSelf} = props;
|
const {item, index} = props;
|
||||||
|
|
||||||
|
|
||||||
const [open, setOpen] = React.useState(false);
|
const [open, setOpen] = React.useState(false);
|
||||||
|
|
||||||
useEffect(function () {
|
|
||||||
if( openSelf === false ) {
|
|
||||||
setOpen(false);
|
|
||||||
}
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
}, [openSelf]);
|
|
||||||
|
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
setOpen(!open);
|
setOpen(!open);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Collapse in={openSelf} timeout="auto" unmountOnExit sx={{width: '100%'}}>
|
<ListItem disablePadding sx={{ width: '100%'}}>
|
||||||
<ListItem disablePadding sx={{ width: '100%'}}>
|
<List sx={{width: '100%'}}>
|
||||||
<List sx={{ paddingTop: '0px', paddingBottom: '0px', width: '100%'}}>
|
<ListItem disablePadding sx={{ width: '100%'}}>
|
||||||
<ListItem disablePadding sx={{ width: '100%'}}>
|
<ListItemButton onClick={handleClick} sx={{width: '100%'}}>
|
||||||
<ListItemButton onClick={handleClick} sx={{width: '100%'}}>
|
<Box
|
||||||
<Box
|
sx={{
|
||||||
sx={{
|
display: 'grid',
|
||||||
display: 'grid',
|
gridAutoFlow: 'row',
|
||||||
gridAutoFlow: 'row',
|
gridTemplateColumns: 'repeat(3, 1fr)',
|
||||||
gridTemplateColumns: 'auto 160px 90px',
|
gap: 1,
|
||||||
gap: 1,
|
width: '100%'
|
||||||
width: '100%'
|
}}
|
||||||
}}
|
>
|
||||||
>
|
<Item>{item.codeTitle}</Item>
|
||||||
<Item
|
<Item>{item.codeName}</Item>
|
||||||
sx={{paddingLeft: `${Number(Number(item.depth)-1) * 20}px`,}}
|
<Item sx={{textAlign: 'center'}}>
|
||||||
>
|
<button type="button" class="btn btn_blue_h31 px-1">선택</button>
|
||||||
{
|
</Item>
|
||||||
item.children && item.children.length > 0
|
</Box>
|
||||||
?
|
</ListItemButton>
|
||||||
<span>
|
</ListItem>
|
||||||
{
|
{
|
||||||
open
|
item.children &&
|
||||||
?
|
item.children.map(function(item, index) {
|
||||||
<RemoveIcon sx={{ color: '#777777', height: '30px;'}} />
|
//<div>item.codeTitle</div>
|
||||||
:
|
console.log('thkim 2024-03-21 11:29 %o', item);
|
||||||
<AddIcon sx={{ color: '#777777', height: '30px;'}} />
|
return (
|
||||||
}
|
<ItemComponent item={item} index={index} />
|
||||||
</span>
|
);
|
||||||
:
|
})
|
||||||
<span> <InsertDriveFileOutlinedIcon sx={{ color: '#777777', height: '30px;'}} /> </span>
|
}
|
||||||
}
|
</List>
|
||||||
{item.codeTitle}
|
</ListItem>
|
||||||
</Item>
|
);
|
||||||
<Item>{item.codeName}</Item>
|
};
|
||||||
<Item sx={{textAlign: 'center'}}>
|
|
||||||
<button type="button" class="btn btn_blue_h31 px-1">선택</button>
|
const ItemComponentChild = (props) => {
|
||||||
</Item>
|
const {open, item} = props;
|
||||||
</Box>
|
|
||||||
</ListItemButton>
|
return (
|
||||||
</ListItem>
|
<Collapse in={open} timeout="auto" unmountOnExit sx={{width: '100%'}}>
|
||||||
{
|
<List component="div" disablePadding sx={{width: '100%'}}>
|
||||||
item.children &&
|
<ListItemButton sx={{ pl: 4, width: '100%' }}>
|
||||||
item.children.map(function(item, index) {
|
<Box
|
||||||
return (
|
sx={{
|
||||||
<ItemComponent item={item} index={index} openSelf={open} />
|
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>
|
</List>
|
||||||
</ListItem>
|
</Collapse>
|
||||||
</Collapse>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export default function ReferenceCodePopupDialogCotentsListItem(props) {
|
export default function ReferenceCodePopupDialogCotentsListItem(props) {
|
||||||
const {data} = props;
|
const {codeTitle, codeName, data} = props;
|
||||||
const [selectedValue, setSelectedValue] = React.useState('a');
|
const [selectedValue, setSelectedValue] = React.useState('a');
|
||||||
|
|
||||||
const handleChange = (event) => {
|
const handleChange = (event) => {
|
||||||
|
|
@ -109,21 +104,19 @@ export default function ReferenceCodePopupDialogCotentsListItem(props) {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//data
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<List sx={{
|
<List sx={{width: '100%'}}>
|
||||||
paddingTop: '0px',
|
|
||||||
paddingBottom: '0px',
|
|
||||||
width: '100%',
|
|
||||||
border: '4px double #333333',
|
|
||||||
borderTopWidth: '0px',
|
|
||||||
borderLeftWidth: '0px',
|
|
||||||
borderRightWidth: '0px',
|
|
||||||
}}>
|
|
||||||
{
|
{
|
||||||
data &&
|
data &&
|
||||||
data.map(function(item, index) {
|
data.map(function(item, index) {
|
||||||
|
//<div>item.codeTitle</div>
|
||||||
|
console.log('thkim 2024-03-21 11:29 %o', item);
|
||||||
return (
|
return (
|
||||||
<ItemComponent item={item} index={index} openSelf={true} />
|
<ItemComponent item={item} index={index} />
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue