Compare commits
3 Commits
3a8f9f700e
...
bc9f30c502
| Author | SHA1 | Date |
|---|---|---|
|
|
bc9f30c502 | |
|
|
26351bd549 | |
|
|
617bc8d482 |
|
|
@ -13,8 +13,37 @@ import EgovPagingPaginationInfo from 'components/EgovPagingPaginationInfo';
|
|||
import styled from "styled-components";
|
||||
|
||||
const StyledDiv = styled.div`
|
||||
.board_btn_area {
|
||||
margin: 12px 0px;
|
||||
|
||||
.BRD008 {
|
||||
.head > span:nth-child(3) {
|
||||
width: 180px;
|
||||
}
|
||||
.result .list_item > div:nth-child(3) {
|
||||
width: 180px;
|
||||
}
|
||||
}
|
||||
|
||||
.board-bot {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
align-items: stretch;
|
||||
justify-content: center;
|
||||
|
||||
& > *:nth-child(1) {
|
||||
width: 16%;
|
||||
justify-content: left;
|
||||
}
|
||||
& > *:nth-child(2) {
|
||||
width: 68%;
|
||||
justify-content: center;
|
||||
}
|
||||
& > *:nth-child(3) {
|
||||
width: 16%;
|
||||
justify-content: right;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
|
@ -113,14 +142,6 @@ function PopUp(props) {
|
|||
<h1 className="tit_1">팝업 관리</h1>
|
||||
</div>
|
||||
|
||||
{/* <!-- 버튼영역 --> */}
|
||||
<div className="board_btn_area">
|
||||
<div className="right_col btn1">
|
||||
<Link to={URL.ADMIN__CONTENTS__POP_UP__CREATE} className="btn btn_blue_h46 w_100">팝업 추가</Link>
|
||||
</div>
|
||||
</div>
|
||||
{/* <!--// 버튼영역 --> */}
|
||||
|
||||
{/* <!-- 게시판목록 --> */}
|
||||
<div className="board_list BRD008">
|
||||
<div className="head">
|
||||
|
|
@ -136,7 +157,7 @@ function PopUp(props) {
|
|||
}
|
||||
{listPopup.map((it)=>(
|
||||
<div className='list_item' key={it.seq}>
|
||||
<div>{it.seq}</div>
|
||||
<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>{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>
|
||||
|
|
@ -146,13 +167,24 @@ function PopUp(props) {
|
|||
</div>
|
||||
{/* <!--// 게시판목록 --> */}
|
||||
|
||||
<div className="board_bot">
|
||||
|
||||
|
||||
|
||||
|
||||
{/* <!-- Paging --> */}
|
||||
<div className="board-bot">
|
||||
<div></div>
|
||||
<EgovPagingPaginationInfo pagination={paginationInfo} setPaginationInfo={setPaginationInfo} moveToPage={passedPage => {
|
||||
getList({ ...searchCondition, pageIndex: passedPage })
|
||||
}} />
|
||||
{/* <!--/ Paging --> */}
|
||||
<div className="right_col btn1">
|
||||
<Link to={URL.ADMIN__CONTENTS__POP_UP__CREATE} className="btn btn_blue_h46 w_100">등록</Link>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/* <!--/ Paging --> */}
|
||||
|
||||
|
||||
</StyledDiv>
|
||||
{/* <!--// 본문 --> */}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,8 +13,36 @@ import EgovPagingPaginationInfo from 'components/EgovPagingPaginationInfo';
|
|||
import styled from "styled-components";
|
||||
|
||||
const StyledDiv = styled.div`
|
||||
.board_btn_area {
|
||||
margin: 12px 0px;
|
||||
.BRD008 {
|
||||
.head > span:nth-child(3) {
|
||||
width: 200px;
|
||||
}
|
||||
.result .list_item > div:nth-child(3) {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.board-bot {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
align-items: stretch;
|
||||
justify-content: center;
|
||||
|
||||
& > *:nth-child(1) {
|
||||
width: 16%;
|
||||
justify-content: left;
|
||||
}
|
||||
& > *:nth-child(2) {
|
||||
width: 68%;
|
||||
justify-content: center;
|
||||
}
|
||||
& > *:nth-child(3) {
|
||||
width: 16%;
|
||||
justify-content: right;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
|
@ -111,13 +139,9 @@ function StandardResearch(props) {
|
|||
<div className="top_tit">
|
||||
<h1 className="tit_1">건설기준연구 관리</h1>
|
||||
</div>
|
||||
{/* <!-- 버튼영역 --> */}
|
||||
<div className="board_btn_area">
|
||||
<div className="right_col btn1">
|
||||
<Link to={URL.ADMIN__CONTENTS__STANDARDS_RESEARCH__CREATE} className="btn btn_blue_h46 w_100">글 작성</Link>
|
||||
</div>
|
||||
</div>
|
||||
{/* <!--// 버튼영역 --> */}
|
||||
|
||||
|
||||
|
||||
|
||||
{/* <!-- 게시판목록 --> */}
|
||||
<div className="board_list BRD008">
|
||||
|
|
@ -134,7 +158,7 @@ function StandardResearch(props) {
|
|||
}
|
||||
{list.map((it)=>(
|
||||
<div className='list_item' key={it.id}>
|
||||
<div>{it.id}</div>
|
||||
<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>{it.researchStartDate} ~ {it.researchEndDate}</div>
|
||||
<div>{it.director}</div>
|
||||
|
|
@ -144,13 +168,27 @@ function StandardResearch(props) {
|
|||
</div>
|
||||
{/* <!--// 게시판목록 --> */}
|
||||
|
||||
<div className="board_bot">
|
||||
|
||||
|
||||
|
||||
|
||||
{/* <!-- Paging --> */}
|
||||
<div className="board-bot">
|
||||
<div></div>
|
||||
<EgovPagingPaginationInfo pagination={paginationInfo} setPaginationInfo={setPaginationInfo} moveToPage={passedPage => {
|
||||
getList({ ...searchCondition, pageIndex: passedPage })
|
||||
}} />
|
||||
{/* <!--/ Paging --> */}
|
||||
<div className="right_col btn1">
|
||||
<Link to={URL.ADMIN__CONTENTS__STANDARDS_RESEARCH__CREATE} className="btn btn_blue_h46 w_100">등록</Link>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/* <!--/ Paging --> */}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</StyledDiv>
|
||||
{/* <!--// 본문 --> */}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import java.time.format.DateTimeFormatter;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service("popUpApiService")
|
||||
|
|
@ -48,11 +49,13 @@ public class PopUpApiServiceImpl extends EgovAbstractServiceImpl implements PopU
|
|||
|
||||
|
||||
Long totalRecordCount = tnPopupMngRepositoryWithoutPopupContents.count();
|
||||
AtomicInteger index = new AtomicInteger();
|
||||
//List<Map<String, Object>> listPopup = tnPopupMngRepositoryWithoutPopupContents.findAll(Sort.by(Sort.Direction.DESC, "popupSeq"))
|
||||
List<Map<String, Object>> listPopup = tnPopupMngRepositoryWithoutPopupContents.findAll(pageable)
|
||||
.stream()
|
||||
.map(item -> {
|
||||
Map<String, Object> codeMap = new HashMap<>();
|
||||
codeMap.put("number", totalRecordCount - (long) pageable.getPageNumber() * pageable.getPageSize() - index.getAndIncrement());
|
||||
codeMap.put("seq", item.getPopupSeq());
|
||||
codeMap.put("popupTitle", item.getPopupTitle());
|
||||
codeMap.put("startDate", item.getPopupStartDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import java.time.format.DateTimeFormatter;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service("adminStandardResearchService")
|
||||
|
|
@ -55,10 +56,12 @@ public class AdminStandardResearchServiceImpl extends EgovAbstractServiceImpl im
|
|||
|
||||
|
||||
long totalRecordCount = tnResearchRepositoryLightweight.countByUseYn("Y");
|
||||
AtomicInteger index = new AtomicInteger();
|
||||
List<Map<String, Object>> list = tnResearchRepositoryLightweight.findByUseYn("Y", pageable)
|
||||
.stream()
|
||||
.map(item -> {
|
||||
Map<String, Object> codeMap = new HashMap<>();
|
||||
codeMap.put("number", totalRecordCount - (long) pageable.getPageNumber() * pageable.getPageSize() - index.getAndIncrement());
|
||||
codeMap.put("id", item.getRsSeq());
|
||||
codeMap.put("title", item.getRsTitle());
|
||||
codeMap.put("researchStartDate", item.getRsStartDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||
|
|
|
|||
Loading…
Reference in New Issue