소스 정리

main
이범준 3 months ago
parent 33fcefe98f
commit 39e4b55530

@ -569,12 +569,12 @@ function fnRenderProgressAndTotal(returnData, cursor){
} }
if(cursor == "card1"){ if(cursor == "card1"){
mappingButtonAndMenu("btnGoToCrdn","단속 관리"); FimsSupport.mappingButtonAndMenu("btnGoToCrdn","단속 관리");
return; return;
} }
if(cursor == "card2"){ if(cursor == "card2"){
mappingButtonAndMenu("btnGoToOpnn","의견제출 관리"); FimsSupport.mappingButtonAndMenu("btnGoToOpnn","의견제출 관리");
return; return;
} }
} }

@ -67,7 +67,7 @@
<tr> <tr>
<th style="min-width: 80px;">단속자료</th> <th style="min-width: 80px;">단속자료</th>
<th style="min-width: 80px;" title="더블클릭시 축소/확대 됩니다." <th style="min-width: 80px;" title="더블클릭시 축소/확대 됩니다."
class="downsize" ondblclick="fnDownsizeToggle(this);" href="#"> class="downsize" ondblclick="FimsSupport.fnDownsizeToggle(this);" href="#">
파일명 <i class='bx bx-expand'></i> 파일명 <i class='bx bx-expand'></i>
</th> </th>
<th style="min-width: 80px;">타임스탬프</th> <th style="min-width: 80px;">타임스탬프</th>
@ -328,7 +328,7 @@ $(document).ready(function(){
$P.$find("table-responsive").find("tbody").html(trs); $P.$find("table-responsive").find("tbody").html(trs);
if(listLength != 0){ if(listLength != 0){
fnDownsizeCheck($P.$find("table-responsive").find("table")[0]); FimsSupport.fnDownsizeCheck($P.$find("table-responsive").find("table")[0]);
} }
} }

@ -736,7 +736,7 @@ $(document).ready(function(){
$("#"+dialogId).attr("name", dialogName); $("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}"); $("#"+dialogId).attr("data-ref-doctx","${pageName}");
} },
onClose : () => { $P.refreshPayer(); } // callback onClose : () => { $P.refreshPayer(); } // callback
}); });
} }
@ -959,7 +959,7 @@ $(document).ready(function(){
var resp = null; var resp = null;
// //
resp = await countCrdnByVhrno(vhrno, taskSeCd, sggCd); resp = await FimsSupport.countCrdnByVhrno(vhrno, taskSeCd, sggCd);
if(resp.crdnCount > 0){ if(resp.crdnCount > 0){
$P.$find("outputCrdnCount").html(resp.crdnCount); $P.$find("outputCrdnCount").html(resp.crdnCount);
$P.$find("btnViewCrdnList").removeAttr("hidden"); $P.$find("btnViewCrdnList").removeAttr("hidden");
@ -968,7 +968,7 @@ $(document).ready(function(){
} }
// //
resp = await countCvlcptDscsnByVhrno(vhrno, taskSeCd, sggCd); resp = await FimsSupport.countCvlcptDscsnByVhrno(vhrno, taskSeCd, sggCd);
if(resp.cvlcptDscsnNocs.NOCS > 0){ if(resp.cvlcptDscsnNocs.NOCS > 0){
$P.$find("outputCvlcptDscsnCount").html(resp.cvlcptDscsnNocs.NOCS); $P.$find("outputCvlcptDscsnCount").html(resp.cvlcptDscsnNocs.NOCS);
$P.$find("btnViewCvlcptDscsnList").removeAttr("hidden"); $P.$find("btnViewCvlcptDscsnList").removeAttr("hidden");
@ -977,7 +977,7 @@ $(document).ready(function(){
} }
// //
resp = await getVhclInfo(sggCd, vhrno, crdnYmd); resp = await FimsSupport.getVhclInfo(sggCd, vhrno, crdnYmd);
if(otherWindow){ if(otherWindow){
$P.$find("vhrno").val(vhrno); $P.$find("vhrno").val(vhrno);
@ -1062,7 +1062,7 @@ $(document).ready(function(){
$P.$find("dtlAddr").val(vehicle.use_strnghld_adres_nm); //상세주소 $P.$find("dtlAddr").val(vehicle.use_strnghld_adres_nm); //상세주소
if(taskSeCd == "DPV"){ if(taskSeCd == "DPV"){
resp = await getVhclDisabledParkingInfo(vhrno); resp = await FimsSupport.getVhclDisabledParkingInfo(vhrno);
if(resp.parkingInfo.BOHUN_PARKING_PSBL_YN == "Y" || resp.parkingInfo.PARKING_PSBL_YN == "Y") { if(resp.parkingInfo.BOHUN_PARKING_PSBL_YN == "Y" || resp.parkingInfo.PARKING_PSBL_YN == "Y") {
$P.$find("prkPsbltyRsltCd").val("2"); $P.$find("prkPsbltyRsltCd").val("2");

@ -41,6 +41,9 @@
<!-- 공통 유틸 --> <!-- 공통 유틸 -->
<script src="<c:url value="/webjars/applib/js/cmmnUtil.js?${ver}"/>"></script> <script src="<c:url value="/webjars/applib/js/cmmnUtil.js?${ver}"/>"></script>
<script src="<c:url value="/resources/js/fims/cmmn/fims-cmmnUtil.js?${ver}"/>"></script> <script src="<c:url value="/resources/js/fims/cmmn/fims-cmmnUtil.js?${ver}"/>"></script>
<script src="<c:url value="/resources/js/fims/cmmn/fims-support.js?${ver}"/>"></script>
<!-- 날짜 관련 유틸 --> <!-- 날짜 관련 유틸 -->
<script src="<c:url value="/webjars/applib/js/cmmnDateUtil.js?${ver}"/>"></script> <script src="<c:url value="/webjars/applib/js/cmmnDateUtil.js?${ver}"/>"></script>
<!-- 업무별 기능 유틸 --> <!-- 업무별 기능 유틸 -->
@ -50,12 +53,10 @@
<script src="<c:url value="/webjars/applib/js/initAfterPageLoad.js?${ver}"/>"></script> <script src="<c:url value="/webjars/applib/js/initAfterPageLoad.js?${ver}"/>"></script>
<!-- 검색 유틸 --> <!-- 검색 유틸 -->
<script src="<c:url value="/resources/js/fims/cmmn/searchUtil.js?${ver}"/>"></script> <script src="<c:url value="/resources/js/fims/cmmn/searchUtil.js?${ver}"/>"></script>
<!-- 그리드 열 너비 유틸 -->
<script src="<c:url value="/resources/js/fims/cmmn/downsize.js?${ver}"/>"></script>
<!-- 단축키 설정 --> <!-- 단축키 설정 -->
<script src="<c:url value="/resources/js/fims/cmmn/shortcutKey.js?${ver}"/>"></script> <script src="<c:url value="/resources/js/fims/cmmn/shortcutKey.js?${ver}"/>"></script>
<!-- 버튼 설정 -->
<script src="<c:url value="/resources/js/fims/cmmn/button.js?${ver}"/>"></script>
<!-- 커스텀UI --> <!-- 커스텀UI -->
<script src="<c:url value="/webjars/applib/js/componentization.js?${ver}"/>"></script> <script src="<c:url value="/webjars/applib/js/componentization.js?${ver}"/>"></script>
<script src="<c:url value="/resources/js/fims/cmmn/fims-componentization.js?${ver}"/>"></script> <script src="<c:url value="/resources/js/fims/cmmn/fims-componentization.js?${ver}"/>"></script>

@ -534,11 +534,11 @@ function fnGlobalFastSearch(){
} }
/*--------------------- 종합민원관리 클릭 이벤트 ---------------------*/ /*--------------------- 종합민원관리 클릭 이벤트 ---------------------*/
mappingButtonAndMenu("btnGoToCvlcptDscsn","민원상담"); FimsSupport.mappingButtonAndMenu("btnGoToCvlcptDscsn","민원상담");
/*--------------------- 일정관리 클릭 이벤트 ---------------------*/ /*--------------------- 일정관리 클릭 이벤트 ---------------------*/
mappingButtonAndMenu("btnGoToNtc","공지사항"); FimsSupport.mappingButtonAndMenu("btnGoToNtc","공지사항");
/*--------------------- 공지사항 클릭 이벤트 ---------------------*/ /*--------------------- 공지사항 클릭 이벤트 ---------------------*/
mappingButtonAndMenu("btnGoToSchdl","일정관리"); FimsSupport.mappingButtonAndMenu("btnGoToSchdl","일정관리");
/*--------------------- 사용자 메뉴얼 클릭 이벤트 ---------------------*/ /*--------------------- 사용자 메뉴얼 클릭 이벤트 ---------------------*/
$("#btnDownloadMenual--top").on( "click", function() { $("#btnDownloadMenual--top").on( "click", function() {

@ -1,8 +0,0 @@
/**
* 버튼과 메뉴를 매핑한다.
*/
function mappingButtonAndMenu(buttonId, menuNm){
$("#"+buttonId).on( "click", function() {
$("#menus").find("div[data-i18n='"+menuNm+"']").parent("a").trigger("click");
});
}

@ -1,45 +0,0 @@
//테이블 렌더링 후 축소 처리할 컬럼 확인
function fnDownsizeCheck(tableObj) {
$(tableObj).find("thead tr th").each(function(){
var thIndex = $(this).index();
if($(this).hasClass("downsize")){
var trs = $(this).parent("tr").parent("thead").next("tbody").find("tr");
trs.each(function(){
$(this).find("td:eq("+thIndex+")").css("max-width","160px");
});
}
});
}
//테이블 컬럼 축소 여부 변경
function fnDownsizeToggle(thObj) {
$(thObj).toggleClass("downsize");
var thIndex = $(thObj).index();
var setValue = "";
if($(thObj).hasClass("downsize")){
setValue = "160px";
}
var tbody = $(thObj).parent("tr").parent("thead").next("tbody");
if(tbody.length < 1){
return;
}
var trs = tbody.find("tr");
if(trs.length < 1){
return;
}
if(trs.length == 1 && trs.find("td").length <= 1){
return;
}
trs.each(function(){
$(this).find("td:eq("+thIndex+")").css("max-width",setValue);
});
};

@ -0,0 +1,155 @@
class FimsSupport {
static help(){
console.log("메소드 목록");
console.log("mappingButtonAndMenu(버튼id, 메뉴이름) : 버튼과 메뉴를 매핑한다.");
console.log("fnDownsizeToggle(th객체) : 테이블 컬럼 축소 여부 변경");
console.log("fnDownsizeCheck(html테이블객체) : 테이블 렌더링 후 축소 처리할 컬럼 확인");
console.log("countCrdnByVhrno(차량번호, 업무구분코드, 시군구코드) : 차량번호로 단속 건수 조회");
console.log("countCvlcptDscsnByVhrno(차량번호, 업무구분코드, 시군구코드) : 차량번호로 민원상담 건수 조회");
console.log("getVhclInfo(시군구코드, 차량번호, 기준일자) : 시군구코드, 차량번호, 기준일자로 차적 조회");
console.log("getVhclDisabledParkingInfo(차량번호) : 장애인 차량여부 조회");
}
/**************************************************************************
* 버튼과 메뉴를 매핑한다.
**************************************************************************/
static mappingButtonAndMenu(buttonId, menuNm){
$("#"+buttonId).on( "click", function() {
$("#menus").find("div[data-i18n='"+menuNm+"']").parent("a").trigger("click");
});
}
/**************************************************************************
* 테이블 컬럼 축소 여부 변경
**************************************************************************/
static fnDownsizeToggle(thObj) {
$(thObj).toggleClass("downsize");
var thIndex = $(thObj).index();
var setValue = "";
if($(thObj).hasClass("downsize")){
setValue = "160px";
}
var tbody = $(thObj).parent("tr").parent("thead").next("tbody");
if(tbody.length < 1){
return;
}
var trs = tbody.find("tr");
if(trs.length < 1){
return;
}
if(trs.length == 1 && trs.find("td").length <= 1){
return;
}
trs.each(function(){
$(this).find("td:eq("+thIndex+")").css("max-width",setValue);
});
}
/**************************************************************************
* 테이블 렌더링 축소 처리할 컬럼 확인
**************************************************************************/
static fnDownsizeCheck(tableObj) {
$(tableObj).find("thead tr th").each(function(){
var thIndex = $(this).index();
if($(this).hasClass("downsize")){
var trs = $(this).parent("tr").parent("thead").next("tbody").find("tr");
trs.each(function(){
$(this).find("td:eq("+thIndex+")").css("max-width","160px");
});
}
});
}
/**************************************************************************
* 차량번호로 단속 건수 조회
**************************************************************************/
static async countCrdnByVhrno(vhrno, taskSeCd, sggCd){
return new Promise((resolve, reject) => {
json.get({
url: wctx.url("/"+taskSeCd+"/crdn/crdn06/010/nocs.do"),
data: {
vhrno : vhrno,
taskSeCd : taskSeCd,
sggCd : sggCd
},
success: function(resp, textStatus, jqXHR) {
resolve(resp);
},
error: function(jqXHR, textStatus, error) {
}
});
});
}
/**************************************************************************
* 차량번호로 민원상담 건수 조회
**************************************************************************/
static async countCvlcptDscsnByVhrno(vhrno, taskSeCd, sggCd){
return new Promise((resolve, reject) => {
json.get({
url: wctx.url("/"+taskSeCd+"/sprt/sprt04/010/nocs.do"),
data: {
vhrno : vhrno,
taskSeCd : taskSeCd,
sggCd : sggCd
},
success: function(resp, textStatus, jqXHR) {
resolve(resp);
},
error: function(jqXHR, textStatus, error) {
}
});
});
}
/**************************************************************************
* 시군구코드, 차량번호, 기준일자로 차적 조회
**************************************************************************/
static async getVhclInfo(sggCd, vhrno, levy_stdde){
return new Promise((resolve, reject) => {
json.post({
url: wctx.url("/payer/vehicle.do"),
data: {
sggCd : sggCd,
vhrno : vhrno,
levy_stdde : levy_stdde
},
success: function(resp, textStatus, jqXHR) {
resolve(resp);
},
error: function(jqXHR, textStatus, error) {
}
});
});
};
/**************************************************************************
* 장애인 차량여부 조회
**************************************************************************/
static async getVhclDisabledParkingInfo(vhrno){
return new Promise((resolve, reject) => {
json.get({
url: wctx.url("/intf/disabledParking/parkingInfo"),
data: {
vehicleNo : vhrno
},
success: function(resp, textStatus, jqXHR) {
resolve(resp);
},
error: function(jqXHR, textStatus, error) {
}
});
});
}
}

@ -33,84 +33,7 @@ function searchFromGridTitle(byValue, byOutputValue, mainOption, subOption){
} }
/**************************************************************************
* 차량번호로 단속 건수 조회
**************************************************************************/
async function countCrdnByVhrno(vhrno, taskSeCd, sggCd){
return new Promise((resolve, reject) => {
json.get({
url: wctx.url("/"+taskSeCd+"/crdn/crdn06/010/nocs.do"),
data: {
vhrno : vhrno,
taskSeCd : taskSeCd,
sggCd : sggCd
},
success: function(resp, textStatus, jqXHR) {
resolve(resp);
},
error: function(jqXHR, textStatus, error) {
}
});
});
}
/**************************************************************************
* 차량번호로 민원상담 건수 조회
**************************************************************************/
async function countCvlcptDscsnByVhrno(vhrno, taskSeCd, sggCd){
return new Promise((resolve, reject) => {
json.get({
url: wctx.url("/"+taskSeCd+"/sprt/sprt04/010/nocs.do"),
data: {
vhrno : vhrno,
taskSeCd : taskSeCd,
sggCd : sggCd
},
success: function(resp, textStatus, jqXHR) {
resolve(resp);
},
error: function(jqXHR, textStatus, error) {
}
});
});
}
/**************************************************************************
* 시군구코드, 차량번호, 기준일자로 차적 조회
**************************************************************************/
async function getVhclInfo(sggCd, vhrno, levy_stdde){
return new Promise((resolve, reject) => {
json.post({
url: wctx.url("/payer/vehicle.do"),
data: {
sggCd : sggCd,
vhrno : vhrno,
levy_stdde : levy_stdde
},
success: function(resp, textStatus, jqXHR) {
resolve(resp);
},
error: function(jqXHR, textStatus, error) {
}
});
});
};
/**************************************************************************
* 장애인 차량여부 조회
**************************************************************************/
async function getVhclDisabledParkingInfo(vhrno){
return new Promise((resolve, reject) => {
json.get({
url: wctx.url("/intf/disabledParking/parkingInfo"),
data: {
vehicleNo : vhrno
},
success: function(resp, textStatus, jqXHR) {
resolve(resp);
},
error: function(jqXHR, textStatus, error) {
}
});
});
}

Loading…
Cancel
Save