사용자정보 변경 화면 수정

main
이범준 11 months ago
parent 77e5c502a5
commit 111916ed30

@ -82,7 +82,7 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
return mav;
}
@RequestMapping(name="내 정보 조회",value="/openMyInfo.do")
@RequestMapping(name="내 정보 변경 화면", value="/openMyInfo.do")
public ModelAndView openMyInfo() {
ModelAndView mav = new ModelAndView("fims/user/user-info");
@ -97,6 +97,12 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
return mav;
}
@RequestMapping(name="비밀번호 변경 화면",value="/openChangePassword.do")
public ModelAndView openChangePassword() {
ModelAndView mav = new ModelAndView("fims/user/password-info");
return mav;
}
@RequestMapping(name="설정정보 조회",value="/stngInfo.do")
public ModelAndView getStngInfo(String type) {

@ -34,12 +34,21 @@ public class FactionBean extends AbstractComponent {
DataObject factionInfo = factionMapper.selectFactionInfoOfUser(userInfo.getId());
Map<String, Object> infoMap = userInfo.getInfo();
infoMap.put("sggCd", factionInfo.string("SGG_CD"));
infoMap.put("sggNm", factionInfo.string("SGG_NM"));
infoMap.put("instCd", factionInfo.string("INST_CD"));
infoMap.put("instNm", factionInfo.string("INST_NM"));
infoMap.put("deptCd", factionInfo.string("DEPT_CD"));
infoMap.put("deptNm", factionInfo.string("DEPT_NM"));
if(factionInfo == null) {
infoMap.put("sggCd", "");
infoMap.put("sggNm", "");
infoMap.put("instCd", "");
infoMap.put("instNm", "");
infoMap.put("deptCd", "");
infoMap.put("deptNm", "");
} else {
infoMap.put("sggCd", factionInfo.string("SGG_CD"));
infoMap.put("sggNm", factionInfo.string("SGG_NM"));
infoMap.put("instCd", factionInfo.string("INST_CD"));
infoMap.put("instNm", factionInfo.string("INST_NM"));
infoMap.put("deptCd", factionInfo.string("DEPT_CD"));
infoMap.put("deptNm", factionInfo.string("DEPT_NM"));
}
userInfo.setInfo(infoMap);
}

@ -30,6 +30,8 @@ SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS FACTION_CD
, A.INST_NM
, B.DEPT_CD
, B.DEPT_NM
, A.SGG_CD
, A.SGG_NM
FROM TB_SGG A
LEFT OUTER JOIN TB_DEPT B ON (A.INST_CD = B.INST_CD)
<if test="currentUser.institute != 'default'">
@ -43,6 +45,8 @@ SELECT 'default/default' AS FACTION_CD
, '기본 기관' AS INST_NM
, 'default' AS DEPT_CD
, '기본 부서' AS DEPT_NM
, 'default' AS SGG_CD
, '기본 시군구' AS SGG_NM
FROM DUAL
</if>
</select>
@ -56,7 +60,7 @@ SELECT S.SGG_CD
, U.DEPT_CD
, D.DEPT_NM
FROM TB_USER U
INNER JOIN TB_SGG S ON (U.ORG_ID = S.SGG_CD)
LEFT OUTER JOIN TB_SGG S ON (U.ORG_ID = S.SGG_CD)
LEFT OUTER JOIN TB_DEPT D ON (U.DEPT_CD = D.DEPT_CD)
WHERE U.USER_ID = #{userId}
</select>

@ -18,7 +18,7 @@
<c:forEach items="${ableFactionList}" var="item">
<li>
<a class="dropdown-item"
onclick="setFactionCodeValues('${item.INST_CD}','${item.DEPT_CD}')">${item.FACTION_NM}</a>
onclick="setFactionCodeValues('${item.INST_CD}','${item.DEPT_CD}','${item.SGG_CD}')">${item.FACTION_NM}</a>
</li>
</c:forEach>
</ul>
@ -38,6 +38,7 @@
<option value="${item.DEPT_CD}">${item.DEPT_NM}</option>
</c:forEach>
</select>
<input type="hidden" name="orgID" data-map="ORG_ID" />
</div>
</div>
</div>
@ -245,9 +246,11 @@ function saveinfoPrefix() {
});
}
function setFactionCodeValues(institute, deptCode){
$("#infoPrefix-form [name='institute']").val(institute).trigger("change")
$("#infoPrefix-form [name='deptCode']").val(deptCode).trigger("change")
function setFactionCodeValues(institute, deptCode, sggCd){
$("#infoPrefix-form [name='institute']").val(institute).trigger("change");
$("#infoPrefix-form [name='deptCode']").val(deptCode).trigger("change");
$("#infoPrefix-form [name='orgID']").val(sggCd);
}
//# sourceURL=user-info.jsp

@ -0,0 +1,37 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<form id="password-form">
<div class="row g-3">
<div class="col-md-12">
<div class="row">
<label class="col-sm-4 col-form-label text-sm-end required" for="currentPassword">
현재 비밀번호
</label>
<div class="col-sm-8">
<input name="currentPassword" type="password" required class="form-control" />
</div>
</div>
</div>
<div class="col-md-12">
<div class="row">
<label class="col-sm-4 col-form-label text-sm-end required" for="password">
새 비밀번호
</label>
<div class="col-sm-8">
<input name="password" type="password" required class="form-control" />
</div>
</div>
</div>
<div class="col-md-12">
<div class="row">
<label class="col-sm-4 col-form-label text-sm-end required" for="confirmPassword">
새 비밀번호 확인
</label>
<div class="col-sm-8">
<input name="confirmPassword" type="password" required class="form-control" />
</div>
</div>
</div>
</div>
</form>

@ -53,7 +53,7 @@
<c:forEach items="${ableFactionList}" var="item">
<li>
<a class="dropdown-item"
onclick="setFactionCodeValues('${item.INST_CD}','${item.DEPT_CD}')">${item.FACTION_NM}</a>
onclick="setFactionCodeValues('${item.INST_CD}','${item.DEPT_CD}','${item.SGG_CD}')">${item.FACTION_NM}</a>
</li>
</c:forEach>
</ul>
@ -73,6 +73,7 @@
<option value="${item.DEPT_CD}">${item.DEPT_NM}</option>
</c:forEach>
</select>
<input type="hidden" name="orgID" data-map="ORG_ID" />
</div>
</div>
</div>
@ -315,9 +316,11 @@ function save(info){
});
}
function setFactionCodeValues(institute, deptCode){
$("#user-form [name='institute']").val(institute).trigger("change")
$("#user-form [name='deptCode']").val(deptCode).trigger("change")
function setFactionCodeValues(institute, deptCode, sggCd){
$("#user-form [name='institute']").val(institute).trigger("change");
$("#user-form [name='deptCode']").val(deptCode).trigger("change");
$("#user-form [name='orgID']").val(sggCd);
}
var userInfo = ${userInfo};

@ -104,13 +104,13 @@
<div class="dropdown-divider"></div>
</li>
<li onclick="fnOpenMyInfo();">
<a class="dropdown-item" href="#">
<a class="dropdown-item" href="javascript:void(0);">
<i class="bx bx-user me-2"></i>
<span class="align-middle">계정 정보 수정</span>
</a>
</li>
<li onclick="">
<a class="dropdown-item" href="#">
<li onclick="fnOpenChangePassword();">
<a class="dropdown-item" href="javascript:void(0);">
<i class="bx bx-user me-2"></i>
<span class="align-middle">비밀번호 변경</span>
</a>
@ -186,6 +186,23 @@ function fnOpenMyInfo(){
);
}
function fnOpenChangePassword(){
ajax.get({
url : wctx.url("/user/openChangePassword.do"),
data : { },
success : (resp) => {
dialog.open({
id : "changePasswordDialog",
title : "비밀번호 변경",
content : resp,
size : "md",
init : () => {},
onClose : () => {}
});
}
});
}
function showHelp(){
dialog.alert({
content: '070-4490-74XX',

Loading…
Cancel
Save