건설기준코드리스트 검색조건 셀렉트박스 추가

cks
유민형 2023-11-22 16:36:28 +09:00
parent 6dce384e77
commit c421df4497
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; const bbsId = location.state?.bbsId || NOTICE_BBS_ID;
// eslint-disable-next-line no-unused-vars // 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 [masterBoard, setMasterBoard] = useState({});
const [paginationInfo, setPaginationInfo] = useState({}); const [paginationInfo, setPaginationInfo] = useState({});
@ -151,19 +151,6 @@ function StandardCodeList(props) {
{/* <!-- 검색조건 --> */} {/* <!-- 검색조건 --> */}
<div className="condition"> <div className="condition">
<ul> <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"> <li className="third_2 R">
<span className="f_search w_500"> <span className="f_search w_500">
<input type="text" name="" defaultValue={searchCondition.searchWrd} placeholder="코드명" ref={wrdRef} <input type="text" name="" defaultValue={searchCondition.searchWrd} placeholder="코드명" ref={wrdRef}
@ -178,8 +165,19 @@ function StandardCodeList(props) {
}}>조회</button> }}>조회</button>
</span> </span>
</li> </li>
<li> <li className="third_1 L">
<Link to={URL.INFORM_NOTICE_CREATE} state={{bbsId: bbsId}} className="btn btn_blue_h46 pd35">등록</Link> <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> </li>
</ul> </ul>
</div> </div>

View File

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

View File

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