Compare commits

...

2 Commits

3 changed files with 20 additions and 16 deletions

View File

@ -76,7 +76,7 @@ function StandardCodeList(props) {
const bbsId = location.state?.bbsId || NOTICE_BBS_ID;
// eslint-disable-next-line no-unused-vars
const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || { listCode: listCode, pageIndex: 1, searchCnd: '0', searchWrd: '' });// ||
const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || { listCode: listCode, pageIndex: 1, searchCnd: '', searchWrd: '' });// ||
const [masterBoard, setMasterBoard] = useState({});
const [paginationInfo, setPaginationInfo] = useState({});
@ -151,19 +151,6 @@ function StandardCodeList(props) {
{/* <!-- 검색조건 --> */}
<div className="condition">
<ul>
<li className="third_1 L">
<label className="f_select" htmlFor="sel1">
<select id="sel1" title="조건" defaultValue={searchCondition.searchCnd} ref={cndRef}
onChange={e => {
cndRef.current.value = e.target.value;
}}
>
<option value="0">제목</option>
<option value="1">내용</option>
<option value="2">작성자</option>
</select>
</label>
</li>
<li className="third_2 R">
<span className="f_search w_500">
<input type="text" name="" defaultValue={searchCondition.searchWrd} placeholder="코드명" ref={wrdRef}
@ -178,8 +165,19 @@ function StandardCodeList(props) {
}}>조회</button>
</span>
</li>
<li>
<Link to={URL.INFORM_NOTICE_CREATE} state={{bbsId: bbsId}} className="btn btn_blue_h46 pd35">등록</Link>
<li className="third_1 L">
<label className="f_select" htmlFor="sel1">
<select id="sel1" title="조건" defaultValue={searchCondition.searchCnd} ref={cndRef}
onChange={e => {
cndRef.current.value = e.target.value;
retrieveList({ ...searchCondition, pageIndex: 1, searchCnd: cndRef.current.value, searchWrd: wrdRef.current.value });
}}
>
<option value="10">전체</option>
<option value="1010">공통편</option>
<option value="1020">시설물편</option>
</select>
</label>
</li>
</ul>
</div>

View File

@ -109,6 +109,10 @@ public class StandardCodeController extends BaseController {
paginationInfo.setPageSize(propertyService.getInt("Globals.pageSize"));
resultMap.put("paginationInfo", paginationInfo);
System.out.println("@@@ searchCnd : " + tnDocumentInfo.getSearchCnd());
if (!tnDocumentInfo.getSearchCnd().isEmpty()) {
tnDocumentInfo.setListCode(tnDocumentInfo.getSearchCnd());
}
List<TnDocumentCodeList> tnDocumentCodeList = standardCodeService.selectStandardCodeList(tnDocumentInfo);
resultMap.put("resultList", tnDocumentCodeList);
Integer totCnt = tnDocumentCodeList.get(0).getContentcount();

View File

@ -107,4 +107,6 @@ public class TnDocumentInfo {
private String listCode;
@Transient
private String searchWrd;
@Transient
private String searchCnd;
}