From 38bc7678f3582839d579f4aada219ed609dd08ac Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Mon, 24 Jul 2023 10:32:52 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AF=BC=EC=9B=90=20=EC=9B=90=EB=B3=B8?= =?UTF-8?q?=EB=B3=B4=EA=B8=B0=20=ED=8C=9D=EC=97=85=20=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/crdn/web/Crdn01Controller.java | 6 +- .../WEB-INF/jsp/fims/crdn/crdn01010-main.jsp | 53 +++++++++++-- .../WEB-INF/jsp/fims/crdn/crdn01050-info.jsp | 74 ++++++++++++++++++- src/main/webapp/WEB-INF/jsp/index.jsp | 2 + 4 files changed, 125 insertions(+), 10 deletions(-) diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java index 65004ae4..b033ce97 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java @@ -4,6 +4,7 @@ import java.util.List; import java.util.Map; import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; @@ -75,11 +76,14 @@ public class Crdn01Controller extends ApplicationController { * @return fims/crdn/crdn01050-info */ @RequestMapping(name="민원내역 원본 보기", value="/050/info.do") - public ModelAndView getCivilComplaintOriginalInfo(CrdnQuery req) { + public ModelAndView getCivilComplaintOriginalInfo(CrdnQuery req, HttpServletRequest request) { boolean json = jsonResponse(); + ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/crdn/crdn01050-info"); mav.addObject("pageName", "crdn01050-info"); + String urlTaskSeCd = request.getServletPath().split("/")[1]; + mav.addObject("taskSeCd", urlTaskSeCd); Map> commonCodes = getCodesOf("FIM039"); mav.addObject("FIM039List", commonCodes.get("FIM039")); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp index 530cf77b..ecbfd262 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp @@ -386,16 +386,59 @@ $(document).ready(function(){ var taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val(); + var dialogId = "cvlcptOrgnlDialog--${pageName}"; ajax.get({ url : wctx.url("/"+taskSeCd+"/crdn/crdn01/050/info.do"), data : { crdnId : cur["CRDN_ID"] }, success : resp => { dialog.open({ - id : "cvlcptOrgnlDialog--${pageName}" - , title : "민원내역 원본" - , content : resp - , size : "xl" - , init : () => {} + id : dialogId, + title : "민원내역 원본", + content : resp, + size : "xl", + init : () => { + var parentRes = new Object(); + var childReq = pageObject.childReq.pop(); + + for(var reqKey in childReq) { + if(reqKey == "getCountStatus"){ + parentRes[reqKey] = function(currentKey){ + var ds = $P.crdnControl.dataset.getDataset(); + var index = ds.findIndex(item => item.CRDN_ID == currentKey); + return (index+1) + " of " + ds.length; + }; + } + if(reqKey == "getNextKey"){ + parentRes[reqKey] = function(currentKey){ + var ds = $P.crdnControl.dataset.getDataset(); + var index = ds.findIndex(item => item.CRDN_ID == currentKey); + if(ds.length > index+1){ + return ds[index+1]["CRDN_ID"]; + } else { + return ""; + } + }; + } + if(reqKey == "getPrevKey"){ + parentRes[reqKey] = function(currentKey){ + var ds = $P.crdnControl.dataset.getDataset(); + var index = ds.findIndex(item => item.CRDN_ID == currentKey); + if(index != 0 && ds.length > 1){ + return ds[index-1]["CRDN_ID"]; + } else { + return ""; + } + }; + } + if(reqKey == "selectRow"){ + parentRes[reqKey] = function(currentKey){ + $P.clickCrdnList(currentKey); + }; + } + } + + pageObject.parentRes.push(parentRes); + } }); } }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01050-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01050-info.jsp index e1423b8e..1d247ca4 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01050-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01050-info.jsp @@ -59,41 +59,107 @@ +
+ + + +
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/index.jsp b/src/main/webapp/WEB-INF/jsp/index.jsp index aecc465b..9f7555a7 100644 --- a/src/main/webapp/WEB-INF/jsp/index.jsp +++ b/src/main/webapp/WEB-INF/jsp/index.jsp @@ -41,6 +41,8 @@