feat: 팝업 페이지 이동 모듈화 반영

main
minuk926 2 years ago
parent 2621be2937
commit e6e1321022

@ -208,3 +208,19 @@ $("#btnClose").on('click', () => {
}); });
``` ```
## JSON Object ModelAndView에서 처리
```js
// ModelAndView return
gridInfo={"next":null,"perPage":15,"page":1,"totalCount":15,"curRowData":{"regltSeCode":"01","extrlRegltCntcId":"000000001051"},"curRowPos":1,"curGridDataPos":0,"curGridDatas":[{"regltSeCode":"01","extrlRegltCntcId":"000000001051"},{"regltSeCode":"01","extrlRegltCntcId":"000000001052"},{"regltSeCode":"01","extrlRegltCntcId":"000000001065"}]}
// jstl사용시 보안상의 이유로 " 문자를 " 치환
// 아래와 같이 처리
let gridInfo = '<c:out value="${gridInfo}"/>'; // string으로
gridInfo = gridInfo.replace(/&#034;/g, '"');
gridInfo = JSON.parse(gridInfo);
// escapeXml = "false" 사용 - xss 보안상 문제 발생
let gridInfo = <c:out value="${gridInfo}" escapeXml = "false"/>; //객체이므로 "" 미사용
let gridInfo = ${gridInfo};
```

@ -11,7 +11,7 @@ import kr.xit.fims.biz.ec.model.CctvCrackdownDTO;
@Mapper @Mapper
public interface IEcCctvCrackdownMapper { public interface IEcCctvCrackdownMapper {
List<CctvCrackdownDTO.ExtrlRegltCntc> selectEcExtrlRegltCntcs(final Map<String, Object> paraMap, final RowBounds rowBounds); List<CctvCrackdownDTO.ExtrlRegltCntc> selectEcExtrlRegltCntcs(final Map<String, Object> paraMap, final RowBounds rowBounds);
CctvCrackdownDTO.ExtrlRegltCntc selectEcExtrlRegltCntc(final String extrlRegltCntcId); <T> CctvCrackdownDTO.ExtrlRegltCntc selectEcExtrlRegltCntc(final T t);
int insertEcExtrlRegltCntc(final CctvCrackdownDTO.ExtrlRegltCntc dto); int insertEcExtrlRegltCntc(final CctvCrackdownDTO.ExtrlRegltCntc dto);
void updateEcExtrlRegltCntc(final CctvCrackdownDTO.ExtrlRegltCntc dto); void updateEcExtrlRegltCntc(final CctvCrackdownDTO.ExtrlRegltCntc dto);

@ -70,8 +70,8 @@ public class EcCctvCrackdownService implements IEcCctvCrackdownService {
@Override @Override
@Transactional(readOnly = true) @Transactional(readOnly = true)
public CctvCrackdownDTO.ExtrlRegltCntc findExtrlRegltCntc(final String extrlRegltCntcId) { public <T> CctvCrackdownDTO.ExtrlRegltCntc findExtrlRegltCntc(final T t) {
return mapper.selectEcExtrlRegltCntc(extrlRegltCntcId); return mapper.selectEcExtrlRegltCntc(t);
} }
/** /**

@ -13,7 +13,7 @@ import kr.xit.framework.core.utils.XitCmmnUtil;
public interface IEcCctvCrackdownService { public interface IEcCctvCrackdownService {
List<CctvCrackdownDTO.ExtrlRegltCntc> findExtrlRegltCntcs(final Map<String, Object> paraMap, final RowBounds rowBounds); List<CctvCrackdownDTO.ExtrlRegltCntc> findExtrlRegltCntcs(final Map<String, Object> paraMap, final RowBounds rowBounds);
CctvCrackdownDTO.ExtrlRegltCntc findExtrlRegltCntc(final String extrlRegltCntcId); <T> CctvCrackdownDTO.ExtrlRegltCntc findExtrlRegltCntc(final T t);
void saveCctvCrackdownDatas(final CctvCrackdownDTO.Request dto); void saveCctvCrackdownDatas(final CctvCrackdownDTO.Request dto);
void saveBusCctvCrackdownDatas(final FolderReqDTO dto); void saveBusCctvCrackdownDatas(final FolderReqDTO dto);

@ -57,28 +57,38 @@ public class EcCctvCrackdownController {
} }
@RequestMapping(value = "/ecCctvCrackdownPopup") @RequestMapping(value = "/ecCctvCrackdownPopup")
public ModelAndView ecCctvCrackdownPopup(final String extrlRegltCntcId, final String regltSeCode){ public ModelAndView ecCctvCrackdownPopup(final CctvCrackdownDTO.Request dto){
ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"ec/ecCctvCrackdownPopup.popup"); ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"ec/ecCctvCrackdownPopup.popup");
String fileJobSeCode = FimsBizUtils.getFileJobSeCode(regltSeCode); mav.addObject("extrDTO", service.findExtrlRegltCntc(dto.getExtrlRegltCntcId()));
mav.addObject("extrlRegltCntcDTO", service
.findExtrlRegltCntc(extrlRegltCntcId));
mav.addObject("attchFiles", fileService.findFilesByJobSeCodeAndJobId( mav.addObject("attchFiles", fileService.findFilesByJobSeCodeAndJobId(
CmmFileDTO.FileMst.builder() CmmFileDTO.FileMst.builder()
.jobSeCode(fileJobSeCode) .jobSeCode(FimsBizUtils.getFileJobSeCode(dto.getRegltSeCode()))
.fileJobId(extrlRegltCntcId) .fileJobId(dto.getExtrlRegltCntcId())
.build())); .build()));
return mav; return mav;
} }
@RequestMapping(value = "/findBusCctvCrackdownFiles")
public ModelAndView findBusCctvCrackdownFiles(final String dirPath){
XitFileExplorerUtil explorer = new XitFileExplorerUtil(new DirectorySearch(dirPath)); @GetMapping(value = "/findExtrlRegltCntcs")
return ResultResponse.of( public ModelAndView findExtrlRegltCntcs(@RequestParam final Map<String,Object> paraMap) {
explorer.getList().stream() return ResultResponse.of(service.findExtrlRegltCntcs(paraMap, MybatisUtils.getPagingInfo(paraMap)));
.filter(m->"Y".equals(m.get("isFile"))) }
.collect(Collectors.toList())
); @RequestMapping(value = "/findExtrlRegltCntcAndAttchFiles")
public ModelAndView findExtrlRegltCntcAndAttchFiles(final CctvCrackdownDTO.Request dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
mav.addObject("extrDTO", service.findExtrlRegltCntc(dto));
mav.addObject("attchFiles", fileService.findFilesByJobSeCodeAndJobId(
CmmFileDTO.FileMst.builder()
.jobSeCode(FimsBizUtils.getFileJobSeCode(dto.getRegltSeCode()))
.fileJobId(dto.getExtrlRegltCntcId())
.build()));
return mav;
}
@RequestMapping(value = "/findExtrlRegltCntc")
public ModelAndView findExtrlRegltCntc(final CctvCrackdownDTO.Request dto) {
return ResultResponse.of("extrDTO", service.findExtrlRegltCntc(dto));
} }
@PostMapping(value = "/saveCctvCrackdownDatas") @PostMapping(value = "/saveCctvCrackdownDatas")
@ -99,11 +109,6 @@ public class EcCctvCrackdownController {
return mav; return mav;
} }
@GetMapping(value = "/findExtrlRegltCntcs")
public ModelAndView findExtrlRegltCntcs(@RequestParam final Map<String,Object> paraMap) {
return ResultResponse.of(service.findExtrlRegltCntcs(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@PostMapping("/modifyExtrlRegltCntc") @PostMapping("/modifyExtrlRegltCntc")
public ModelAndView modifyExtrlRegltCntc(final CctvCrackdownDTO.ExtrlRegltCntc dto) { public ModelAndView modifyExtrlRegltCntc(final CctvCrackdownDTO.ExtrlRegltCntc dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
@ -141,6 +146,17 @@ public class EcCctvCrackdownController {
return mav; return mav;
} }
@RequestMapping(value = "/findBusCctvCrackdownFiles")
public ModelAndView findBusCctvCrackdownFiles(final String dirPath){
XitFileExplorerUtil explorer = new XitFileExplorerUtil(new DirectorySearch(dirPath));
return ResultResponse.of(
explorer.getList().stream()
.filter(m->"Y".equals(m.get("isFile")))
.collect(Collectors.toList())
);
}
@RequestMapping("/findExtrlRegltCntcAttchFiles") @RequestMapping("/findExtrlRegltCntcAttchFiles")
public ModelAndView findExtrlRegltCntcAttchFiles(final String extrlRegltCntcId, final String regltSeCode) { public ModelAndView findExtrlRegltCntcAttchFiles(final String extrlRegltCntcId, final String regltSeCode) {
return ResultResponse.of( return ResultResponse.of(

@ -1,14 +1,16 @@
package kr.xit.framework.core.utils.json; package kr.xit.framework.core.utils.json;
import java.io.StringWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.joda.JodaModule; import com.fasterxml.jackson.datatype.joda.JodaModule;
import lombok.NoArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.StringWriter; import lombok.NoArgsConstructor;
@NoArgsConstructor @NoArgsConstructor
public class ConvertHelper{ public class ConvertHelper{
@ -40,7 +42,7 @@ public class ConvertHelper{
} }
} }
public static <T> Object objectToJson(String json, Class<T> clazz){ public static <T> T objectToJson(String json, Class<T> clazz){
try{ try{
OBJECT_MAPPER.registerModule(new JodaModule()); OBJECT_MAPPER.registerModule(new JodaModule());
return OBJECT_MAPPER.readValue(json, clazz); return OBJECT_MAPPER.readValue(json, clazz);

@ -120,7 +120,7 @@ Globals.Xit.Bbs.useAt = Y
# ############################################## # # ############################################## #
# //XitFramework \uC0AC\uC6A9\uC790 \uCEE4\uC2A4\uD140 \uD56D\uBAA9 # //XitFramework \uC0AC\uC6A9\uC790 \uCEE4\uC2A4\uD140 \uD56D\uBAA9
# ############################################## # # ############################################## #
debug.result.log.trace=false debug.result.log.trace=true
exception.log.trace=true exception.log.trace=true
# k byte # k byte

@ -52,8 +52,6 @@
let GRID = null; let GRID = null;
var callbackSearch = () => fnBiz.search(); var callbackSearch = () => fnBiz.search();
var pageNav = null; var pageNav = null;
//var unblockUI = () => $.unblockUI();
//var popup = null;
/* ******************************* /* *******************************
* Biz function * Biz function
@ -68,7 +66,6 @@
let popOption; let popOption;
switch (flag) { switch (flag) {
case "detail": case "detail":
<%--url = '<c:url value="/fims/biz/ec/ecCctvCrackdownPopup.do"/>'; --%>
url = fimsApiUrl.POPUP_CCTV_EC_EXTRL_REGLT_CNTC_INFO; url = fimsApiUrl.POPUP_CCTV_EC_EXTRL_REGLT_CNTC_INFO;
popOption = {width: 900, height:800}; popOption = {width: 900, height:800};
popTitle = "외부연계 데이타 상세"; popTitle = "외부연계 데이타 상세";
@ -92,21 +89,10 @@
popup = CmmPopup.open(url, params, popOption, popTitle); popup = CmmPopup.open(url, params, popOption, popTitle);
} }
,onClickGrid: function(props){ ,onClickGrid: function(props){
const {page, perPage, totalCount} = GRID.store.data.pageOptions; const gridDatas = GRID.store.data.rawData.map(d => {
// gridInfo = { return {extrlRegltCntcId: d.extrlRegltCntcId, regltSeCode: d.regltSeCode}
// curGridDatas: GRID.store.data.rawData })
// ,curRowData: GRID.store.data.rawData[props.rowKey] pageNav = new PageNavigation(GRID, gridDatas, props.rowKey);
// ,curRowPos: (page - 1) * perPage + GRID.store.data.rawData[props.rowKey].rowKey + 1
// ,curGridDataPos: GRID.store.data.rawData[props.rowKey].rowKey
// ,page
// ,perPage
// ,totalCount
// ,isNext: null
// }
// fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
pageNav = new PageNavigation(GRID, props);
fnBiz.pagePopup('detail', {extrlRegltCntcId: pageNav.gridInfo.curRowData.extrlRegltCntcId, regltSeCode: pageNav.gridInfo.curRowData.regltSeCode}); fnBiz.pagePopup('detail', {extrlRegltCntcId: pageNav.gridInfo.curRowData.extrlRegltCntcId, regltSeCode: pageNav.gridInfo.curRowData.regltSeCode});
} }
} }
@ -209,7 +195,6 @@
initialRequest: true, // 화면 load시 조회 안함 - default initialRequest: true, // 화면 load시 조회 안함 - default
api: { api: {
readData: { readData: {
<%--url: '<c:url value="/fims/biz/ec/findExtrlRegltCntcs.do"/>'--%>
url: fimsApiUrl.FIND_CCTV_EC_EXTRL_REGLT_CNTCS url: fimsApiUrl.FIND_CCTV_EC_EXTRL_REGLT_CNTCS
,serializer: (params) => fnAddPageInfo(document.frmSearch, params) ,serializer: (params) => fnAddPageInfo(document.frmSearch, params)
} }
@ -217,29 +202,15 @@
}; };
GRID = TuiGrid.of(gridOptions, gridDatasource, (res) => { GRID = TuiGrid.of(gridOptions, gridDatasource, (res) => {
const gridInfo = pageNav?.gridInfo;
// if(gridInfo !== null && gridInfo?.isNext !== 'undefinded' && gridInfo?.isNext !== null) { if(gridInfo && gridInfo?.pageMove) {
// GRID.resetData(res.data?.contents); const datas = res.data?.contents.map(d => {
// return {extrlRegltCntcId: d.extrlRegltCntcId, regltSeCode: d.regltSeCode}
// if(gridInfo.isNext){ });
// gridInfo.curRowPos = (gridInfo.page - 1) * gridInfo.perPage + 1; pageNav.resetGrid(res, datas, (pagiNavigation)=>{
// gridInfo.curGridDataPos = 0; pageNav = pagiNavigation;
// } else{ fnBiz.pagePopup('detail', pageNav.gridInfo.curRowData);
// gridInfo.curRowPos = gridInfo.page * gridInfo.perPage; })
// gridInfo.curGridDataPos = gridInfo.perPage - 1;
// }
// // grid page data position reset
// gridInfo.isNext = null;
// gridInfo.curGridDatas = GRID.store.data.rawData;
// gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
//
// fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
// }
// if(gridInfo?.isNext) gridInfo.isNext = null;
if(pageNav?.gridInfo?.curRowData) {
//loadPageNavigation(res, GRID, {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode})
pageNav.loadNavigation(res, {extrlRegltCntcId: pageNav.gridInfo.curRowData.extrlRegltCntcId, regltSeCode: pageNav.gridInfo.curRowData.regltSeCode})
} }
}); });
} }

@ -4,11 +4,12 @@
<%--rcvXmlDTO--%> <%--rcvXmlDTO--%>
<c:set var="files" value="${attchFiles}"/> <c:set var="files" value="${attchFiles}"/>
<c:set var="bizName" value="외부연계 데이타"/> <c:set var="bizName" value="외부연계 데이타"/>
<%--<c:set var="gridInfo" value="${gridInfo}"/>--%>
<div class="popup" style="min-width: 100px;"> <div class="popup" style="min-width: 100px;">
<div class="popup_inner" style="max-width: 900px;"> <div class="popup_inner" style="max-width: 900px;">
<p class="pop_title"> <p class="pop_title">
<c:out value="${bizName}"/>(<c:out value="${extrlRegltCntcDTO.extrlRegltCntcId}"/>) 상세 <c:out value="${bizName}"/>(<c:out value="${extrDTO.extrlRegltCntcId}"/>) 상세
</p> </p>
<div class="listBtn"> <div class="listBtn">
@ -22,14 +23,14 @@
</div> </div>
<form> <form>
<div class="popup_btn"> <div class="popup_btn">
<c:set var="isProcess" value="${empty extrlRegltCntcDTO.regltId}"/> <c:set var="isProcess" value="${empty extrDTO.regltId}"/>
<span class="flr" id="${extrlRegltCntcDTO.extrlRegltCntcId}" > <span class="flr" id="${extrDTO.extrlRegltCntcId}" >
<c:if test="${isProcess}"> <c:if test="${isProcess}">
<a href="#" class="btn blue" onclick="fnBiz.save('${extrlRegltCntcDTO.extrlRegltCntcId}')">저장</a> <a href="#" class="btn blue" onclick="fnBiz.save('${extrDTO.extrlRegltCntcId}')">저장</a>
<a href="#" class="btn red" onclick="fnBiz.remove('${extrlRegltCntcDTO.extrlRegltCntcId}')">삭제</a> <a href="#" class="btn red" onclick="fnBiz.remove('${extrDTO.extrlRegltCntcId}')">삭제</a>
<c:if test="${!empty extrlRegltCntcDTO.vhcleNo}"> <c:if test="${!empty extrDTO.vhcleNo}">
<a href="#" class="btn darkgray" onclick="fnBiz.reglt('${extrlRegltCntcDTO.extrlRegltCntcId}')">단속처리</a> <a href="#" class="btn darkgray" onclick="fnBiz.reglt('${extrDTO.extrlRegltCntcId}')">단속처리</a>
<a href="#" class="btn darkgray" onclick="fnBiz.erpp('${extrlRegltCntcDTO.extrlRegltCntcId}')">서손처리</a> <a href="#" class="btn darkgray" onclick="fnBiz.erpp('${extrDTO.extrlRegltCntcId}')">서손처리</a>
</c:if> </c:if>
</c:if> </c:if>
</span> </span>
@ -48,64 +49,64 @@
<tr> <tr>
<th>외부연계ID</th> <th>외부연계ID</th>
<td> <td>
<input type="text" name="extrlRegltCntcId" value='<c:out value="${extrlRegltCntcDTO.extrlRegltCntcId}"/>' readonly> <input type="text" name="extrlRegltCntcId" value='<c:out value="${extrDTO.extrlRegltCntcId}"/>' readonly>
</td> </td>
<th>차량번호</th> <th>차량번호</th>
<td> <td>
<input type="text" name="vhcleNo" value='<c:out value="${extrlRegltCntcDTO.vhcleNo}"/>' <c:if test="${!isProcess}">readonly</c:if>> <input type="text" name="vhcleNo" value='<c:out value="${extrDTO.vhcleNo}"/>' <c:if test="${!isProcess}">readonly</c:if>>
</td> </td>
<th>단속ID</th> <th>단속ID</th>
<td> <td>
<input type="text" name="cvplSe" value='<c:out value="${extrlRegltCntcDTO.regltId}"/>' readonly> <input type="text" name="regltId" value='<c:out value="${extrDTO.regltId}"/>' readonly>
</td> </td>
</tr> </tr>
<tr> <tr>
<th>시스템구분</th> <th>시스템구분</th>
<td> <td>
<code:select id="sysCode" name="sysCode" codeId="FIM001" defaultSelect="${extrlRegltCntcDTO.sysCode}" title="시스템코드" cls="selectBoxTotal" alt="시스템코드" disabled="true"/> <code:select id="sysCode" name="sysCode" codeId="FIM001" defaultSelect="${extrDTO.sysCode}" title="시스템코드" cls="selectBoxTotal" alt="시스템코드" disabled="true"/>
</td> </td>
<th>기관코드</th> <th>기관코드</th>
<td> <td>
<code:select id="insttCode" name="insttCode" codeId="XIT025" defaultSelect="${extrlRegltCntcDTO.insttCode}" title="기관코드" cls="selectBoxTotal" alt="기관코드" disabled="true"/> <code:select id="insttCode" name="insttCode" codeId="XIT025" defaultSelect="${extrDTO.insttCode}" title="기관코드" cls="selectBoxTotal" alt="기관코드" disabled="true"/>
</td> </td>
<th>단속구분</th> <th>단속구분</th>
<td> <td>
<code:select id="regltSeCode" name="regltSeCode" codeId="FIM002" defaultSelect="${extrlRegltCntcDTO.regltSeCode}" title="단속구분" cls="selectBoxTotal" alt="단속구분" disabled="true"/> <code:select id="regltSeCode" name="regltSeCode" codeId="FIM002" defaultSelect="${extrDTO.regltSeCode}" title="단속구분" cls="selectBoxTotal" alt="단속구분" disabled="true"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<th>단속일시</th> <th>단속일시</th>
<td> <td>
<fmt:parseDate value="${extrlRegltCntcDTO.regltDe}${extrlRegltCntcDTO.regltBeginTime}" var="regltDeTime" pattern="yyyyMMddHHmmss"/> <fmt:parseDate value="${extrDTO.regltDe}${extrDTO.regltBeginTime}" var="regltDeTime" pattern="yyyyMMddHHmmss"/>
<input type="text" name="regltDeTime" value='<fmt:formatDate value="${regltDeTime}" pattern="yyyy-MM-dd HH:mm:ss"/>' readonly> <input type="text" name="regltDeTime" value='<fmt:formatDate value="${regltDeTime}" pattern="yyyy-MM-dd HH:mm:ss"/>' readonly>
</td> </td>
<th>단속장소</th> <th>단속장소</th>
<td> <td>
<input type="text" name="regltPlace" value='<c:out value="${extrlRegltCntcDTO.regltPlace}"/>' readonly> <input type="text" name="regltPlace" value='<c:out value="${extrDTO.regltPlace}"/>' readonly>
</td> </td>
<th>위반내역</th> <th>위반내역</th>
<td> <td>
<input type="text" name="violtDtlsNm" value='<c:out value="${extrlRegltCntcDTO.violtDtlsNm}"/>' readonly> <input type="text" name="violtDtlsNm" value='<c:out value="${extrDTO.violtDtlsNm}"/>' readonly>
</td> </td>
</tr> </tr>
<tr> <tr>
<th>GPS위도</th> <th>GPS위도</th>
<td> <td>
<input type="text" name="gpsX" value='<c:out value="${extrlRegltCntcDTO.gpsX}"/>' readonly> <input type="text" name="gpsX" value='<c:out value="${extrDTO.gpsX}"/>' readonly>
</td> </td>
<th>GPS경도</th> <th>GPS경도</th>
<td> <td>
<input type="text" name="gpsY" value='<c:out value="${extrlRegltCntcDTO.gpsY}"/>' readonly> <input type="text" name="gpsY" value='<c:out value="${extrDTO.gpsY}"/>' readonly>
</td> </td>
<th>처리상태</th> <th>처리상태</th>
<td> <td>
<code:select id="extrlRegltCntcProcessSttus" name="extrlRegltCntcProcessSttus" codeId="FIM010" defaultSelect="${extrlRegltCntcDTO.extrlRegltCntcProcessSttus}" title="처리상태" cls="selectBoxTotal" alt="처리상태" disabled="true"/> <code:select id="extrlRegltCntcProcessSttus" name="extrlRegltCntcProcessSttus" codeId="FIM010" defaultSelect="${extrDTO.extrlRegltCntcProcessSttus}" title="처리상태" cls="selectBoxTotal" alt="처리상태" disabled="true"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<th>등록일시</th> <th>등록일시</th>
<td> <td>
<fmt:parseDate value="${extrlRegltCntcDTO.registDt}" var="registDt" pattern="yyyyMMddHHmmss"/> <fmt:parseDate value="${extrDTO.registDt}" var="registDt" pattern="yyyyMMddHHmmss"/>
<input type="text" name="registDt" value="<fmt:formatDate value="${registDt}" pattern="yyyy-MM-dd HH:mm:ss"/>" readonly> <input type="text" name="registDt" value="<fmt:formatDate value="${registDt}" pattern="yyyy-MM-dd HH:mm:ss"/>" readonly>
</td> </td>
<th>송신여부</th> <th>송신여부</th>
@ -176,7 +177,7 @@
<!-- //popup --> <!-- //popup -->
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/framework/js/cmm/cmmDownloadImg.js" defer></script> <script type="text/javascript" src="${pageContext.request.contextPath}/resources/framework/js/cmm/cmmDownloadImg.js" defer></script>
<%--<script type="text/javascript" src="${pageContext.request.contextPath}/resources/biz/common/js/bizCmmUtil.js" defer></script>--%> <%--<script type="text/javascript" src="${pageContext.request.contextPath}/resources/biz/common/js/popupPageNavigation.js" defer></script>--%>
<script type="text/javascript"> <script type="text/javascript">
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
@ -189,13 +190,24 @@
* Biz function * Biz function
******************************* */ ******************************* */
const fnBiz = { const fnBiz = {
downloadImg: () => { search: (params) => {
cmmAjax({
showSuccessMsg: false
,url: fimsApiUrl.FIND_CCTV_EC_EXTRL_REGLT_CNTC_AND_ATTCH_FILES
,data: params
,success: (res) => {
cmmImgDownload('#imgList', res.attchFiles, true);
window.opener.pageNav.reloadNav($('#prev'), $('#next'), $('#totCnt span'))
setFormData(document.querySelector('form'), res.extrDTO);
}
})
}
,downloadImg: () => {
cmmAjax({ cmmAjax({
showSuccessMsg: false showSuccessMsg: false
<%--,url: '<c:url value="/fims/biz/ec/findExtrlRegltCntcAttchFiles.do"/>' --%>
,url: fimsApiUrl.FIND_EC_EXTRL_REGLT_CNTC_ATTCH_FILES ,url: fimsApiUrl.FIND_EC_EXTRL_REGLT_CNTC_ATTCH_FILES
,data: {extrlRegltCntcId: '${extrlRegltCntcDTO.extrlRegltCntcId}', regltSeCode: '${extrlRegltCntcDTO.regltSeCode}'} ,data: {extrlRegltCntcId: '${extrDTO.extrlRegltCntcId}', regltSeCode: '${extrDTO.regltSeCode}'}
,success: (res) => { ,success: (res) => {
cmmImgDownload('#imgList', res.data?.contents, true); cmmImgDownload('#imgList', res.data?.contents, true);
} }
@ -248,7 +260,7 @@
,reglt: (extrlRegltCntcId) => { ,reglt: (extrlRegltCntcId) => {
const data = { const data = {
extrlRegltCntcId extrlRegltCntcId
,regltSeCode: '${extrlRegltCntcDTO.regltSeCode}' ,regltSeCode: '${extrDTO.regltSeCode}'
} }
if(!confirm('단속자료를 생성 하시겠습니까?')) return false; if(!confirm('단속자료를 생성 하시겠습니까?')) return false;
@ -261,7 +273,7 @@
,erpp: (extrlRegltCntcId) => { ,erpp: (extrlRegltCntcId) => {
const data = { const data = {
extrlRegltCntcId extrlRegltCntcId
,regltSeCode: '${extrlRegltCntcDTO.regltSeCode}' ,regltSeCode: '${extrDTO.regltSeCode}'
} }
if(!confirm('서손 처리 하시겠습니까?')) return false; if(!confirm('서손 처리 하시겠습니까?')) return false;
cmmAjax({ cmmAjax({
@ -300,16 +312,18 @@
}); });
$('#prev').on('click', () => { $('#prev').on('click', () => {
//window.opener.onClickCrackdownNavigationBtn('prev'); window.opener.pageNav.onClickNavBtn('prev', (gridInfo) => {
window.opener.pageNav.onClickNavBtn('prev', //gridInfo = data;
{extrlRegltCntcId: window.opener.pageNav.gridInfo.curRowData.extrlRegltCntcId, regltSeCode: window.opener.pageNav.gridInfo.curRowData.regltSeCode}); fnBiz.search(gridInfo.curRowData)
});
}) })
$('#next').on('click', () => { $('#next').on('click', () => {
//window.opener.onClickCrackdownNavigationBtn('next'); window.opener.pageNav.onClickNavBtn('next', (gridInfo) => {
window.opener.pageNav.onClickNavBtn('next', //gridInfo = data;
{extrlRegltCntcId: window.opener.pageNav.gridInfo.curRowData.extrlRegltCntcId, regltSeCode: window.opener.pageNav.gridInfo.curRowData.regltSeCode}); fnBiz.search(gridInfo.curRowData);
});
}); });
}); });
@ -321,17 +335,6 @@
// orgData = $('form').serialize(); // orgData = $('form').serialize();
fnBiz.downloadImg(); fnBiz.downloadImg();
const gridInfo = window.opener.pageNav.gridInfo; window.opener.pageNav.reloadNav($('#prev'), $('#next'), $('#totCnt span'))
if(gridInfo.curRowPos === 1){
$('#prev').attr('disabled', true);
}else{
$('#prev').attr('disabled', false);
}
if(gridInfo.curRowPos === gridInfo.totalCount){
$('#next').attr('disabled', true);
}else{
$('#next').attr('disabled', false);
}
$('#totCnt span').text(gridInfo.curRowPos + " / " + gridInfo.totalCount);
}); });
</script> </script>

@ -1,131 +0,0 @@
// 이전/다음 페이지 navigation data
var gridInfo = {
// 현재 gridData 목록
curGridDatas: null
// 현재 rowData
,curRowData: null
// 현재 데이타 위치
,curRowPos: null
// 현재 데이타 위치
,curGridDataPos: null
// 현재 page
,page: null
// 페이지당 갯수
,perPage: null
// 전체 데이타 count
,totalCount: null
// 페이지 이동 구분
,isNext: null
}
function loadPageNavigation(res, GRID, curData){
if(gridInfo !== null && gridInfo?.isNext !== 'undefinded' && gridInfo?.isNext !== null) {
GRID.resetData(res.data.contents);
if(gridInfo.isNext){
gridInfo.curRowPos = (gridInfo.page - 1) * gridInfo.perPage + 1;
gridInfo.curGridDataPos = 0;
} else{
gridInfo.curRowPos = gridInfo.page * gridInfo.perPage;
gridInfo.curGridDataPos = gridInfo.perPage - 1;
}
// grid page data position reset
gridInfo.isNext = null;
gridInfo.curGridDatas = GRID.store.data.rawData;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', curData);
}
if(gridInfo?.isNext) gridInfo.isNext = null;
}
//개별총정보 팝업내 다음/이전페이지
function onClickCrackdownNavigationBtn(evDiv, GRID, gridInfo, curData) {
if (evDiv === 'next') {
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
gridInfo.isNext = true;
gridInfo.page++;
GRID.getPagination().movePageTo(gridInfo.page);
}else{
gridInfo.curRowPos++;
gridInfo.curGridDataPos++;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
//func()
fnBiz.pagePopup('detail', curData);
}
} else {
if(gridInfo.curGridDataPos === 0){
gridInfo.isNext = false;
gridInfo.page--;
GRID.getPagination().movePageTo(gridInfo.page);
}else {
gridInfo.curRowPos--;
gridInfo.curGridDataPos--;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
//func()
fnBiz.pagePopup('detail', curData);
//fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
}
}
}
function onClickCtznStmtNavigationBtn(evDiv) {
if (evDiv === 'next') {
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
gridInfo.isNext = true;
gridInfo.page++;
GRID.getPagination().movePageTo(gridInfo.page);
}else{
gridInfo.curRowPos++;
gridInfo.curGridDataPos++;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn});
}
} else {
if(gridInfo.curGridDataPos === 0){
gridInfo.isNext = false;
gridInfo.page--;
GRID.getPagination().movePageTo(gridInfo.page);
}else {
gridInfo.curRowPos--;
gridInfo.curGridDataPos--;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn});
}
}
}
function onClickRegltNavigationBtn(evDiv) {
if (evDiv === 'next') {
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
gridInfo.isNext = true;
gridInfo.page++;
GRID.getPagination().movePageTo(gridInfo.page);
}else{
gridInfo.curRowPos++;
gridInfo.curGridDataPos++;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {regltId: gridInfo.curRowData.regltId});
}
} else {
if(gridInfo.curGridDataPos === 0){
gridInfo.isNext = false;
gridInfo.page--;
GRID.getPagination().movePageTo(gridInfo.page);
}else {
gridInfo.curRowPos--;
gridInfo.curGridDataPos--;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {regltId: gridInfo.curRowData.regltId});
}
}
}

@ -33,6 +33,8 @@ const fimsApiUrl = {
,POPUP_CCTV_EC_EXTRL_REGLT_CNTC_INFO: '/fims/biz/ec/ecCctvCrackdownPopup.do' //CCTV 외부연계 데이타 상세 ,POPUP_CCTV_EC_EXTRL_REGLT_CNTC_INFO: '/fims/biz/ec/ecCctvCrackdownPopup.do' //CCTV 외부연계 데이타 상세
,POPUP_CCTV_EC_EXTRL_REGLT_CNTC_DATA_SEL: '/fims/biz/ec/ecCctvCrackdownFileSelPopup.do' //CCTV 외부연계 데이타 선택 ,POPUP_CCTV_EC_EXTRL_REGLT_CNTC_DATA_SEL: '/fims/biz/ec/ecCctvCrackdownFileSelPopup.do' //CCTV 외부연계 데이타 선택
,FIND_CCTV_EC_EXTRL_REGLT_CNTCS: '/fims/biz/ec/findExtrlRegltCntcs.do' //CCTV 외부연계 데이타 목록 조회 ,FIND_CCTV_EC_EXTRL_REGLT_CNTCS: '/fims/biz/ec/findExtrlRegltCntcs.do' //CCTV 외부연계 데이타 목록 조회
,FIND_CCTV_EC_EXTRL_REGLT_CNTC: '/fims/biz/ec/findExtrlRegltCntc.do' //CCTV 외부연계 데이타 목록 조회
,FIND_CCTV_EC_EXTRL_REGLT_CNTC_AND_ATTCH_FILES: '/fims/biz/ec/findExtrlRegltCntcAndAttchFiles.do' //CCTV 외부연계 데이타 목록 조회
,SAVE_CCTV_EC_EXTRL_REGLT_CNTCS: '/fims/biz/ec/saveCctvCrackdownDatas.do' //CCTV 외부연계(고정형 / 이동형) 데이타 저장 ,SAVE_CCTV_EC_EXTRL_REGLT_CNTCS: '/fims/biz/ec/saveCctvCrackdownDatas.do' //CCTV 외부연계(고정형 / 이동형) 데이타 저장
,SAVE_BUS_ONLY_EC_EXTRL_REGLT_CNTC: '/fims/biz/ec/saveBusCctvCrackdownDatas.do' //CCTV 외부연계(버스전용차료) 데이타 저장 ,SAVE_BUS_ONLY_EC_EXTRL_REGLT_CNTC: '/fims/biz/ec/saveBusCctvCrackdownDatas.do' //CCTV 외부연계(버스전용차료) 데이타 저장
,MODIFY_EC_EXTRL_REGLT_CNTC: '/fims/biz/ec/modifyExtrlRegltCntc.do' //CCTV 외부연계 데이타 변경 ,MODIFY_EC_EXTRL_REGLT_CNTC: '/fims/biz/ec/modifyExtrlRegltCntc.do' //CCTV 외부연계 데이타 변경

@ -5,207 +5,131 @@ class PageNavigation {
// 현재 gridData 목록 // 현재 gridData 목록
gridInfo = { gridInfo = {
curGridDatas: null gridDatas: null
// 현재 rowData // 현재 rowData
, curRowData: null ,curRowData: null
// 현재 데이타 위치 // 현재 데이타 위치
, curRowPos: null ,curRowPos: null
// 현재 데이타 위치 // 현재 데이타 위치
, curGridDataPos: null ,gridDataPos: null
// 현재 page // 현재 page
, page: null ,page: null
// 페이지당 갯수 // 페이지당 갯수
, perPage: null ,perPage: null
// 전체 데이타 count // 전체 데이타 count
, totalCount: null ,totalCount: null
// 페이지 이동 구분 // 페이지 이동 구분
, isNext: null ,pageMove: null
}; };
curKeyData = null;
fnGetKeyData = null; /**
* 페이지 이동 or 팝업 호출시 생성
constructor(GRID, props) { * @param {object} GRID
const {page, perPage, totalCount} = GRID.store.data.pageOptions; * @param {array} gridDatas 그리드 데이타 key 필드 배열
* @param {number} gridDataPos 현재 그리드 페이지의 데이타 row
*/
constructor(GRID, gridDatas, gridDataPos) {
const {itemsPerPage, totalItems} = GRID.getPagination()._options;
const page = GRID.getPagination()._currentPage;
this.gridInfo = { this.gridInfo = {
curGridDatas: GRID.store.data.rawData gridDatas
,curRowData: GRID.store.data.rawData[props.rowKey] ,gridDataPos
,curRowPos: (page - 1) * perPage + GRID.store.data.rawData[props.rowKey].rowKey + 1 ,curRowData: gridDatas[gridDataPos]
,curGridDataPos: GRID.store.data.rawData[props.rowKey].rowKey ,curRowPos: (page - 1) * itemsPerPage + gridDataPos + 1
,page ,page
,perPage ,perPage: itemsPerPage
,totalCount ,totalCount: totalItems
,isNext: null ,pageMove: null
,next: null
} }
this.grid = GRID; this.grid = GRID;
//this.fnGetKeyData = fnGetKeyData;
//this.curKeyData = this.fnGetKeyData();
}; };
loadNavigation(res){ /**
if(this.gridInfo !== null && this.gridInfo?.isNext !== 'undefinded' && this.gridInfo?.isNext !== null) { * 팝업 페이지 에서 강제 페이징 처리시 호출
this.grid.resetData(res.data.contents); * @param {json} res 그리드 목록 조회 결과
* @param {function} callback 호출할 function - 생성한 PageNavigation을 함께 전달
if(this.gridInfo.isNext){ */
this.gridInfo.curRowPos = (this.gridInfo.page - 1) * this.gridInfo.perPage + 1; resetGrid2(res, callback) {
this.gridInfo.curGridDataPos = 0; this.grid.resetData(res.data?.contents);
} else{ const gridDatas = this.grid.store.data.rawData.map(d => {
this.gridInfo.curRowPos = this.gridInfo.page * this.gridInfo.perPage; return {extrlRegltCntcId: d.extrlRegltCntcId, regltSeCode: d.regltSeCode}
this.gridInfo.curGridDataPos = this.gridInfo.perPage - 1; });
if (this.gridInfo.next) pageNav = new PageNavigation(this.grid, gridDatas, 0);
else pageNav = new PageNavigation(this.grid, gridDatas, 14);
callback(pageNav)
}
/**
* 팝업 페이지 에서 강제 페이징 처리시 호출
* @param {json} res 그리드 목록 조회 결과
* @param {array} gridDatas 그리드 데이타 key 필드 배열
* @param {function} callback 호출할 function - 생성한 PageNavigation을 함께 전달
*/
resetGrid(res, gridDatas, callback) {
this.grid.resetData(res.data?.contents);
if (this.gridInfo.next) pageNav = new PageNavigation(this.grid, gridDatas, 0);
else pageNav = new PageNavigation(this.grid, gridDatas, 14);
callback(pageNav)
}
/**
* 팝업창의 prev, next 버튼 클릭후 정보 갱신을 위해 호출
* @param {object} prevObj prev button object
* @param {object} nextObj next button object
* @param {object} totObj total tag object
*/
reloadNav(prevObj, nextObj, totObj){
if(this.gridInfo.curRowPos === 1){
prevObj.attr('disabled', true);
}else{
prevObj.attr('disabled', false);
} }
// grid page data position reset if(this.gridInfo.curRowPos === this.gridInfo.totalCount){
this.gridInfo.isNext = null; nextObj.attr('disabled', true);
this.gridInfo.curGridDatas = this.grid.store.data.rawData; }else{
this.gridInfo.curRowData = this.gridInfo.curGridDatas[this.gridInfo.curGridDataPos]; nextObj.attr('disabled', false);
}
this.curKeyData = this.fnGetKeyData; totObj.text(this.gridInfo.curRowPos + " / " + this.gridInfo.totalCount);
//this.curKeyData = this.fnGetKeyData;
fnBiz.pagePopup('detail', curKeyData);
} }
if(this.gridInfo?.isNext) this.gridInfo.isNext = null;
};
onClickNavBtn(evDiv, curData) { /**
* 팝업창 prev, next 버튼 클릭시 호출
* @param {string} evDiv 'prev|next'
* @param {function} callback 페이지 이동시 호출할 callback
*/
onClickNavBtn(evDiv, callback) {
if (evDiv === 'next') { if (evDiv === 'next') {
if(this.gridInfo.curGridDataPos + 1 === this.gridInfo.perPage){ if(this.gridInfo.gridDataPos + 1 === this.gridInfo.perPage){
this.gridInfo.isNext = true; this.gridInfo.pageMove = true;
this.gridInfo.next = true;
this.gridInfo.page++; this.gridInfo.page++;
this.grid.getPagination().movePageTo(this.gridInfo.page); this.grid.getPagination().movePageTo(this.gridInfo.page);
}else{ }else{
this.gridInfo.curRowPos++; this.gridInfo.curRowPos++;
this.gridInfo.curGridDataPos++; this.gridInfo.gridDataPos++;
this.gridInfo.curRowData = this.gridInfo.curGridDatas[this.gridInfo.curGridDataPos]; this.gridInfo.curRowData = this.gridInfo.gridDatas[this.gridInfo.gridDataPos];
//func() callback(this.gridInfo);
fnBiz.pagePopup('detail', curData);
} }
} else { } else {
if(this.gridInfo.curGridDataPos === 0){ if(this.gridInfo.gridDataPos === 0){
this.gridInfo.isNext = false; this.gridInfo.pageMove = true;
this.gridInfo.next = false;
this.gridInfo.page--; this.gridInfo.page--;
this.grid.getPagination().movePageTo(this.gridInfo.page); this.grid.getPagination().movePageTo(this.gridInfo.page);
}else { }else {
this.gridInfo.curRowPos--; this.gridInfo.curRowPos--;
this.gridInfo.curGridDataPos--; this.gridInfo.gridDataPos--;
this.gridInfo.curRowData = this.gridInfo.curGridDatas[this.gridInfo.curGridDataPos]; this.gridInfo.curRowData = this.gridInfo.gridDatas[this.gridInfo.gridDataPos];
//func() callback(this.gridInfo)
fnBiz.pagePopup('detail', curData);
//fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
} }
} }
} }
} }
function loadPageNavigation(res, GRID, curData){
if(gridInfo !== null && gridInfo?.isNext !== 'undefinded' && gridInfo?.isNext !== null) {
GRID.resetData(res.data.contents);
if(gridInfo.isNext){
gridInfo.curRowPos = (gridInfo.page - 1) * gridInfo.perPage + 1;
gridInfo.curGridDataPos = 0;
} else{
gridInfo.curRowPos = gridInfo.page * gridInfo.perPage;
gridInfo.curGridDataPos = gridInfo.perPage - 1;
}
// grid page data position reset
gridInfo.isNext = null;
gridInfo.curGridDatas = GRID.store.data.rawData;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', curData);
}
if(gridInfo?.isNext) gridInfo.isNext = null;
}
//개별총정보 팝업내 다음/이전페이지
function onClickCrackdownNavigationBtn(evDiv, GRID, gridInfo, curData) {
if (evDiv === 'next') {
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
gridInfo.isNext = true;
gridInfo.page++;
GRID.getPagination().movePageTo(gridInfo.page);
}else{
gridInfo.curRowPos++;
gridInfo.curGridDataPos++;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
//func()
fnBiz.pagePopup('detail', curData);
}
} else {
if(gridInfo.curGridDataPos === 0){
gridInfo.isNext = false;
gridInfo.page--;
GRID.getPagination().movePageTo(gridInfo.page);
}else {
gridInfo.curRowPos--;
gridInfo.curGridDataPos--;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
//func()
fnBiz.pagePopup('detail', curData);
//fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
}
}
}
function onClickCtznStmtNavigationBtn(evDiv) {
if (evDiv === 'next') {
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
gridInfo.isNext = true;
gridInfo.page++;
GRID.getPagination().movePageTo(gridInfo.page);
}else{
gridInfo.curRowPos++;
gridInfo.curGridDataPos++;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn});
}
} else {
if(gridInfo.curGridDataPos === 0){
gridInfo.isNext = false;
gridInfo.page--;
GRID.getPagination().movePageTo(gridInfo.page);
}else {
gridInfo.curRowPos--;
gridInfo.curGridDataPos--;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn});
}
}
}
function onClickRegltNavigationBtn(evDiv) {
if (evDiv === 'next') {
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
gridInfo.isNext = true;
gridInfo.page++;
GRID.getPagination().movePageTo(gridInfo.page);
}else{
gridInfo.curRowPos++;
gridInfo.curGridDataPos++;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {regltId: gridInfo.curRowData.regltId});
}
} else {
if(gridInfo.curGridDataPos === 0){
gridInfo.isNext = false;
gridInfo.page--;
GRID.getPagination().movePageTo(gridInfo.page);
}else {
gridInfo.curRowPos--;
gridInfo.curGridDataPos--;
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
fnBiz.pagePopup('detail', {regltId: gridInfo.curRowData.regltId});
}
}
}

@ -534,6 +534,18 @@ function serialize (formData) {
return rtnData; return rtnData;
} }
/**
* form json data set
* 태그명으로 일치 - 동일 태그명이 여럿존재하는 경우 [0] set
* @param formObj document.querySelector('form')
* @param jsonData json type data
*/
function setFormData(formObj, jsonData){
const els = formObj.elements;
for(let e of els){
document.getElementsByName(e.name)[0].value = jsonData[e.name] ?? '' ;
}
}
/** /**
* <pre> * <pre>

Loading…
Cancel
Save