spa식으로 변경

dev_tymeleaf
jangwonseokicom 2 years ago
parent 24ba911482
commit dfea91edc8

@ -107,8 +107,8 @@ public class LoginService {
LoginVO userResult = user.toLoginVO(); LoginVO userResult = user.toLoginVO();
// return "forward:/adm/main/actionMain.do"; // return "forward:/adm/main/actionMain.do";
// return "layout/adm/common/dashboard";
return "layout/adm/common/dashboard"; return "layout/main";
} else { } else {
log.info("Fail!"); log.info("Fail!");
} }

@ -1,8 +1,4 @@
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<th:block layout:fragment="content">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>대시보드</title> <title>대시보드</title>
@ -120,5 +116,4 @@
</section> </section>
</body> </body>
</th:block>
</html> </html>

@ -1,8 +1,3 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<th:block layout:fragment="content">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>시나리오코드</title> <title>시나리오코드</title>
@ -77,12 +72,12 @@
fncDeleteCommonCode(); fncDeleteCommonCode();
}); });
// $('#listTable').on('page.dt', function(){ // $('#listTable').on('page.dt', function(){
// // var info = table.page.info(); // // var info = table.page.info();
// // console.log( 'Showing page: '+info.page+' of '+info.pages ); // // console.log( 'Showing page: '+info.page+' of '+info.pages );
// // console.log( 'Showing page: ' ); // // console.log( 'Showing page: ' );
// modalUi(); // modalUi();
// }); // });
} }
); );
@ -141,7 +136,7 @@
}); });
} }
function fncDeleteCommonCode(){ function fncDeleteCommonCode() {
var json = {}; var json = {};
var majorCode = $("#setMajorCode").val(); var majorCode = $("#setMajorCode").val();
var custCode = $("#setCustCode").val(); var custCode = $("#setCustCode").val();
@ -182,7 +177,7 @@
datatype: "JSON", datatype: "JSON",
async: false, async: false,
url: "<c:url value='/adm/menu/oprmng'/>" url: "<c:url value='/adm/menu/oprmng'/>"
// + "?serviceType=S" // + "?serviceType=S"
, ,
success: function (data) { success: function (data) {
data.forEach(function (e, f) { data.forEach(function (e, f) {
@ -340,8 +335,8 @@
// //
// if the second column cell is blank apply special formatting // if the second column cell is blank apply special formatting
// //
console.dir(row); console.dir(row);
$(row).addClass('modalLoad').attr('rel','reg_edit_modal'); $(row).addClass('modalLoad').attr('rel', 'reg_edit_modal');
} }
, ,
columnDefs: [ columnDefs: [
@ -534,7 +529,7 @@
<h2 class="mt12">공통 코드 리스트</h2> <h2 class="mt12">공통 코드 리스트</h2>
</div> </div>
<div class="btn_wrap fr"> <div class="btn_wrap fr">
<%-- <a href="#" class="btn grey" id="btnDelCust">삭제</a>--%> <%-- <a href="#" class="btn grey" id="btnDelCust">삭제</a>--%>
<a href="#" rel="reg_modal" id="btn_reg_modal" class="btn line modalLoad">등록</a> <a href="#" rel="reg_modal" id="btn_reg_modal" class="btn line modalLoad">등록</a>
</div> </div>
</div> </div>
@ -667,7 +662,9 @@
</dl> </dl>
<dl> <dl>
<%-- <dt><h4><em class="important">대분류</em></h4></dt>--%> <%--
<dt><h4><em class="important">대분류</em></h4></dt>
--%>
<dt><h4><em class="">대분류</em></h4></dt> <dt><h4><em class="">대분류</em></h4></dt>
<dd> <dd>
<div class="ipt_box"> <div class="ipt_box">
@ -728,5 +725,3 @@
<!-- modal :: 공통 코드 수정 팝업 end --> <!-- modal :: 공통 코드 수정 팝업 end -->
</body> </body>
</th:block>
</html>

@ -1,265 +1,258 @@
<!DOCTYPE html> <head>
<html xmlns:th="http://www.thymeleaf.org" <meta charset="UTF-8">
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" <title>고객사관리</title>
layout:decorate="~{layout/layout}"> </head>
<th:block layout:fragment="content">
<head>
<meta charset="UTF-8">
<title>고객사관리</title>
</head>
<script> <script>
$(document).ready(function () { $(document).ready(function () {
PagingDataTable(); PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () { $('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data(); var data = $('#listTable').DataTable().row(this).data();
viewPage(data) viewPage(data)
}); });
$('#btnSearchOpr').on('click', function () { $('#btnSearchOpr').on('click', function () {
fnCustSearchBtn(); fnCustSearchBtn();
}); });
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
$('#btnRegModal').on('click', function () { $("#Content").on("keyup", function (key) {
fnInsertBtn(); if (key.keyCode == 13) {
}); fnCustSearchBtn();
}
});
$('#btnRegModal').on('click', function () {
fnInsertBtn();
});
}
);
function viewPage(rowData) {
// console.log(rowData.custCode);
// alert("cust - " + rowData.custCode)
// document.location.href = "/BotMain_VM/admin/common/system/cust/update" + "?custCode=" + rowData.custCode;
document.location.href = '/view/admin/common/system/cust/update' + "?custCode=" + rowData.custCode;
// document.location.href = '/admin/common/system/cust/view';
} }
);
function viewPage(rowData) {
// console.log(rowData.custCode);
// alert("cust - " + rowData.custCode)
// document.location.href = "/BotMain_VM/admin/common/system/cust/update" + "?custCode=" + rowData.custCode;
document.location.href = '/view/admin/common/system/cust/update' + "?custCode=" + rowData.custCode;
// document.location.href = '/admin/common/system/cust/view';
}
function fnInsertBtn() {
// document.location.href = "/BotMain_VM/admin/common/system/cust/insert";
document.location.href = '/view/admin/common/system/cust/insert';
}
var PagingDataTable = function () { function fnInsertBtn() {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"})); // document.location.href = "/BotMain_VM/admin/common/system/cust/insert";
var paging = JSON.stringify({'page': 0, 'size': 10}) document.location.href = '/view/admin/common/system/cust/insert';
$('#listTable').DataTable( }
{
ajax: { var PagingDataTable = function () {
url: '/admin/common/system/cust/list', // console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
contentType: "application/json; charset=utf-8", var paging = JSON.stringify({'page': 0, 'size': 10})
type: "POST", $('#listTable').DataTable(
dataType: "JSON", {
data: function (data) { ajax: {
var json = {}; url: '/admin/common/system/cust/list',
if (data) { contentType: "application/json; charset=utf-8",
json.page = data.start / data.length; type: "POST",
json.size = 10 dataType: "JSON",
json.codeText = $('#codeText').val(); data: function (data) {
} else { var json = {};
json = JSON.stringify({'page': 0, 'size': 10}); if (data) {
} json.page = data.start / data.length;
return JSON.stringify(json); json.size = 10
} json.codeText = $('#codeText').val();
, } else {
dataFilter: function (data) { json = JSON.stringify({'page': 0, 'size': 10});
var jsons = jQuery.parseJSON(data);
// console.log(JSON.stringify(data));
var json = {};
json.recordsTotal = jsons.getTotal;
json.recordsFiltered = jsons.getTotal;
json.data = jsons.getList;
// console.log(json);
return JSON.stringify(json);
} }
}, return JSON.stringify(json);
columns: [ }
{data: "custCode"}, ,
{data: "custName"}, dataFilter: function (data) {
{data: "custServiceMent"}, var jsons = jQuery.parseJSON(data);
{data: "custTel"}, // console.log(JSON.stringify(data));
{data: "useYn"}, var json = {};
{data: "registDate"} json.recordsTotal = jsons.getTotal;
// {data: "registId"}, json.recordsFiltered = jsons.getTotal;
// {data: "updateDate"}, json.data = jsons.getList;
// {data: "updateId"}, // console.log(json);
return JSON.stringify(json);
}
},
columns: [
{data: "custCode"},
{data: "custName"},
{data: "custServiceMent"},
{data: "custTel"},
{data: "useYn"},
{data: "registDate"}
// {data: "registId"},
// {data: "updateDate"},
// {data: "updateId"},
], ],
order: [0, "asc"], order: [0, "asc"],
scrollX: false, scrollX: false,
scrollY: false, scrollY: false,
autoWidth: false, autoWidth: false,
searching: false, searching: false,
bProcessing: false, bProcessing: false,
sProcessing: false, sProcessing: false,
bServerSide: true, bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>', sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
// pagingType: "first_last_numbers" // pagingType: "first_last_numbers"
columnDefs: [ columnDefs: [
{ {
targets: 0, targets: 0,
visible: false, visible: false,
searchable: false, searchable: false,
orderable: false, orderable: false,
render: function (data) { render: function (data) {
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>'; return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
}, },
{ },
targets: 3, {
orderable: false, targets: 1,
render: function (data) { orderable: false,
return '<a style="display: block;text-align: center;">' + data + '</a>'; render: function (data) {
} return '<a style="display: block;text-align: center;">' + data + '</a>';
},
{
targets: 4,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 5,
orderable: false,
render: function (data, type, full, meta) {
// var arr = data.slice();
// return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
}
} }
] },
} {
) targets: 2,
}; visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 3,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 5,
orderable: false,
render: function (data, type, full, meta) {
// var arr = data.slice();
// return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
}
}
]
}
)
};
function fnCustSearchBtn() { function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload(); $('#listTable').DataTable().ajax.reload();
}; };
</script> </script>
<body> <body>
<h1>ICOMSYS ADMIN</h1> <h1>ICOMSYS ADMIN</h1>
<h1>대시보드</h1> <h1>대시보드</h1>
<div class="skip_navigation"> <div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<section id="Content" class="system_management">
<div class="location">
<ul> <ul>
<li> <li class="home"><a href="#">HOME</a></li>
<a href="#Content" class="go_content">본문 바로가기</a> <li><a href="#">시스템관리</a></li>
</li> <li><a href="#">고객사 관리</a></li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul> </ul>
</div> </div>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">고객사 관리</a></li>
</ul>
</div>
<div class="sub_cont menu06_01_03"> <div class="sub_cont menu06_01_03">
<div class="cont_box"> <div class="cont_box">
<div class="box_title"> <div class="box_title">
<div class="fl"> <div class="fl">
<h2 class="mt12">고객사 조회</h2> <h2 class="mt12">고객사 조회</h2>
</div> </div>
<div class="fr"> <div class="fr">
<div class="btn_wrap fl"> <div class="btn_wrap fl">
<a href="#" id="btnSearchOpr" class="btn">조회</a> <a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
</div> </div>
</div> </div>
<div class="tbl"> </div>
<table class="search block"> <div class="tbl">
<colgroup> <table class="search block">
<col width="140px"> <colgroup>
<col width="85%"> <col width="140px">
</colgroup> <col width="85%">
<tbody> </colgroup>
<tr> <tbody>
<th class="tl">고객사명</th> <tr>
<td> <th class="tl">고객사명</th>
<div class="ipt_box listen"> <td>
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText"> <div class="ipt_box listen">
</div> <input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</td> </div>
</tr> </td>
</tr>
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
<div class="cont_box"> </div>
<div class="box_title"> <div class="cont_box">
<div class="fl"> <div class="box_title">
<h2 class="mt12">고객사 리스트</h2> <div class="fl">
</div> <h2 class="mt12">고객사 리스트</h2>
<div class="btn_wrap fr">
<a href="#" class="btn line modalLoad" id="btnRegModal">등록</a>
</div>
</div> </div>
<div class="btn_wrap fr">
<a href="#" class="btn line modalLoad" id="btnRegModal">등록</a>
</div>
</div>
<div class="tbl"> <div class="tbl">
<form id="custListForm"> <form id="custListForm">
<table id="listTable" class=""> <table id="listTable" class="">
<colgroup> <colgroup>
<col width="auto"> <col width="auto">
<!-- <col width="auto">--> <!-- <col width="auto">-->
<!-- <col width="auto">--> <!-- <col width="auto">-->
<col width="auto"> <col width="auto">
<col width="auto"> <col width="auto">
<col width="auto"> <col width="auto">
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr>
<!-- <th>고객사코드</th>--> <!-- <th>고객사코드</th>-->
<th>고객사명</th> <th>고객사명</th>
<th>고객사안내멘트</th> <th>고객사안내멘트</th>
<!-- <th>대표번호</th>--> <!-- <th>대표번호</th>-->
<th>사용유무</th> <th>사용유무</th>
<th>생성일</th> <th>생성일</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
</tbody> </tbody>
</table> </table>
</form> </form>
</div>
</div> </div>
</div> </div>
</section> </div>
</body> </section>
</th:block> </body>
</html>

@ -1,529 +1,521 @@
<!DOCTYPE html> <head>
<html xmlns:th="http://www.thymeleaf.org" <meta charset="UTF-8">
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" <title>그룹별권한</title>
layout:decorate="~{layout/layout}"> </head>
<th:block layout:fragment="content">
<script>
<head>
<meta charset="UTF-8"> $(document).ready(function () {
<title>그룹별권한</title> getOpr();
</head> PagingDataTable();
// newTreeWrap();
<script> $('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data()
$(document).ready(function () { // console.log(JSON.stringify(data))
getOpr(); viewPage(data);
PagingDataTable(); });
// newTreeWrap();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data()
// console.log(JSON.stringify(data))
viewPage(data);
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
//모달창 저장버튼
$('#btnRegModal').on('click', function () {
fnInsertBtn();
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
//선택 이벤트 $("#Content").on("keyup", function (key) {
$('#insertServiceGroup').change(function () { if (key.keyCode == 13) {
getRoleAndOpr($(this).val()); fnCustSearchBtn();
});
}
);
function getRoleAndOpr() {
var role = '';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: '/adm/menu/role',
success: function (data) {
role = data;
} }
}) });
// console.log("aaaa - "+role)
var service = $('#insertServiceGroup option:selected').val();
// console.log(service);
newTreeWrap(service);
return role;
};
function getOpr() { //모달창 저장버튼
$('#btnRegModal').on('click', function () {
fnInsertBtn();
});
var setUrl = '';
var role = getRoleAndOpr();
// console.log(role)
if (role === 'SYSTEMADMIN') {
setUrl = '/adm/menu/oprmng';
} else {
setUrl = '/adm/menu/oprmng'
// + "?serviceType=S"
;
}
var html = '<option value="' + "ALL" + '">' + "전체" + '</option>'; //선택 이벤트
$.ajax({ $('#insertServiceGroup').change(function () {
type: "GET", getRoleAndOpr($(this).val());
contentType: "application/json; charset=utf-8", });
datatype: "JSON",
async: false,
url: setUrl,
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';
});
}
})
$('#serviceGroup').html(html);
$('#serviceGroup').niceSelect('update');
$('#insertServiceGroup').html(html);
$('#insertServiceGroup').niceSelect('update');
};
function viewPage(rowData) {
document.location.href = '/view/admin/common/system/groupAuth/update' + "?authGroupSeq=" + rowData.authGroupSeq;
// document.location.href = "/BotMain_VM/admin/common/system/groupAuth/update" + "?authGroupSeq=" + rowData.authGroupSeq;
} }
);
function getRoleAndOpr() {
var role = '';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: '/adm/menu/role',
success: function (data) {
role = data;
}
})
// console.log("aaaa - "+role)
var service = $('#insertServiceGroup option:selected').val();
// console.log(service);
newTreeWrap(service);
return role;
function fnInsertBtn() { };
// document.location.href = "/BotMain_VM/admin/common/system/groupAuth/insert";
var insertServiceGroup = $('#insertServiceGroup').val();
var insertGroupName = $('#insertGroupName').val();
var insertGroupDesc = $('#insertGroupDesc').val();
var selectedElms = $("#newTreeWrap").jstree("get_selected", true);
var selectedElmsIds = [] function getOpr() {
$.each(selectedElms, function () {
selectedElmsIds.push(this.id);
});
// console.log(insertServiceGroup);
// console.log(insertGroupName);
// console.log(insertGroupDesc);
// console.log(selectedElmsIds.length);
if (insertServiceGroup === "ALL") {
// $.utils.success("사용가능합니다");
$.utils.warning("시나리오그룹을 선택해주세요.");
return;
}
if (insertGroupName.length < 1) {
$.utils.warning("권한그룹명을 선택해주세요.");
return;
}
if (selectedElmsIds.length < 1) { var setUrl = '';
$.utils.warning("정책을 1개이상 선택해주세요."); var role = getRoleAndOpr();
return; // console.log(role)
} if (role === 'SYSTEMADMIN') {
var insertJson = {}; setUrl = '/adm/menu/oprmng';
insertJson.insertServiceGroup = insertServiceGroup; } else {
insertJson.insertGroupName = insertGroupName; setUrl = '/adm/menu/oprmng'
insertJson.insertGroupDesc = insertGroupDesc; // + "?serviceType=S"
insertJson.subPolicyVal = selectedElmsIds;
insertJson.subUseYn = 'Y';
// console.log("jsondata - " + JSON.stringify(insertJson));
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: '/admin/common/system/groupAuth/insert',
data: JSON.stringify(insertJson),
})
.complete(function (data) {
// console.log(JSON.stringify(data));
// console.log(data.status);
if (data.status == 200) {
// document.location.href = "/BotMain_VM/admin/common/system/groupAuth/manage.do";
document.location.href = '/view/admin/common/system/groupAuth/manage.do';
} else {
// console.log(JSON.stringify(this));
}
})
; ;
} }
var html = '<option value="' + "ALL" + '">' + "전체" + '</option>';
///!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!수정!!!!!!!!! $.ajax({
function newTreeWrap(serviceGroup) { type: "GET",
contentType: "application/json; charset=utf-8",
if (serviceGroup === 'ALL') { datatype: "JSON",
return; async: false,
url: setUrl,
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';
});
} }
var treeData = []; })
$('#serviceGroup').html(html);
setUrl = '/admin/common/system/groupAuth/newTree' + "?serviceGroup=" + serviceGroup; $('#serviceGroup').niceSelect('update');
$.ajax({ $('#insertServiceGroup').html(html);
type: "GET", $('#insertServiceGroup').niceSelect('update');
contentType: "application/json; charset=utf-8", };
datatype: "JSON",
url: setUrl, function viewPage(rowData) {
async: false, document.location.href = '/view/admin/common/system/groupAuth/update' + "?authGroupSeq=" + rowData.authGroupSeq;
success: function (data) { // document.location.href = "/BotMain_VM/admin/common/system/groupAuth/update" + "?authGroupSeq=" + rowData.authGroupSeq;
var mainMenu = data.mainMenu; }
var policyParent = data.policyParent;
mainMenu.forEach(function (e, i) {
treeData[i] = { function fnInsertBtn() {
id: e.authName, // document.location.href = "/BotMain_VM/admin/common/system/groupAuth/insert";
parent: policyParent[e.authName],
text: e.menuName, var insertServiceGroup = $('#insertServiceGroup').val();
state: { var insertGroupName = $('#insertGroupName').val();
opened: false, var insertGroupDesc = $('#insertGroupDesc').val();
selected: true var selectedElms = $("#newTreeWrap").jstree("get_selected", true);
}
}; var selectedElmsIds = []
}); $.each(selectedElms, function () {
selectedElmsIds.push(this.id);
});
// console.log(insertServiceGroup);
// console.log(insertGroupName);
// console.log(insertGroupDesc);
// console.log(selectedElmsIds.length);
if (insertServiceGroup === "ALL") {
// $.utils.success("사용가능합니다");
$.utils.warning("시나리오그룹을 선택해주세요.");
return;
}
// $('#newTreeWrap').jstree(true).settings.core.data = treeData; if (insertGroupName.length < 1) {
// $('#newTreeWrap').jstree(true).refresh(); $.utils.warning("권한그룹명을 선택해주세요.");
return;
setTimeout(() => { }
$('#newTreeWrap').jstree({
'core': {
'data': treeData
},
"checkbox": {
"keep_selected_style": false
, "three_state": false
},
"plugins": ["checkbox"]
});
}, "1")
// $('#newTreeWrap').jstree(true).settings.core.data = treeData;
$('#newTreeWrap').jstree('refresh');
if (selectedElmsIds.length < 1) {
$.utils.warning("정책을 1개이상 선택해주세요.");
return;
}
var insertJson = {};
insertJson.insertServiceGroup = insertServiceGroup;
insertJson.insertGroupName = insertGroupName;
insertJson.insertGroupDesc = insertGroupDesc;
insertJson.subPolicyVal = selectedElmsIds;
insertJson.subUseYn = 'Y';
// console.log("jsondata - " + JSON.stringify(insertJson));
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: '/admin/common/system/groupAuth/insert',
data: JSON.stringify(insertJson),
})
.complete(function (data) {
// console.log(JSON.stringify(data));
// console.log(data.status);
if (data.status == 200) {
// document.location.href = "/BotMain_VM/admin/common/system/groupAuth/manage.do";
document.location.href = '/view/admin/common/system/groupAuth/manage.do';
} else {
// console.log(JSON.stringify(this));
} }
}); })
;
}
///!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!수정!!!!!!!!!
function newTreeWrap(serviceGroup) {
if (serviceGroup === 'ALL') {
return;
} }
var treeData = [];
setUrl = '/admin/common/system/groupAuth/newTree' + "?serviceGroup=" + serviceGroup;
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: setUrl,
async: false,
success: function (data) {
var mainMenu = data.mainMenu;
var policyParent = data.policyParent;
mainMenu.forEach(function (e, i) {
treeData[i] = {
id: e.authName,
parent: policyParent[e.authName],
text: e.menuName,
state: {
opened: false,
selected: true
}
};
});
// $('#newTreeWrap').jstree(true).settings.core.data = treeData;
// $('#newTreeWrap').jstree(true).refresh();
var PagingDataTable = function () { setTimeout(() => {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"})); $('#newTreeWrap').jstree({
var paging = JSON.stringify({'page': 0, 'size': 10}) 'core': {
$('#listTable').DataTable( 'data': treeData
{
ajax: {
url: '/admin/common/system/groupAuth/list',
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "JSON",
async: false,
data: function (data) {
var json = {};
if (data) {
json.page = data.start / data.length;
json.size = 10;
json.serviceGroup = $("#serviceGroup option:selected").val();
json.codeText = $('#codeText').val();
} else {
json = JSON.stringify({'page': 0, 'size': 10});
}
return JSON.stringify(json);
}
,
dataFilter: function (data) {
var jsons = jQuery.parseJSON(data);
// console.log(JSON.stringify(data));
var json = {};
json.recordsTotal = jsons.getTotal;
json.recordsFiltered = jsons.getTotal;
json.data = jsons.getList;
// console.log(json);
return JSON.stringify(json);
}
},
order: [0, "asc"],
scrollX: false,
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: true,
sProcessing: true,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
columns: [
{data: "serviceGroup"},
{data: "serviceGroupName"},
{data: "authGroupSeq"},
{data: "policyGroupName"},
{data: "policyGroupDesc"},
{data: "custCode"},
{data: "registDate"}
],
columnDefs: [
{
targets: 0,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
}, },
{ "checkbox": {
targets: 2, "keep_selected_style": false
visible: false, , "three_state": false
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
}, },
{ "plugins": ["checkbox"]
targets: 3, });
orderable: false, }, "1")
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 5,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a hidden="hidden">' + data + '</a>';
}
},
{
targets: 6,
orderable: false,
render: function (data, type, full, meta) {
// var arr = data.slice();
// return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
}
}
]
}
)
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
</script>
<body> // $('#newTreeWrap').jstree(true).settings.core.data = treeData;
$('#newTreeWrap').jstree('refresh');
<h1>ICOMSYS ADMIN</h1> }
<h1>대시보드</h1> });
<div class="skip_navigation">
}
var PagingDataTable = function () {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
var paging = JSON.stringify({'page': 0, 'size': 10})
$('#listTable').DataTable(
{
ajax: {
url: '/admin/common/system/groupAuth/list',
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "JSON",
async: false,
data: function (data) {
var json = {};
if (data) {
json.page = data.start / data.length;
json.size = 10;
json.serviceGroup = $("#serviceGroup option:selected").val();
json.codeText = $('#codeText').val();
} else {
json = JSON.stringify({'page': 0, 'size': 10});
}
return JSON.stringify(json);
}
,
dataFilter: function (data) {
var jsons = jQuery.parseJSON(data);
// console.log(JSON.stringify(data));
var json = {};
json.recordsTotal = jsons.getTotal;
json.recordsFiltered = jsons.getTotal;
json.data = jsons.getList;
// console.log(json);
return JSON.stringify(json);
}
},
order: [0, "asc"],
scrollX: false,
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: true,
sProcessing: true,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
columns: [
{data: "serviceGroup"},
{data: "serviceGroupName"},
{data: "authGroupSeq"},
{data: "policyGroupName"},
{data: "policyGroupDesc"},
{data: "custCode"},
{data: "registDate"}
],
columnDefs: [
{
targets: 0,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 3,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 5,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a hidden="hidden">' + data + '</a>';
}
},
{
targets: 6,
orderable: false,
render: function (data, type, full, meta) {
// var arr = data.slice();
// return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
}
}
]
}
)
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
</script>
<body>
<h1>ICOMSYS ADMIN</h1>
<h1>대시보드</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="system_management">
<div class="location">
<ul> <ul>
<li> <li class="home"><a href="#">HOME</a></li>
<a href="#Content" class="go_content">본문 바로가기</a> <li><a href="#">시스템관리</a></li>
</li> <li><a href="#">그룹별권한 관리</a></li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul> </ul>
</div> </div>
<header id="header"> <div class="sub_cont menu06_01_03">
</header> <div class="cont_box">
<section id="Content" class="system_management"> <div class="box_title">
<div class="location"> <div class="fl">
<ul> <h2 class="mt12">그룹별권한 조회</h2>
<li class="home"><a href="#">HOME</a></li> </div>
<li><a href="#">시스템관리</a></li> <div class="fr">
<li><a href="#">그룹별권한 관리</a></li> <div class="btn_wrap fl">
</ul> <a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
<div class="sub_cont menu06_01_03">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">그룹별권한 조회</h2>
</div>
<div class="fr">
<div class="btn_wrap fl">
<a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
</div> </div>
</div> </div>
</div>
<div class="tbl"> <div class="tbl">
<table class="search block"> <table class="search block">
<colgroup>
<col width="160px">
<col width="5%">
<col width="140px">
<col width="15%">
</colgroup>
<tbody>
<tr>
<th class="tl">시나리오그룹</th>
<td colspan="5">
<div class="sel_box">
<select id="serviceGroup" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</td>
<th class="tl">권한명</th>
<td colspan="5">
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">그룹별권한 리스트</h2>
</div>
<div class="btn_wrap fr">
<a href="#" rel="createGroupModal" class="btn line modalLoad">등록</a>
</div>
</div>
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup> <colgroup>
<col width="160px"> <col width="auto">
<col width="5%"> <col width="auto">
<col width="140px"> <col width="auto">
<col width="15%"> <col width="auto">
<col width="auto">
<col width="auto">
</colgroup> </colgroup>
<tbody> <thead>
<tr> <tr>
<th class="tl">시나리오그룹</th> <th>서비스코드</th>
<td colspan="5"> <th>시나리오그룹명</th>
<div class="sel_box"> <th>권한번호</th>
<select id="serviceGroup" class="wide"> <th>권한명</th>
<option value="ALL">전체</option> <th>권한설명</th>
</select> <th>고객사코드</th>
</div> <th>생성일</th>
</td>
<th class="tl">권한명</th>
<td colspan="5">
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr> </tr>
</thead>
<tbody>
</tbody> </tbody>
</table> </table>
</div> </form>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">그룹별권한 리스트</h2>
</div>
<div class="btn_wrap fr">
<a href="#" rel="createGroupModal" class="btn line modalLoad">등록</a>
</div>
</div>
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup>
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
</colgroup>
<thead>
<tr>
<th>서비스코드</th>
<th>시나리오그룹명</th>
<th>권한번호</th>
<th>권한명</th>
<th>권한설명</th>
<th>고객사코드</th>
<th>생성일</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</div> </div>
</div> </div>
</section> </div>
</section>
<!-- modal :: 권한그룹생성 --> <!-- modal :: 권한그룹생성 -->
<div class="modal" id="createGroupModal"> <div class="modal" id="createGroupModal">
<div class="modal_header"> <div class="modal_header">
<h3>권한그룹 생성</h3> <h3>권한그룹 생성</h3>
</div> </div>
<div class="modal_body"> <div class="modal_body">
<div class="modal_cont"> <div class="modal_cont">
<input type="hidden" id="custCode"> <input type="hidden" id="custCode">
<dl> <dl>
<dt> <dt>
<h4><em class="">시나리오그룹</em></h4> <h4><em class="">시나리오그룹</em></h4>
</dt> </dt>
<dd> <dd>
<div class="sel_box"> <div class="sel_box">
<select id="insertServiceGroup" class="wide"> <select id="insertServiceGroup" class="wide">
<option value="ALL">전체</option> <option value="ALL">전체</option>
</select> </select>
</div> </div>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt> <dt>
<h4><em class="">그룹명</em></h4> <h4><em class="">그룹명</em></h4>
</dt> </dt>
<dd> <dd>
<div class="ipt_box"> <div class="ipt_box">
<input type="text" id="insertGroupName" placeholder="그룹명을 입력해주세요."> <input type="text" id="insertGroupName" placeholder="그룹명을 입력해주세요.">
</div> </div>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt> <dt>
<h4><em class="">그룹설명</em></h4> <h4><em class="">그룹설명</em></h4>
</dt> </dt>
<dd> <dd>
<div class="ipt_box"> <div class="ipt_box">
<input type="text" id="insertGroupDesc" placeholder="그룹 설명을 입력해주세요."> <input type="text" id="insertGroupDesc" placeholder="그룹 설명을 입력해주세요.">
</div> </div>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt> <dt>
<h4><em class="">권한선택</em></h4> <h4><em class="">권한선택</em></h4>
</dt> </dt>
<dd> <dd>
<div class="content tree tree-maxHeight type-chk"> <div class="content tree tree-maxHeight type-chk">
<div class="newTreeWrap" id="newTreeWrap"> <div class="newTreeWrap" id="newTreeWrap">
</div>
</div> </div>
</dd> </div>
</dl> </dd>
</div> </dl>
</div>
<div class="modal_footer">
<div class="btn_wrap fr">
<a href="#" id="btnRegModal" class="btn">저장</a>
</div>
</div> </div>
<div class="modal_controller">
<a href="#" class="close">close</a> </div>
<div class="modal_footer">
<div class="btn_wrap fr">
<a href="#" id="btnRegModal" class="btn">저장</a>
</div> </div>
</div> </div>
<div class="modal_controller">
<a href="#" class="close">close</a>
</div>
</div>
</body> </body>
</th:block>
</html>

@ -1,426 +1,418 @@
<!DOCTYPE html> <head>
<html xmlns:th="http://www.thymeleaf.org" <meta charset="UTF-8">
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" <title>그룹별권한</title>
layout:decorate="~{layout/layout}"> </head>
<th:block layout:fragment="content">
<head>
<meta charset="UTF-8">
<title>그룹별권한</title>
</head>
<script>
$(document).ready(function () {
getOpr();
getQueryString();
getGroupAuthUpdateData();
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
getUserSearch()
}
});
//유저조회
$('#btnSearchUser').on('click', function () {
getUserSearch()
// $('#serviceInfo').reset();
});
//유저 선택 이벤트
$('#selectorUser').change(function () {
userAdd($(this).val(), $('#selectorUser option:selected').text())
});
$('#btnSave').on('click', function () {
// console.log("저장클릭")
ServiceGroupAuthModifyUpdate();
});
$('#btnDel').on('click', function () {
// console.log("취소버튼");
delBtn();
});
}
);
function delBtn() {
listgo();
}
function listgo() { <script>
document.location.href = '/view/admin/common/system/groupAuth/manage.do';
}
function getUserSearch() {
$(document).ready(function () {
getOpr();
getQueryString(); getQueryString();
var json = {}; getGroupAuthUpdateData();
var searchText = $('#userSelBox').val(); $("#Content").on("keyup", function (key) {
json.userSearchText = searchText; if (key.keyCode == 13) {
$('#selectorUser').html(""); getUserSearch()
$('#selectorUser').niceSelect('update'); }
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
async: false,
datatype: "JSON",
// url: "/BotMain_VM/admin/common/system/groupAuth/userSearch" + "?authGroupSeq=" + getQueryString(),
url: '/admin/common/system/groupAuth/userSearch' + "?authGroupSeq=" + getQueryString(),
data: JSON.stringify(json),
success:
function (data) {
// console.log("datasss " + JSON.stringify(data))
var html = "";
data.forEach(function (e, i) {
html += "<option value=" + e.userSeq + ">" + e.userName + ' (' + e.userId + ')' + "</option>";
});
$('#selectorUser').html(html);
$('#selectorUser').niceSelect('update');
}
})
}
function ServiceGroupAuthModifyUpdate() {
var selectedElmsIds = [];
var selectedElms = $("#tree_wrap").jstree("get_selected", true);
$.each(selectedElms, function () {
selectedElmsIds.push(this.id);
}); });
//유저조회
$('#btnSearchUser').on('click', function () {
getUserSearch()
// $('#serviceInfo').reset();
});
var userList = []; //유저 선택 이벤트
var delList = []; $('#selectorUser').change(function () {
$("#list-user-group-box-ul-list").children('li').each(function (i, e) { userAdd($(this).val(), $('#selectorUser option:selected').text())
var ids = $(this).find("div").find("a").attr("id").replaceAll("userseq", "") });
userList.push(ids)
// console.log("3 = " + ids)
})
$("#list-user-group-box-ul-delete").children('li').each(function (i, e) {
var ids = $(this).find("div").find("a").attr("id").replaceAll("userseq", "")
delList.push(ids)
// console.log("3 = " + ids)
})
// console.log("lasddlasldqwle = " + JSON.stringify(lasddlasldqwle))
var authSeq = $('#authGroupSeq').val();
var json = {};
json.custCode = $('#custCode').val();
json.authGroupSeq = authSeq;
json.policyGroupName = $('#updateGroupName').val();
json.policyGroupDesc = $('#updateGroupDesc').val();
json.theUser = userList;
json.delUser = delList;
json.thePolicy = selectedElmsIds;
// console.log("saveData = " + JSON.stringify(json))
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
// url: "/BotMain_VM/admin/common/system/groupAuth/modify/update",
url: '/admin/common/system/groupAuth/modify/update',
data: JSON.stringify(json),
success:
function (data) {
// console.log("modfu suc - ");
// document.location.href = "/BotMain_VM/admin/common/system/groupAuth/update" + "?authGroupSeq=" + getQueryString();
document.location.href = '/view/admin/common/system/groupAuth/manage.do';
}
})
}
$('#btnSave').on('click', function () {
// console.log("저장클릭")
ServiceGroupAuthModifyUpdate();
});
function getQueryString() { $('#btnDel').on('click', function () {
var param = new URLSearchParams(location.search).get("authGroupSeq"); // console.log("취소버튼");
// console.log(param) delBtn();
return param; });
} }
);
function getOpr() {
$.ajax({ function delBtn() {
type: "GET", listgo();
contentType: "application/json; charset=utf-8", }
async: false,
datatype: "JSON", function listgo() {
url: '/adm/menu/oprmng', document.location.href = '/view/admin/common/system/groupAuth/manage.do';
success: function (data) { }
// console.log(JSON.stringify(data));
data.forEach(function (e, f) { function getUserSearch() {
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#serviceGroup').niceSelect('update'); getQueryString();
var json = {};
var searchText = $('#userSelBox').val();
json.userSearchText = searchText;
$('#selectorUser').html("");
$('#selectorUser').niceSelect('update');
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
async: false,
datatype: "JSON",
// url: "/BotMain_VM/admin/common/system/groupAuth/userSearch" + "?authGroupSeq=" + getQueryString(),
url: '/admin/common/system/groupAuth/userSearch' + "?authGroupSeq=" + getQueryString(),
data: JSON.stringify(json),
success:
function (data) {
// console.log("datasss " + JSON.stringify(data))
var html = "";
data.forEach(function (e, i) {
html += "<option value=" + e.userSeq + ">" + e.userName + ' (' + e.userId + ')' + "</option>";
}); });
$('#selectorUser').html(html);
$('#selectorUser').niceSelect('update');
} }
}) })
}; }
function ServiceGroupAuthModifyUpdate() {
function getGroupAuthUpdateData() {
var authGroupSeq = "authGroupSeq=" + getQueryString(); var selectedElmsIds = [];
$.ajax({ var selectedElms = $("#tree_wrap").jstree("get_selected", true);
type: "GET", $.each(selectedElms, function () {
contentType: "application/json; charset=utf-8", selectedElmsIds.push(this.id);
async: false, });
datatype: "JSON",
data: authGroupSeq,
url: '/admin/common/system/groupAuth/update/select', var userList = [];
success: function (data) { var delList = [];
// console.log(data.authGroupSeq); $("#list-user-group-box-ul-list").children('li').each(function (i, e) {
// console.log(data.authPolicyVal); var ids = $(this).find("div").find("a").attr("id").replaceAll("userseq", "")
$('#custCode').val(data.custCode); userList.push(ids)
$('#authGroupSeq').val(data.authGroupSeq); // console.log("3 = " + ids)
$('#updateGroupName').val(data.policyGroupName); })
$('#updateGroupDesc').val(data.policyGroupDesc);
treeWrap(data.authPolicyVal, data.mainMenu, data.policyParent); $("#list-user-group-box-ul-delete").children('li').each(function (i, e) {
$('#list-user-group-box-ul-list').html(userList(data.userList)) var ids = $(this).find("div").find("a").attr("id").replaceAll("userseq", "")
delList.push(ids)
// console.log("3 = " + ids)
})
// console.log("lasddlasldqwle = " + JSON.stringify(lasddlasldqwle))
var authSeq = $('#authGroupSeq').val();
var json = {};
json.custCode = $('#custCode').val();
json.authGroupSeq = authSeq;
json.policyGroupName = $('#updateGroupName').val();
json.policyGroupDesc = $('#updateGroupDesc').val();
json.theUser = userList;
json.delUser = delList;
json.thePolicy = selectedElmsIds;
// console.log("saveData = " + JSON.stringify(json))
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
// url: "/BotMain_VM/admin/common/system/groupAuth/modify/update",
url: '/admin/common/system/groupAuth/modify/update',
data: JSON.stringify(json),
success:
function (data) {
// console.log("modfu suc - ");
// document.location.href = "/BotMain_VM/admin/common/system/groupAuth/update" + "?authGroupSeq=" + getQueryString();
document.location.href = '/view/admin/common/system/groupAuth/manage.do';
} }
}) })
};
}
function userList(data) {
// console.log(JSON.stringify(data));
var html = ''; function getQueryString() {
data.forEach(function (e, i) { var param = new URLSearchParams(location.search).get("authGroupSeq");
var setUserSeq = e.userSeq; // console.log(param)
var setUserIdName = e.userName; return param;
var setUserId = e.userId; }
html
+= ' <li class="select2-selection__choice" id="' + 'userLi' + setUserSeq + '">'
+ ' <div class="chk_box">' function getOpr() {
+ ' <a id="' + 'userseq' + setUserSeq + '"' $.ajax({
+ 'href="javascript:ListToDelete(' + setUserSeq + ')" >' type: "GET",
+ setUserIdName + ' (' + setUserId + ')' + '</a>' contentType: "application/json; charset=utf-8",
+ '</div>' async: false,
+ ' </li>' datatype: "JSON",
}); url: '/adm/menu/oprmng',
return html; success: function (data) {
} // console.log(JSON.stringify(data));
data.forEach(function (e, f) {
function userAdd(seq, val) { $('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
var html = ''; $('#serviceGroup').niceSelect('update');
var userlist = $('#list-user-group-box-ul-list').children('li').attr("id"); });
}
html })
+= ' <li class="select2-selection__choice" id="' + 'userLi' + seq + '">' };
+ ' <div class="chk_box">'
+ ' <a id="' + 'userseq' + seq + '"'
+ 'href="javascript:ListToDelete(' + seq + ')" >' function getGroupAuthUpdateData() {
+ val + '</a>' var authGroupSeq = "authGroupSeq=" + getQueryString();
+ '</div>' $.ajax({
+ ' </li>' type: "GET",
$('#userLi' + seq).remove(); contentType: "application/json; charset=utf-8",
$('#list-user-group-box-ul-list').prepend(html); async: false,
// $('#selectorUser').removeAttr(seq); datatype: "JSON",
$('#selectorUser' + 'option[value=' + seq + ']').remove(); data: authGroupSeq,
$('#selectorUser').niceSelect('update'); url: '/admin/common/system/groupAuth/update/select',
success: function (data) {
// console.log(data.authGroupSeq);
} // console.log(data.authPolicyVal);
$('#custCode').val(data.custCode);
$('#authGroupSeq').val(data.authGroupSeq);
function ListToDelete(setUserSeq) { $('#updateGroupName').val(data.policyGroupName);
var setVal = $('#userseq' + setUserSeq).text(); $('#updateGroupDesc').val(data.policyGroupDesc);
var html = ''; treeWrap(data.authPolicyVal, data.mainMenu, data.policyParent);
html $('#list-user-group-box-ul-list').html(userList(data.userList))
+= ' <li class="select2-selection__choice" id="' + 'userLi' + setUserSeq + '">' }
+ ' <div class="chk_box">' })
+ ' <a id="' + 'userseq' + setUserSeq + '"' };
+ 'href="javascript:DeleteToList(' + setUserSeq + ')" >'
+ setVal + '</a>' function userList(data) {
+ '</div>' // console.log(JSON.stringify(data));
+ ' </li>'; var html = '';
$('#userLi' + setUserSeq).remove(); data.forEach(function (e, i) {
$('#list-user-group-box-ul-delete').append(html); var setUserSeq = e.userSeq;
var setUserIdName = e.userName;
} var setUserId = e.userId;
function DeleteToList(setUserSeq) {
var setVal = $('#userseq' + setUserSeq).text();
var html = '';
html html
+= ' <li class="select2-selection__choice" id="' + 'userLi' + setUserSeq + '">' += ' <li class="select2-selection__choice" id="' + 'userLi' + setUserSeq + '">'
+ ' <div class="chk_box">' + ' <div class="chk_box">'
+ ' <a id="' + 'userseq' + setUserSeq + '"' + ' <a id="' + 'userseq' + setUserSeq + '"'
+ 'href="javascript:ListToDelete(' + setUserSeq + ')" >' + 'href="javascript:ListToDelete(' + setUserSeq + ')" >'
+ setVal + '</a>' + setUserIdName + ' (' + setUserId + ')' + '</a>'
+ '</div>' + '</div>'
+ ' </li>'; + ' </li>'
$('#userLi' + setUserSeq).remove(); });
$('#list-user-group-box-ul-list').append(html); return html;
}
}
function userAdd(seq, val) {
var html = '';
var userlist = $('#list-user-group-box-ul-list').children('li').attr("id");
html
+= ' <li class="select2-selection__choice" id="' + 'userLi' + seq + '">'
+ ' <div class="chk_box">'
+ ' <a id="' + 'userseq' + seq + '"'
+ 'href="javascript:ListToDelete(' + seq + ')" >'
+ val + '</a>'
+ '</div>'
+ ' </li>'
$('#userLi' + seq).remove();
$('#list-user-group-box-ul-list').prepend(html);
// $('#selectorUser').removeAttr(seq);
$('#selectorUser' + 'option[value=' + seq + ']').remove();
$('#selectorUser').niceSelect('update');
}
function ListToDelete(setUserSeq) {
var setVal = $('#userseq' + setUserSeq).text();
var html = '';
html
+= ' <li class="select2-selection__choice" id="' + 'userLi' + setUserSeq + '">'
+ ' <div class="chk_box">'
+ ' <a id="' + 'userseq' + setUserSeq + '"'
+ 'href="javascript:DeleteToList(' + setUserSeq + ')" >'
+ setVal + '</a>'
+ '</div>'
+ ' </li>';
$('#userLi' + setUserSeq).remove();
$('#list-user-group-box-ul-delete').append(html);
}
function DeleteToList(setUserSeq) {
var setVal = $('#userseq' + setUserSeq).text();
var html = '';
html
+= ' <li class="select2-selection__choice" id="' + 'userLi' + setUserSeq + '">'
+ ' <div class="chk_box">'
+ ' <a id="' + 'userseq' + setUserSeq + '"'
+ 'href="javascript:ListToDelete(' + setUserSeq + ')" >'
+ setVal + '</a>'
+ '</div>'
+ ' </li>';
$('#userLi' + setUserSeq).remove();
$('#list-user-group-box-ul-list').append(html);
}
function treeWrap(authPolicyVal, mainMenu, policyParent) {
var treeData = [];
mainMenu.forEach(function (e, i) {
if (authPolicyVal.includes(e.authName)) {
treeData[i] = {
id: e.authName,
parent: policyParent[e.authName],
text: e.menuName,
state: {
opened: false,
selected: true
}
};
} else {
treeData[i] = {
id: e.authName,
parent: policyParent[e.authName],
text: e.menuName,
state: {
opened: false,
selected: false
}
};
}
});
setTimeout(() => {
$('#tree_wrap').jstree({
'core': {
'data': treeData
},
"checkbox": {
"keep_selected_style": false
, "three_state": false
},
"plugins": ["checkbox"]
function treeWrap(authPolicyVal, mainMenu, policyParent) {
var treeData = [];
mainMenu.forEach(function (e, i) {
if (authPolicyVal.includes(e.authName)) {
treeData[i] = {
id: e.authName,
parent: policyParent[e.authName],
text: e.menuName,
state: {
opened: false,
selected: true
}
};
} else {
treeData[i] = {
id: e.authName,
parent: policyParent[e.authName],
text: e.menuName,
state: {
opened: false,
selected: false
}
};
}
}); });
setTimeout(() => { }, "1");
$('#tree_wrap').jstree({ }
'core': {
'data': treeData
},
"checkbox": {
"keep_selected_style": false
, "three_state": false
},
"plugins": ["checkbox"]
});
}, "1");
}
</script>
</script>
<body>
<body> <h1>ICOMSYS ADMIN</h1>
<h1>대시보드</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<h1>ICOMSYS ADMIN</h1> <header id="header">
<h1>대시보드</h1> </header>
<div class="skip_navigation"> <section id="Content" class="system_management">
<div class="location">
<ul> <ul>
<li> <li class="home"><a href="#">HOME</a></li>
<a href="#Content" class="go_content">본문 바로가기</a> <li><a href="#">시스템관리</a></li>
</li> <li><a href="#">그룹별권한 관리</a></li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul> </ul>
</div> </div>
<header id="header"> <!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
</header> <div class="sub_cont">
<section id="Content" class="system_management"> <div class="cont_box">
<div class="location"> <div class="box_title">
<ul> <div class="fl">
<li class="home"><a href="#">HOME</a></li> <h2 class="mt12">권한그룹편집</h2>
<li><a href="#">시스템관리</a></li>
<li><a href="#">그룹별권한 관리</a></li>
</ul>
</div>
<!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">권한그룹편집</h2>
</div>
</div> </div>
<div class="tbl"> </div>
<table class="edit hght"> <div class="tbl">
<colgroup> <table class="edit hght">
<col width="150px"> <colgroup>
<col width="auto"> <col width="150px">
</colgroup> <col width="auto">
<tbody> </colgroup>
<input type="hidden" id="custCode"> <tbody>
<input type="hidden" id="authGroupSeq"> <input type="hidden" id="custCode">
<tr> <input type="hidden" id="authGroupSeq">
<th class="tl">그룹명</th> <tr>
<td> <th class="tl">그룹명</th>
<div class="ipt_box"> <td>
<input type="text" id="updateGroupName" value="인텐트 조회권한" name="" class=""> <div class="ipt_box">
</div> <input type="text" id="updateGroupName" value="인텐트 조회권한" name="" class="">
</td> </div>
</tr> </td>
<tr> </tr>
<th class="tl">그룹설명</th> <tr>
<td> <th class="tl">그룹설명</th>
<div class="ipt_box"> <td>
<input type="text" id="updateGroupDesc" value="인텐트를 조회만 할 수 있는 권한" name="" class=""> <div class="ipt_box">
</div> <input type="text" id="updateGroupDesc" value="인텐트를 조회만 할 수 있는 권한" name="" class="">
</td> </div>
</tr> </td>
</tr>
<tr>
<th class="tl">소속사용자 <em class="red">*</em></th> <tr>
<td> <th class="tl">소속사용자 <em class="red">*</em></th>
<div class="ipt_box listen type-flex"> <td>
<input type="text" placeholder="유저명을 입력하세요" id="userSelBox" name="typeText"> <div class="ipt_box listen type-flex">
<a href="#" id="btnSearchUser" class="btn">조회</a> <input type="text" placeholder="유저명을 입력하세요" id="userSelBox" name="typeText">
<a href="#" id="btnSearchUser" class="btn">조회</a>
</div>
<select id="selectorUser" class="wide">
</select>
<div class="list-user-group-box">
<div class="list-user-group-item">
<div class="group-item-title">소속사용자</div>
<ul class="list-user-group-box-ul" id="list-user-group-box-ul-list">
</ul>
</div> </div>
<select id="selectorUser" class="wide"> <!-- 2단레이아웃 필요시 list-user-group-item부터 추가-->
</select> <div class="list-user-group-item">
<div class="group-item-title">소속제외</div>
<ul class="list-user-group-box-ul" id="list-user-group-box-ul-delete">
<div class="list-user-group-box">
<div class="list-user-group-item">
<div class="group-item-title">소속사용자</div>
<ul class="list-user-group-box-ul" id="list-user-group-box-ul-list">
</ul>
</div>
<!-- 2단레이아웃 필요시 list-user-group-item부터 추가--> </ul>
<div class="list-user-group-item">
<div class="group-item-title">소속제외</div>
<ul class="list-user-group-box-ul" id="list-user-group-box-ul-delete">
</ul>
</div>
</div> </div>
</td> </div>
</tr> </td>
</tr>
<tr>
<th class="tl">권한</th> <tr>
<td class="tl"> <th class="tl">권한</th>
<div class="content tree tree-maxHeight type-chk"> <td class="tl">
<div class="tree_wrap" id="tree_wrap"> <div class="content tree tree-maxHeight type-chk">
</div> <div class="tree_wrap" id="tree_wrap">
</div> </div>
</td> </div>
</tr> </td>
</tr>
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
</div>
<div class="cont_box"> <div class="cont_box">
<div class="btn_wrap center"> <div class="btn_wrap center">
<a href="#" class="btn basic grey" id="btnDel">취소</a> <a href="#" class="btn basic grey" id="btnDel">취소</a>
<a href="#" class="btn basic" id="btnSave">저장</a> <a href="#" class="btn basic" id="btnSave">저장</a>
</div>
</div> </div>
</div> </div>
</div>
</section> </section>
</body> </body>
</th:block>
</html>

@ -1,328 +1,319 @@
<!DOCTYPE html> <head>
<html xmlns:th="http://www.thymeleaf.org" <meta charset="UTF-8">
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" <title>그룹별권한</title>
layout:decorate="~{layout/layout}"> </head>
<th:block layout:fragment="content">
<head> <script>
<meta charset="UTF-8"> z
<title>그룹별권한</title> $(document).ready(function () {
</head> getOpr();
getServiceGroupQueryString();
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
<script>
z
$(document).ready(function () {
getOpr();
getServiceGroupQueryString();
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
}
);
} function getServiceGroupQueryString() {
); var param = new URLSearchParams(location.search).get("serviceGroup");
return param;
}
function getServiceGroupQueryString() {
var param = new URLSearchParams(location.search).get("serviceGroup");
return param;
}
function getOpr() {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: '/adm/menu/oprmng',
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#serviceGroup').niceSelect('update');
});
}
})
};
function getOpr() { </script>
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: '/adm/menu/oprmng',
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#serviceGroup').niceSelect('update');
});
}
})
};
</script>
<body>
<body> <h1>ICOMSYS ADMIN</h1>
<h1>대시보드</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<h1>ICOMSYS ADMIN</h1> <header id="header">
<h1>대시보드</h1> </header>
<div class="skip_navigation"> <section id="Content" class="system_management">
<div class="location">
<ul> <ul>
<li> <li class="home"><a href="#">HOME</a></li>
<a href="#Content" class="go_content">본문 바로가기</a> <li><a href="#">시스템관리</a></li>
</li> <li><a href="#">그룹별권한 관리</a></li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul> </ul>
</div> </div>
<header id="header"> <!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
</header> <div class="sub_cont">
<section id="Content" class="system_management"> <div class="cont_box">
<div class="location"> <div class="box_title">
<ul> <div class="fl">
<li class="home"><a href="#">HOME</a></li> <h2 class="mt12">권한그룹편집</h2>
<li><a href="#">시스템관리</a></li>
<li><a href="#">그룹별권한 관리</a></li>
</ul>
</div>
<!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">권한그룹편집</h2>
</div>
</div> </div>
<div class="tbl"> </div>
<table class="edit hght"> <div class="tbl">
<colgroup> <table class="edit hght">
<col width="150px"> <colgroup>
<col width="auto"> <col width="150px">
</colgroup> <col width="auto">
<tbody> </colgroup>
<tr> <tbody>
<th class="tl">그룹명</th> <tr>
<td> <th class="tl">그룹명</th>
<div class="ipt_box"> <td>
<input type="text" value="인텐트 조회권한" name="" class=""> <div class="ipt_box">
</div> <input type="text" value="인텐트 조회권한" name="" class="">
</td> </div>
</tr> </td>
<tr> </tr>
<th class="tl">그룹설명</th> <tr>
<td> <th class="tl">그룹설명</th>
<div class="ipt_box"> <td>
<input type="text" value="인텐트를 조회만 할 수 있는 권한" name="" class=""> <div class="ipt_box">
</div> <input type="text" value="인텐트를 조회만 할 수 있는 권한" name="" class="">
</td> </div>
</tr> </td>
<tr> </tr>
<th class="tl">소속사용자 <em class="red">*</em></th> <tr>
<td> <th class="tl">소속사용자 <em class="red">*</em></th>
<div class="ipt_box type-flex"> <td>
<div class="select2-lib-ipt"> <div class="ipt_box type-flex">
<select class="select-search" multiple="multiple"></select> <div class="select2-lib-ipt">
</div> <select class="select-search" multiple="multiple"></select>
<a href="#" class="btn">사용자 추가</a>
<script src="assets/js/lib/select2.js"></script>
<script>
const data = [
{id: 1, text: '홍길동'},
{id: 2, text: '남길동'},
{id: 3, text: '재길동'},
{id: 4, text: '개길동'},
{id: 5, text: '김길동'},
{id: 6, text: '이길동'},
{id: 7, text: '임길동'}
];
$(".select-search").select2({
placeholder: "사용자를 검색",
data: data,
tags: true
// allowClear: true
});
</script>
</div> </div>
<div class="list-user-group-box"> <a href="#" class="btn">사용자 추가</a>
<div class="list-user-group-item"> <script src="assets/js/lib/select2.js"></script>
<div class="group-item-title">소속타이틀(필요시 사용)</div> <script>
<ul class="list-user-group-box-ul"> const data = [
<li> {id: 1, text: '홍길동'},
<div class="chk_box"> {id: 2, text: '남길동'},
<input type="checkbox" name="checkbox" id="chk01" checked> {id: 3, text: '재길동'},
<label for="chk01">홍길동</label> {id: 4, text: '개길동'},
</div> {id: 5, text: '김길동'},
</li> {id: 6, text: '이길동'},
{id: 7, text: '임길동'}
<li> ];
<div class="chk_box"> $(".select-search").select2({
<input type="checkbox" name="checkbox" id="chk02" checked> placeholder: "사용자를 검색",
<label for="chk02">김길동</label> data: data,
</div> tags: true
</li> // allowClear: true
});
</script>
</div>
<div class="list-user-group-box">
<div class="list-user-group-item">
<div class="group-item-title">소속타이틀(필요시 사용)</div>
<ul class="list-user-group-box-ul">
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">홍길동</label>
</div>
</li>
<li> <li>
<div class="chk_box"> <div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked> <input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk01">홍길동</label> <label for="chk02">길동</label>
</div> </div>
</li> </li>
<li> <li>
<div class="chk_box"> <div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked> <input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk02">김길동</label> <label for="chk01">길동</label>
</div> </div>
</li> </li>
<li> <li>
<div class="chk_box"> <div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked> <input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk01">길동</label> <label for="chk02">길동</label>
</div> </div>
</li> </li>
<li> <li>
<div class="chk_box"> <div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked> <input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk02">길동</label> <label for="chk01">길동</label>
</div> </div>
</li> </li>
<li> <li>
<div class="chk_box"> <div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked> <input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk01">길동</label> <label for="chk02">길동</label>
</div> </div>
</li> </li>
<li> <li>
<div class="chk_box"> <div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked> <input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk02">길동</label> <label for="chk01">길동</label>
</div> </div>
</li> </li>
<li> <li>
<div class="chk_box"> <div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked> <input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk01">길동</label> <label for="chk02">길동</label>
</div> </div>
</li> </li>
<li> <li>
<div class="chk_box"> <div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked> <input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk02">길동</label> <label for="chk01">길동</label>
</div> </div>
</li> </li>
<li> <li>
<div class="chk_box"> <div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked> <input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk01">길동</label> <label for="chk02">길동</label>
</div> </div>
</li> </li>
<li> <li>
<div class="chk_box"> <div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked> <input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk02">김길동</label> <label for="chk01">홍길동</label>
</div> </div>
</li> </li>
</ul>
</div>
<!-- 2단레이아웃 필요시 list-user-group-item부터 추가-->
<!-- <div class="list-user-group-item">
<div class="group-item-title">소속타이틀(필요시 사용)</div>
<ul class="list-user-group-box-ul">
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk03" checked>
<label for="chk03">홍길동</label>
</div>
</li>
<li> <li>
<div class="chk_box"> <div class="chk_box">
<input type="checkbox" name="checkbox" id="chk04" checked> <input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk04">김길동</label> <label for="chk02">김길동</label>
</div> </div>
</li> </li>
</ul> </ul>
</div> -->
</div> </div>
</td> <!-- 2단레이아웃 필요시 list-user-group-item부터 추가-->
</tr> <!-- <div class="list-user-group-item">
<div class="group-item-title">소속타이틀(필요시 사용)</div>
<ul class="list-user-group-box-ul">
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk03" checked>
<label for="chk03">홍길동</label>
</div>
</li>
<tr> <li>
<th class="tl">권한</th> <div class="chk_box">
<td class="tl"> <input type="checkbox" name="checkbox" id="chk04" checked>
<script> <label for="chk04">김길동</label>
$(document).ready(function () { </div>
$('.tree_wrap').jstree({ </li>
"checkbox": { </ul>
"keep_selected_style": false </div> -->
}, </div>
"plugins": ["checkbox"] </td>
}); </tr>
<tr>
<th class="tl">권한</th>
<td class="tl">
<script>
$(document).ready(function () {
$('.tree_wrap').jstree({
"checkbox": {
"keep_selected_style": false
},
"plugins": ["checkbox"]
}); });
</script> });
<div class="content tree tree-maxHeight type-chk"> </script>
<div class="tree_wrap"> <div class="content tree tree-maxHeight type-chk">
<ul> <div class="tree_wrap">
<li data-jstree='{ "opened" : true }'>root <ul>
<ul> <li data-jstree='{ "opened" : true }'>root
<li data-jstree='{ "opened" : true }'>주소BOT <ul>
<ul> <li data-jstree='{ "opened" : true }'>주소BOT
<li>지명 유사어 관리</li> <ul>
<li>빌딩 유사어 관리</li> <li>지명 유사어 관리</li>
<li>유의어 전처리 관리</li> <li>빌딩 유사어 관리</li>
<li>주소봇 멘트 관리</li> <li>유의어 전처리 관리</li>
<li>발화 건물유형 관리</li> <li>주소봇 멘트 관리</li>
<li>주소 월별 업데이트</li> <li>발화 건물유형 관리</li>
<li>주소처리내역(녹취)</li> <li>주소 월별 업데이트</li>
</ul> <li>주소처리내역(녹취)</li>
</li> </ul>
<li data-jstree='{ "opened" : true }'>BOT 공통 관리 </li>
<ul> <li data-jstree='{ "opened" : true }'>BOT 공통 관리
<li data-jstree='{ "opened" : true }'>서비스별관리 <ul>
<ul> <li data-jstree='{ "opened" : true }'>서비스별관리
<li>요일/시간대별 멘트 관리</li> <ul>
<li>휴무일 관리</li> <li>요일/시간대별 멘트 관리</li>
<li>자연어 전처리 관리</li> <li>휴무일 관리</li>
</ul> <li>자연어 전처리 관리</li>
</li> </ul>
<li>공통 코드 관리</li> </li>
</ul> <li>공통 코드 관리</li>
</li> </ul>
<li data-jstree='{ "opened" : true }'>무인접수BOT </li>
<ul> <li data-jstree='{ "opened" : true }'>무인접수BOT
<li>무인 접수 리스트</li> <ul>
<li>제품군 유의어 관리</li> <li>무인 접수 리스트</li>
</ul> <li>제품군 유의어 관리</li>
</li> </ul>
<li data-jstree='{ "opened" : true }'>영상상담 </li>
<ul> <li data-jstree='{ "opened" : true }'>영상상담
<li>컨텐츠등록 관리</li> <ul>
<li>영상상담</li> <li>컨텐츠등록 관리</li>
<li>상담이력 조회</li> <li>영상상담</li>
</ul> <li>상담이력 조회</li>
</li> </ul>
</ul> </li>
</li> </ul>
</ul> </li>
</div> </ul>
</div> </div>
</td> </div>
</tr> </td>
</tr>
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
</div>
<div class="cont_box"> <div class="cont_box">
<div class="btn_wrap center"> <div class="btn_wrap center">
<a href="#" class="btn basic grey">취소</a> <a href="#" class="btn basic grey">취소</a>
<a href="#" class="btn basic">저장</a> <a href="#" class="btn basic">저장</a>
</div>
</div> </div>
</div> </div>
</div>
</section> </section>
</body>
</body>
</th:block>
</html>

@ -1,306 +1,298 @@
<!DOCTYPE html> <head>
<html xmlns:th="http://www.thymeleaf.org" <meta charset="UTF-8">
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" <title>정책별메뉴</title>
layout:decorate="~{layout/layout}"> </head>
<th:block layout:fragment="content">
<head>
<meta charset="UTF-8">
<title>정책별메뉴</title>
</head>
<script>
$(document).ready(function () {
getOpr();
<script> PagingDataTable();
$(document).ready(function () { $('#listTable tbody').on('dblclick', 'tr', function () {
getOpr(); var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
PagingDataTable(); $('#btnSearchOpr').on('click', function () {
$('#listTable tbody').on('dblclick', 'tr', function () { fnCustSearchBtn();
var data = $('#listTable').DataTable().row(this).data(); });
viewPage(data)
});
$('#btnSearchOpr').on('click', function () { $("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn(); fnCustSearchBtn();
}); }
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
}); });
});
function getOpr() { function getOpr() {
$.ajax({ $.ajax({
type: "GET", type: "GET",
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",
datatype: "JSON", datatype: "JSON",
url: '/adm/menu/oprmng', url: '/adm/menu/oprmng',
success: function (data) { success: function (data) {
// console.log(JSON.stringify(data)); // console.log(JSON.stringify(data));
data.forEach(function (e, f) { data.forEach(function (e, f) {
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>"); $('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#serviceGroup').niceSelect('update'); $('#serviceGroup').niceSelect('update');
}); });
} }
}) })
}; };
var PagingDataTable = function () { var PagingDataTable = function () {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"})); // console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
var paging = JSON.stringify({'page': 0, 'size': 10}) var paging = JSON.stringify({'page': 0, 'size': 10})
$('#listTable').DataTable( $('#listTable').DataTable(
{ {
ajax: { ajax: {
url: '/admin/common/system/policyMenu/list', url: '/admin/common/system/policyMenu/list',
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",
type: "POST", type: "POST",
dataType: "JSON", dataType: "JSON",
data: function (data) { data: function (data) {
var json = {}; var json = {};
if (data) { if (data) {
json.page = data.start / data.length; json.page = data.start / data.length;
json.size = 10 json.size = 10
json.serviceGroup = $("#serviceGroup option:selected").val(); json.serviceGroup = $("#serviceGroup option:selected").val();
json.codeText1 = $('#codeText1').val(); json.codeText1 = $('#codeText1').val();
json.codeText2 = $('#codeText2').val(); json.codeText2 = $('#codeText2').val();
json.codeText3 = $('#codeText3').val(); json.codeText3 = $('#codeText3').val();
} else { } else {
json = JSON.stringify({'page': 0, 'size': 10}); json = JSON.stringify({'page': 0, 'size': 10});
}
return JSON.stringify(json);
}
,
dataFilter: function (data) {
var jsons = jQuery.parseJSON(data);
// console.log(JSON.stringify(data));
var json = {};
json.recordsTotal = jsons.getTotal;
json.recordsFiltered = jsons.getTotal;
json.data = jsons.getList;
// console.log(json);
return JSON.stringify(json);
} }
}, return JSON.stringify(json);
columns: [ }
{data: "custCode"}, ,
{data: "custName"}, dataFilter: function (data) {
{data: "serviceGroup"}, var jsons = jQuery.parseJSON(data);
{data: "serviceGroupName"}, // console.log(JSON.stringify(data));
{data: "policyVal"}, var json = {};
{data: "policyName"}, json.recordsTotal = jsons.getTotal;
{data: "menuName"}, json.recordsFiltered = jsons.getTotal;
{data: "menuSeq"} json.data = jsons.getList;
], // console.log(json);
order: [0, "asc"], return JSON.stringify(json);
scrollX: false, }
scrollY: false, },
autoWidth: false, columns: [
searching: false, {data: "custCode"},
bProcessing: false, {data: "custName"},
sProcessing: false, {data: "serviceGroup"},
bServerSide: true, {data: "serviceGroupName"},
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"l><"pull-right"f><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"ip>>>', {data: "policyVal"},
// pagingType: "first_last_numbers" {data: "policyName"},
{data: "menuName"},
{data: "menuSeq"}
],
order: [0, "asc"],
scrollX: false,
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: false,
sProcessing: false,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"l><"pull-right"f><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"ip>>>',
// pagingType: "first_last_numbers"
columnDefs: [ columnDefs: [
{ {
targets: 0, targets: 0,
visible: false, visible: false,
searchable: false, searchable: false,
render: function (data) { render: function (data) {
// console.log(data) // console.log(data)
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>'; return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 2,
visible: false,
searchable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
}, },
{ },
targets: 3, {
render: function (data) { targets: 1,
return '<a style="display: block;text-align: center;">' + data + '</a>'; render: function (data) {
} return '<a style="display: block;text-align: center;">' + data + '</a>';
}, }
{ },
targets: 4, {
render: function (data) { targets: 2,
return '<a style="display: block;text-align: center;">' + data + '</a>'; visible: false,
} searchable: false,
}, render: function (data) {
{ return '<a style="display: block;text-align: center;">' + data + '</a>';
targets: 5,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 6,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 7,
visible: false,
searchable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
} }
] },
} {
) targets: 3,
}; render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 5,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 6,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 7,
visible: false,
searchable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
}
]
}
)
};
function fnCustSearchBtn() { function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload(); $('#listTable').DataTable().ajax.reload();
}; };
</script> </script>
<body> <body>
<div class="skip_navigation"> <div class="skip_navigation">
<ul> <ul>
<li> <li>
<a href="#Content" class="go_content">본문 바로가기</a> <a href="#Content" class="go_content">본문 바로가기</a>
</li> </li>
<li> <li>
<a href="#Gnb">메뉴 바로가기</a> <a href="#Gnb">메뉴 바로가기</a>
</li> </li>
</ul> </ul>
</div> </div>
<header id="header"> <header id="header">
</header> </header>
<section id="Content" class="system_management"> <section id="Content" class="system_management">
<div class="location"> <div class="location">
<ul> <ul>
<li class="home"><a href="#">HOME</a></li> <li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템 관리</a></li> <li><a href="#">시스템 관리</a></li>
<li><a href="#">정책별 메뉴</a></li> <li><a href="#">정책별 메뉴</a></li>
</ul> </ul>
</div> </div>
<div class="sub_cont menu06_01_03"> <div class="sub_cont menu06_01_03">
<div class="cont_box"> <div class="cont_box">
<div class="box_title"> <div class="box_title">
<div class="fl"> <div class="fl">
<h2 class="mt12">정책별 메뉴 조회</h2> <h2 class="mt12">정책별 메뉴 조회</h2>
</div> </div>
<div class="fr"> <div class="fr">
<div class="btn_wrap fl"> <div class="btn_wrap fl">
<a href="#" id="btnSearchOpr" class="btn">조회</a> <a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
</div> </div>
</div> </div>
</div>
<div class="tbl"> <div class="tbl">
<table class="search block"> <table class="search block">
<colgroup> <colgroup>
<col width="140px"> <col width="140px">
<col width="40%"> <col width="40%">
<col width="140px"> <col width="140px">
<col width="40%"> <col width="40%">
</colgroup> </colgroup>
<tbody> <tbody>
<tr> <tr>
<th class="tl">시나리오그룹</th> <th class="tl">시나리오그룹</th>
<td> <td>
<div class="sel_box"> <div class="sel_box">
<select id="serviceGroup" class="wide"> <select id="serviceGroup" class="wide">
<option value="ALL">전체</option> <option value="ALL">전체</option>
</select> </select>
</div> </div>
</td> </td>
<th class="tl">정책코드</th> <th class="tl">정책코드</th>
<td> <td>
<div class="ipt_box listen"> <div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText1" name="typeText1"> <input type="text" placeholder="검색어를 입력하세요" id="codeText1" name="typeText1">
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<th class="tl">정책명</th> <th class="tl">정책명</th>
<td> <td>
<div class="ipt_box listen"> <div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText2" name="typeText2"> <input type="text" placeholder="검색어를 입력하세요" id="codeText2" name="typeText2">
</div> </div>
</td> </td>
<th class="tl">메뉴명</th> <th class="tl">메뉴명</th>
<td> <td>
<div class="ipt_box listen"> <div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText3" name="typeText3"> <input type="text" placeholder="검색어를 입력하세요" id="codeText3" name="typeText3">
</div> </div>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
<div class="cont_box"> </div>
<div class="box_title"> <div class="cont_box">
<div class="fl"> <div class="box_title">
<h2 class="mt12">정책별 메뉴 리스트</h2> <div class="fl">
</div> <h2 class="mt12">정책별 메뉴 리스트</h2>
</div> </div>
</div>
<div class="tbl"> <div class="tbl">
<form id="custListForm"> <form id="custListForm">
<table id="listTable" class=""> <table id="listTable" class="">
<colgroup> <colgroup>
<col width="auto"> <col width="auto">
<col width="auto"> <col width="auto">
<col width="auto"> <col width="auto">
<col width="auto"> <col width="auto">
<col width="auto"> <col width="auto">
<col width="auto"> <col width="auto">
<col width="auto"> <col width="auto">
<col width="auto"> <col width="auto">
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr>
<th>고객코드</th> <th>고객코드</th>
<th>고객사</th> <th>고객사</th>
<th>서비스그룹</th> <th>서비스그룹</th>
<th>서비스그룹명</th> <th>서비스그룹명</th>
<th>정책코드</th> <th>정책코드</th>
<th>정책명</th> <th>정책명</th>
<th>메뉴명</th> <th>메뉴명</th>
<th>메뉴번호</th> <th>메뉴번호</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
</tbody> </tbody>
</table> </table>
</form> </form>
</div>
</div> </div>
</div> </div>
</section> </div>
</section>
</body> </body>
</th:block>
</html>

@ -1,463 +1,455 @@
<!DOCTYPE html> <head>
<html xmlns:th="http://www.thymeleaf.org" <meta charset="UTF-8">
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" <title>서비스그룹 관리</title>
layout:decorate="~{layout/layout}"> </head>
<th:block layout:fragment="content">
<script>
<head> $(document).ready(function () {
<meta charset="UTF-8">
<title>서비스그룹 관리</title>
</head>
<script>
$(document).ready(function () {
$('.tbl-card-li').each(function () {
$(this).find('.tbl-card-title').on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on');
})
});
$('.tbl-card').find('.tbl-card-li .title-connect').each(function () {
const submitVal = $(this).val();
if (submitVal.length > 0) {
$(this).parents('.tbl-card-li').find('.title-connected').text(submitVal);
}
$(this).on('keyup', function () {
const thisVal = $(this).val();
if (thisVal.length === 0) { $('.tbl-card-li').each(function () {
$(this).parents('.tbl-card-li').find('.title-connected').text('새로운 시나리오 그룹'); $(this).find('.tbl-card-title').on('click', function () {
} else { $(this).parents('.tbl-card-li').toggleClass('on');
$(this).parents('.tbl-card-li').find('.title-connected').text(thisVal); })
} });
})
});
getServiceGroupQueryString(); $('.tbl-card').find('.tbl-card-li .title-connect').each(function () {
getServiceGroupViewData(); const submitVal = $(this).val();
if (submitVal.length > 0) {
$(this).parents('.tbl-card-li').find('.title-connected').text(submitVal);
}
$(this).on('keyup', function () {
const thisVal = $(this).val();
if (thisVal.length === 0) {
$(this).parents('.tbl-card-li').find('.title-connected').text('새로운 시나리오 그룹');
} else {
$(this).parents('.tbl-card-li').find('.title-connected').text(thisVal);
}
})
}); });
function getServiceGroupQueryString() { getServiceGroupQueryString();
var param = new URLSearchParams(location.search).get("serviceGroup"); getServiceGroupViewData();
// console.log(param);
return param;
}
function getServiceGroupViewData() { });
if (getServiceGroupQueryString() == null) { function getServiceGroupQueryString() {
//유저어드민 var param = new URLSearchParams(location.search).get("serviceGroup");
setUrl = '/admin/common/system/serviceGroup/view'; // console.log(param);
} else { return param;
//시스템어드민 }
setUrl = '/admin/common/system/serviceGroup/view' + "?serviceGroup=" + getServiceGroupQueryString();
} function getServiceGroupViewData() {
if (getServiceGroupQueryString() == null) {
//유저어드민
setUrl = '/admin/common/system/serviceGroup/view';
} else {
//시스템어드민
setUrl = '/admin/common/system/serviceGroup/view' + "?serviceGroup=" + getServiceGroupQueryString();
}
$.ajax({ $.ajax({
type: "GET", type: "GET",
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",
datatype: "JSON", datatype: "JSON",
url: setUrl, url: setUrl,
success: function (data) { success: function (data) {
// console.log(JSON.stringify(data)); // console.log(JSON.stringify(data));
var html = ''; var html = '';
// for (var i=0; i < data.subServiceGroupRes.length; i++) { // for (var i=0; i < data.subServiceGroupRes.length; i++) {
// //
// } // }
$('#mainServiceGroupName').val(data.mainServiceGroup); $('#mainServiceGroupName').val(data.mainServiceGroup);
$('#mainServiceGroup').val(data.mainServiceGroupName); $('#mainServiceGroup').val(data.mainServiceGroupName);
$('#mainUseYn').val(data.mainUseYn); $('#mainUseYn').val(data.mainUseYn);
$('#mainOprMngCode').val(data.mainOprMngCode); $('#mainOprMngCode').val(data.mainOprMngCode);
data.subServiceGroupRes.forEach(function (e, i) { data.subServiceGroupRes.forEach(function (e, i) {
html += '<li class="tbl-card-li" id="tbl-card-li' + i + '">' html += '<li class="tbl-card-li" id="tbl-card-li' + i + '">'
+ '<div class="tbl-card-li-inner">' + '<div class="tbl-card-li-inner">'
+ '<div class="tbl-card-title" id="tbl-card-title' + i + '">' + '<div class="tbl-card-title" id="tbl-card-title' + i + '">'
+ ' <div class="fl title-connected">' + e.subServiceGroup + '</div>' + ' <div class="fl title-connected">' + e.subServiceGroup + '</div>'
+ ' </div>' + ' </div>'
+ ' <div class="tbl-card-data">' + ' <div class="tbl-card-data">'
+ ' <div class="box-title">' + ' <div class="box-title">'
+ ' <div class="btn_wrap fr">' + ' <div class="btn_wrap fr">'
+ ' <a href="#" class="btn grey">-삭제</a>' + ' <a href="#" class="btn grey">-삭제</a>'
+ ' </div>' + ' </div>'
+ ' </div>' + ' </div>'
+ ' <div class="tbl">' + ' <div class="tbl">'
+ ' <table class="edit hght">' + ' <table class="edit hght">'
+ ' <colgroup>' + ' <colgroup>'
+ ' <col width = "150px" >' + ' <col width = "150px" >'
+ ' <col width = "auto" >' + ' <col width = "auto" >'
+ ' </colgroup>' + ' </colgroup>'
+ ' <tbody>' + ' <tbody>'
+ ' <tr>' + ' <tr>'
+ ' <th class="tl">시나리오 그룹명</th>' + ' <th class="tl">시나리오 그룹명</th>'
+ ' <td>' + ' <td>'
+ ' <div class="ipt_box">' + ' <div class="ipt_box">'
+ ' <input type="text" id="subServiceGroup' + i + '" value="' + e.subServiceGroup + '" name=""' + ' <input type="text" id="subServiceGroup' + i + '" value="' + e.subServiceGroup + '" name=""'
+ ' class="title-connect" readonly>' + ' class="title-connect" readonly>'
+ ' </div>' + ' </div>'
+ ' </td>' + ' </td>'
+ ' </tr>' + ' </tr>'
+ ' <tr>' + ' <tr>'
+ ' <th class="tl">시나리오 그룹코드</th>' + ' <th class="tl">시나리오 그룹코드</th>'
+ ' <td>' + ' <td>'
+ ' <div class="ipt_box type-flex">' + ' <div class="ipt_box type-flex">'
+ ' <input type="text" id="subServiceGroupName' + i + '" value="' + e.subOprMngCode + '" name="" class="" readonly>' + ' <input type="text" id="subServiceGroupName' + i + '" value="' + e.subOprMngCode + '" name="" class="" readonly>'
+ ' </div>' + ' </div>'
+ ' <div class="ipt_box ">' + ' <div class="ipt_box ">'
+ ' <div class="create-code-list">' + ' <div class="create-code-list">'
+ ' </div>' + ' </div>'
+ ' </div>' + ' </div>'
+ ' </td>' + ' </td>'
+ ' </tr>' + ' </tr>'
+ ' <tr>' + ' <tr>'
+ ' <th class="tl">시나리오그룹 설명</th>' + ' <th class="tl">시나리오그룹 설명</th>'
+ ' <td>' + ' <td>'
+ ' <div class="ipt_box">' + ' <div class="ipt_box">'
+ ' <input type="text" value="' + e.subServiceGroupDesc + '" name="" class="" readonly>' + ' <input type="text" value="' + e.subServiceGroupDesc + '" name="" class="" readonly>'
+ ' </div>' + ' </div>'
+ ' </td>' + ' </td>'
+ ' </tr>' + ' </tr>'
+ ' <tr>' + ' <tr>'
+ ' <th class="tl">사용여부 <em class="red">*</em></th>' + ' <th class="tl">사용여부 <em class="red">*</em></th>'
+ ' <td>' + ' <td>'
+ ' <div class="sel_box">' + ' <div class="sel_box">'
+ ' <select class="wide">' + ' <select class="wide">'
+ ' <option value="" selected>' + e.subUseYn + '</option>' + ' <option value="" selected>' + e.subUseYn + '</option>'
+ ' </select>' + ' </select>'
+ ' </div>' + ' </div>'
+ ' </td>' + ' </td>'
+ ' </tr>' + ' </tr>'
+ ' <tr>' + ' <tr>'
+ ' <th class="tl">권한부여</th>' + ' <th class="tl">권한부여</th>'
+ ' <td class="tl">' + ' <td class="tl">'
+ ' <div class="content tree tree-maxHeight type-chk">' + ' <div class="content tree tree-maxHeight type-chk">'
+ ' <div class="tree_wrap">' + ' <div class="tree_wrap">'
+ ' <ul>' + ' <ul>'
+ ' <li data-jstree="{ "opened" : true }">root' + ' <li data-jstree="{ "opened" : true }">root'
+ ' <ul>' + ' <ul>'
+ ' <li data-jstree="{ "opened" : true }">주소BOT' + ' <li data-jstree="{ "opened" : true }">주소BOT'
+ ' <ul>' + ' <ul>'
+ ' <li>지명 유사어 관리</li>' + ' <li>지명 유사어 관리</li>'
+ ' <li>빌딩 유사어 관리</li>' + ' <li>빌딩 유사어 관리</li>'
+ ' <li>유의어 전처리 관리</li>' + ' <li>유의어 전처리 관리</li>'
+ ' <li>주소봇 멘트 관리</li>' + ' <li>주소봇 멘트 관리</li>'
+ ' <li>발화 건물유형 관리</li>' + ' <li>발화 건물유형 관리</li>'
+ ' <li>주소 월별 업데이트</li>' + ' <li>주소 월별 업데이트</li>'
+ ' <li>주소처리내역(녹취)</li>' + ' <li>주소처리내역(녹취)</li>'
+ ' </ul>' + ' </ul>'
+ ' </li>' + ' </li>'
+ ' <li data-jstree="{ "opened" : true }">BOT 공통 관리' + ' <li data-jstree="{ "opened" : true }">BOT 공통 관리'
+ ' <ul>' + ' <ul>'
+ ' <li data-jstree="{ "opened" : true }">서비스별관리' + ' <li data-jstree="{ "opened" : true }">서비스별관리'
+ ' <ul>' + ' <ul>'
+ ' <li>요일/시간대별 멘트 관리</li>' + ' <li>요일/시간대별 멘트 관리</li>'
+ ' <li>휴무일 관리</li>' + ' <li>휴무일 관리</li>'
+ ' <li>자연어 전처리 관리</li>' + ' <li>자연어 전처리 관리</li>'
+ ' </ul>' + ' </ul>'
+ ' </li>' + ' </li>'
+ ' <li>공통 코드 관리</li>' + ' <li>공통 코드 관리</li>'
+ ' </ul>' + ' </ul>'
+ ' </li>' + ' </li>'
+ ' <li data-jstree="{ "opened" : true }">무인접수BOT' + ' <li data-jstree="{ "opened" : true }">무인접수BOT'
+ ' <ul>' + ' <ul>'
+ ' <li>무인 접수 리스트</li>' + ' <li>무인 접수 리스트</li>'
+ ' <li>제품군 유의어 관리</li>' + ' <li>제품군 유의어 관리</li>'
+ ' </ul>' + ' </ul>'
+ ' </li>' + ' </li>'
+ ' <li data-jstree="{ "opened" : true }">영상상담' + ' <li data-jstree="{ "opened" : true }">영상상담'
+ ' <ul>' + ' <ul>'
+ ' <li>컨텐츠등록 관리</li>' + ' <li>컨텐츠등록 관리</li>'
+ ' <li>영상상담</li>' + ' <li>영상상담</li>'
+ ' <li>상담이력 조회</li>' + ' <li>상담이력 조회</li>'
+ ' </ul>' + ' </ul>'
+ ' </li>' + ' </li>'
+ ' </ul>' + ' </ul>'
+ ' </li>' + ' </li>'
+ ' </ul>' + ' </ul>'
+ ' </div>' + ' </div>'
+ ' </div>' + ' </div>'
+ ' </td>' + ' </td>'
+ ' </tr>' + ' </tr>'
+ ' </tbody>' + ' </tbody>'
+ ' </table>' + ' </table>'
+ ' </div>' + ' </div>'
+ ' </div>' + ' </div>'
+ ' </div>' + ' </div>'
+ ' </li>' + ' </li>'
$('#tbl-card').html(html); $('#tbl-card').html(html);
$('.tbl-card-li').each(function () { $('.tbl-card-li').each(function () {
$(this).find('.tbl-card-title').on('click', function () { $(this).find('.tbl-card-title').on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on'); $(this).parents('.tbl-card-li').toggleClass('on');
}) })
});
}); });
});
// $('#mainServiceGroupName').set(data.mainServiceGroup).val(); // $('#mainServiceGroupName').set(data.mainServiceGroup).val();
// $('#mainServiceGroup').set(data.mainServiceGroupName).val(); // $('#mainServiceGroup').set(data.mainServiceGroupName).val();
// $('#useYn').set(data.useYn).val(); // $('#useYn').set(data.useYn).val();
} }
}) })
} }
</script>
</script>
<header id="header">
</header>
<header id="header"> <body>
</header> <h1>ICOMSYS ADMIN</h1>
<body> <div class="skip_navigation">
<h1>ICOMSYS ADMIN</h1> <ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<h1>ICOMSYS ADMIN</h1>
<div class="skip_navigation"> <section id="Content" class="system_management">
<div class="location">
<ul> <ul>
<li> <li class="home"><a href="#">HOME</a></li>
<a href="#Content" class="go_content">본문 바로가기</a> <li><a href="#">시스템관리</a></li>
</li> <li><a href="#">서비스그룹 관리</a></li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul> </ul>
</div> </div>
<h1>ICOMSYS ADMIN</h1> <!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
<div class="sub_cont">
<section id="Content" class="system_management"> <div class="cont_box">
<div class="location"> <div class="box_title">
<ul> <div class="fl">
<li class="home"><a href="#">HOME</a></li> <h2 class="mt12">서비스 그룹관리</h2>
<li><a href="#">시스템관리</a></li>
<li><a href="#">서비스그룹 관리</a></li>
</ul>
</div>
<!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">서비스 그룹관리</h2>
</div>
</div> </div>
<div class="tbl"> </div>
<table class="edit hght"> <div class="tbl">
<colgroup> <table class="edit hght">
<col width="150px"> <colgroup>
<col width="auto"> <col width="150px">
</colgroup> <col width="auto">
<tbody> </colgroup>
<tbody>
<tr>
<th class="tl">서비스그룹</th> <tr>
<td> <th class="tl">서비스그룹</th>
<div class="ipt_box"> <td>
<input type="text" id="mainServiceGroupName" name="" class="" readonly> <div class="ipt_box">
</div> <input type="text" id="mainServiceGroupName" name="" class="" readonly>
</td> </div>
</tr> </td>
</tr>
<tr> <tr>
<th class="tl">서비스코드</th> <th class="tl">서비스코드</th>
<td> <td>
<div class="ipt_box type-flex"> <div class="ipt_box type-flex">
<input type="text" id="mainServiceGroup" value="codecode" name="" class="" readonly> <input type="text" id="mainServiceGroup" value="codecode" name="" class="" readonly>
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<th class="tl">시나리오코드</th> <th class="tl">시나리오코드</th>
<td> <td>
<div class="ipt_box type-flex"> <div class="ipt_box type-flex">
<input type="text" id="mainOprMngCode" value="codecode" name="" class="" readonly> <input type="text" id="mainOprMngCode" value="codecode" name="" class="" readonly>
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<th class="tl">사용여부</th> <th class="tl">사용여부</th>
<td> <td>
<input type="text" id="mainUseYn" value="Y" name="" class="" readonly> <input type="text" id="mainUseYn" value="Y" name="" class="" readonly>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
</div>
<div class="cont_box"> <div class="cont_box">
<div class="box_title"> <div class="box_title">
<div class="fl"> <div class="fl">
<h2 class="mt12">시나리오 그룹 <em class="red">*</em></h2> <h2 class="mt12">시나리오 그룹 <em class="red">*</em></h2>
</div> </div>
<div class="btn_wrap fr"> <div class="btn_wrap fr">
<a href="#" class="btn">추가</a> <a href="#" class="btn">추가</a>
</div>
</div> </div>
</div>
<div class="tbl-card-wrap"> <div class="tbl-card-wrap">
<ul class="tbl-card" id="tbl-card"> <ul class="tbl-card" id="tbl-card">
<li class="tbl-card-li"> <li class="tbl-card-li">
<div class="tbl-card-li-inner"> <div class="tbl-card-li-inner">
<div class="tbl-card-title"> <div class="tbl-card-title">
<div class="fl title-connected">새로운 시나리오 그룹</div> <div class="fl title-connected">새로운 시나리오 그룹</div>
</div> </div>
<div class="tbl-card-data"> <div class="tbl-card-data">
<div class="box-title"> <div class="box-title">
<div class="btn_wrap fr"> <div class="btn_wrap fr">
<a href="#" class="btn grey">-삭제</a> <a href="#" class="btn grey">-삭제</a>
</div>
</div> </div>
<div class="tbl"> </div>
<table class="edit hght"> <div class="tbl">
<colgroup> <table class="edit hght">
<col width="150px"> <colgroup>
<col width="auto"> <col width="150px">
</colgroup> <col width="auto">
<tbody> </colgroup>
<tr> <tbody>
<th class="tl">시나리오 그룹명</th> <tr>
<td> <th class="tl">시나리오 그룹명</th>
<div class="ipt_box"> <td>
<input type="text" id="subServiceGroup" value="시나리오그룹 1" name="" <div class="ipt_box">
class="title-connect"> <input type="text" id="subServiceGroup" value="시나리오그룹 1" name=""
</div> class="title-connect">
</td> </div>
</tr> </td>
<tr> </tr>
<th class="tl">시나리오 그룹코드</th> <tr>
<td> <th class="tl">시나리오 그룹코드</th>
<div class="ipt_box type-flex"> <td>
<input type="text" id="subServiceGroupName" <div class="ipt_box type-flex">
value="UPLUS_RCP_DAISO" <input type="text" id="subServiceGroupName"
name="" class=""> value="UPLUS_RCP_DAISO"
<a href="#" class="btn grey">중복확인</a> name="" class="">
</div> <a href="#" class="btn grey">중복확인</a>
<div class="ipt_box "> </div>
<div class="create-code-list"> <div class="ipt_box ">
<spna class="create-code"> <div class="create-code-list">
UPLUS_RCP_DAISO <spna class="create-code">
UPLUS_RCP_DAISO
</spna>
</div> </spna>
</div>
</td>
</tr>
<tr>
<th class="tl">시나리오그룹 설명</th>
<td>
<div class="ipt_box">
<input type="text" value="입력된 설명입니다..." name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">사용여부 <em class="red">*</em></th>
<td>
<div class="sel_box">
<select class="wide">
<option value="" selected>Y</option>
</select>
</div> </div>
</td> </div>
</tr> </td>
<tr> </tr>
<th class="tl">권한부여</th> <tr>
<td class="tl"> <th class="tl">시나리오그룹 설명</th>
<script> <td>
$(document).ready(function () { <div class="ipt_box">
$('.tree_wrap').jstree({ <input type="text" value="입력된 설명입니다..." name="" class="">
"checkbox": { </div>
"keep_selected_style": false </td>
, "three_state": false </tr>
}, <tr>
"plugins": ["checkbox"] <th class="tl">사용여부 <em class="red">*</em></th>
}); <td>
<div class="sel_box">
<select class="wide">
<option value="" selected>Y</option>
</select>
</div>
</td>
</tr>
<tr>
<th class="tl">권한부여</th>
<td class="tl">
<script>
$(document).ready(function () {
$('.tree_wrap').jstree({
"checkbox": {
"keep_selected_style": false
, "three_state": false
},
"plugins": ["checkbox"]
}); });
</script> });
<div class="content tree tree-maxHeight type-chk"> </script>
<div class="tree_wrap"> <div class="content tree tree-maxHeight type-chk">
<ul> <div class="tree_wrap">
<li data-jstree='{ "opened" : true }'>root <ul>
<ul> <li data-jstree='{ "opened" : true }'>root
<li data-jstree='{ "opened" : true }'>주소BOT <ul>
<ul> <li data-jstree='{ "opened" : true }'>주소BOT
<li>지명 유사어 관리</li> <ul>
<li>빌딩 유사어 관리</li> <li>지명 유사어 관리</li>
<li>유의어 전처리 관리</li> <li>빌딩 유사어 관리</li>
<li>주소봇 멘트 관리</li> <li>유의어 전처리 관리</li>
<li>발화 건물유형 관리</li> <li>주소봇 멘트 관리</li>
<li>주소 월별 업데이트</li> <li>발화 건물유형 관리</li>
<li>주소처리내역(녹취)</li> <li>주소 월별 업데이트</li>
</ul> <li>주소처리내역(녹취)</li>
</li> </ul>
<li data-jstree='{ "opened" : true }'>BOT 공통 관리 </li>
<ul> <li data-jstree='{ "opened" : true }'>BOT 공통 관리
<li data-jstree='{ "opened" : true }'> <ul>
서비스별관리 <li data-jstree='{ "opened" : true }'>
<ul> 서비스별관리
<li>요일/시간대별 멘트 관리</li> <ul>
<li>휴무일 관리</li> <li>요일/시간대별 멘트 관리</li>
<li>자연어 전처리 관리</li> <li>휴무일 관리</li>
</ul> <li>자연어 전처리 관리</li>
</li> </ul>
<li>공통 코드 관리</li> </li>
</ul> <li>공통 코드 관리</li>
</li> </ul>
<li data-jstree='{ "opened" : true }'>무인접수BOT </li>
<ul> <li data-jstree='{ "opened" : true }'>무인접수BOT
<li>무인 접수 리스트</li> <ul>
<li>제품군 유의어 관리</li> <li>무인 접수 리스트</li>
</ul> <li>제품군 유의어 관리</li>
</li> </ul>
<li data-jstree='{ "opened" : true }'>영상상담 </li>
<ul> <li data-jstree='{ "opened" : true }'>영상상담
<li>컨텐츠등록 관리</li> <ul>
<li>영상상담</li> <li>컨텐츠등록 관리</li>
<li>상담이력 조회</li> <li>영상상담</li>
</ul> <li>상담이력 조회</li>
</li> </ul>
</ul> </li>
</li> </ul>
</ul> </li>
</div> </ul>
</div> </div>
</td> </div>
</tr> </td>
</tbody> </tr>
</table> </tbody>
</div> </table>
</div> </div>
</div> </div>
</li> </div>
</li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="cont_box"> <div class="cont_box">
<div class="btn_wrap center"> <div class="btn_wrap center">
<a href="#" class="btn basic grey">취소</a> <a href="#" class="btn basic grey">취소</a>
<a href="#" class="btn basic">저장</a> <a href="#" class="btn basic">저장</a>
</div>
</div> </div>
</div> </div>
</div>
</section> </section>
</body> </body>
</th:block>
</html>

@ -1,324 +1,316 @@
<!DOCTYPE html> <head>
<html xmlns:th="http://www.thymeleaf.org" <meta charset="UTF-8">
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" <title>서비스그룹 관리List</title>
layout:decorate="~{layout/layout}"> </head>
<th:block layout:fragment="content">
<head>
<meta charset="UTF-8">
<title>서비스그룹 관리List</title>
</head>
<script>
$(document).ready(function () {
<script> getMainOprSelectBox();
$(document).ready(function () {
getMainOprSelectBox(); PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
PagingDataTable(); $('#btnSearchOpr').on('click', function () {
$('#listTable tbody').on('dblclick', 'tr', function () { fnCustSearchBtn();
var data = $('#listTable').DataTable().row(this).data(); });
viewPage(data)
});
$('#btnSearchOpr').on('click', function () { $("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn(); fnCustSearchBtn();
}); }
});
$("#Content").on("keyup", function (key) { $('#btnRegModal').on('click', function () {
if (key.keyCode == 13) { fnServiceGroupInsertBtn();
fnCustSearchBtn(); });
}
});
$('#btnRegModal').on('click', function () { }
fnServiceGroupInsertBtn(); );
});
function fnServiceGroupInsertBtn() {
// document.location.href = "/BotMain_VM/admin/common/system/serviceGroup/insert";
document.location.href = '/view/admin/common/system/serviceGroup/insert';
};
function getOpr() {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: '/adm/menu/oprmng',
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#serviceGroup').niceSelect('update');
});
} }
); })
};
function fnServiceGroupInsertBtn() { function getMainOprSelectBox() {
// document.location.href = "/BotMain_VM/admin/common/system/serviceGroup/insert"; $.ajax({
document.location.href = '/view/admin/common/system/serviceGroup/insert'; type: "GET",
}; contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: '/adm/menu/main/oprmng',
success: function (data) {
data.forEach(function (e, f) {
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#serviceGroup').niceSelect('update');
});
}
})
};
function getOpr() { function viewPage(rowData) {
$.ajax({ // console.log(rowData.serviceGroup);
type: "GET", // document.location.href = "/BotMain_VM/admin/common/system/serviceGroup/view" + "?serviceGroup=" + rowData.serviceGroup;
contentType: "application/json; charset=utf-8", document.location.href = '/view/admin/common/system/serviceGroup/view' + "?serviceGroup=" + rowData.serviceGroup;
datatype: "JSON", }
url: '/adm/menu/oprmng',
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#serviceGroup').niceSelect('update');
});
}
})
};
function getMainOprSelectBox() { var PagingDataTable = function () {
$.ajax({ // console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
type: "GET", var paging = JSON.stringify({'page': 0, 'size': 10})
contentType: "application/json; charset=utf-8", $('#listTable').DataTable(
datatype: "JSON", {
url: '/adm/menu/main/oprmng', ajax: {
success: function (data) { url: '/admin/common/system/serviceGroup/list',
data.forEach(function (e, f) { contentType: "application/json; charset=utf-8",
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>"); type: "POST",
$('#serviceGroup').niceSelect('update'); dataType: "JSON",
}); data: function (data) {
} var json = {};
}) if (data) {
}; json.page = data.start / data.length;
json.size = 10;
json.serviceGroup = $("#serviceGroup option:selected").val();
json.codeText = $('#codeText').val();
} else {
json = JSON.stringify({'page': 0, 'size': 10});
}
return JSON.stringify(json);
}
,
dataFilter: function (data) {
var jsons = jQuery.parseJSON(data);
// console.log(JSON.stringify(data));
var json = {};
json.recordsTotal = jsons.getTotal;
json.recordsFiltered = jsons.getTotal;
json.data = jsons.getList;
// console.log(json);
return JSON.stringify(json);
}
},
columns: [
{data: "custCode"},
{data: "custName"},
{data: "serviceGroup"},
{data: "serviceGroupName"},
{data: "serviceType"},
{data: "useYn"},
{data: "registDate"}
function viewPage(rowData) { ],
// console.log(rowData.serviceGroup); order: [0, "asc"],
// document.location.href = "/BotMain_VM/admin/common/system/serviceGroup/view" + "?serviceGroup=" + rowData.serviceGroup; scrollX: false,
document.location.href = '/view/admin/common/system/serviceGroup/view' + "?serviceGroup=" + rowData.serviceGroup; scrollY: false,
} autoWidth: false,
searching: false,
bProcessing: false,
sProcessing: false,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
// pagingType: "first_last_numbers"
var PagingDataTable = function () { columnDefs: [
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"})); {
var paging = JSON.stringify({'page': 0, 'size': 10}) targets: 0,
$('#listTable').DataTable( visible: false,
{ searchable: false,
ajax: { render: function (data) {
url: '/admin/common/system/serviceGroup/list', return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
contentType: "application/json; charset=utf-8", },
type: "POST", },
dataType: "JSON", {
data: function (data) { targets: 1,
var json = {}; orderable: false,
if (data) { render: function (data) {
json.page = data.start / data.length; return '<a style="display: block;text-align: center;">' + data + '</a>';
json.size = 10; }
json.serviceGroup = $("#serviceGroup option:selected").val(); },
json.codeText = $('#codeText').val(); {
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 3,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
orderable: false,
render: function (data) {
// console.log(data)
if (data == "M") {
return '<a style="display: block;text-align: center;">' + '메인' + '</a>';
} else if (data == "S") {
return '<a style="display: block;text-align: center;">' + '서브' + '</a>';
} else { } else {
json = JSON.stringify({'page': 0, 'size': 10}); return '<a style="display: block;text-align: center;">' + '에러' + '</a>';
} }
return JSON.stringify(json);
} }
, },
dataFilter: function (data) {
var jsons = jQuery.parseJSON(data); {
// console.log(JSON.stringify(data)); targets: 5,
var json = {}; orderable: false,
json.recordsTotal = jsons.getTotal; render: function (data) {
json.recordsFiltered = jsons.getTotal; return '<a style="display: block;text-align: center;">' + data + '</a>';
json.data = jsons.getList;
// console.log(json);
return JSON.stringify(json);
} }
}, },
columns: [ {
{data: "custCode"}, targets: 6,
{data: "custName"}, orderable: false,
{data: "serviceGroup"}, render: function (data, type, full, meta) {
{data: "serviceGroupName"}, // var arr = data.slice();
{data: "serviceType"}, // return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
{data: "useYn"}, return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
{data: "registDate"} }
}
]
}
)
};
], function fnCustSearchBtn() {
order: [0, "asc"], $('#listTable').DataTable().ajax.reload();
scrollX: false, };
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: false,
sProcessing: false,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
// pagingType: "first_last_numbers"
columnDefs: [
{
targets: 0,
visible: false,
searchable: false,
render: function (data) {
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 3,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
orderable: false,
render: function (data) {
// console.log(data)
if (data == "M") {
return '<a style="display: block;text-align: center;">' + '메인' + '</a>';
} else if (data == "S") {
return '<a style="display: block;text-align: center;">' + '서브' + '</a>';
} else {
return '<a style="display: block;text-align: center;">' + '에러' + '</a>';
}
}
},
{ </script>
targets: 5,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 6,
orderable: false,
render: function (data, type, full, meta) {
// var arr = data.slice();
// return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
}
}
]
}
)
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
<body>
</script> <h1>ICOMSYS ADMIN</h1>
<h1>대시보드</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<body> <section id="Content" class="system_management">
<div class="location">
<h1>ICOMSYS ADMIN</h1>
<h1>대시보드</h1>
<div class="skip_navigation">
<ul> <ul>
<li> <li class="home"><a href="#">HOME</a></li>
<a href="#Content" class="go_content">본문 바로가기</a> <li><a href="#">시스템 관리</a></li>
</li> <li><a href="#">서비스그룹 관리</a></li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul> </ul>
</div> </div>
<div class="sub_cont menu06_01_03">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">서비스그룹 조회</h2>
</div>
<div class="fr">
<div class="btn_wrap fl">
<a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
</div>
</div>
<div class="tbl">
<table class="search block">
<colgroup>
<col width="140px">
<col width="25%">
<col width="140px">
<col width="40%">
</colgroup>
<tbody>
<tr>
<th class="tl">서비스그룹</th>
<td>
<div class="sel_box">
<select id="serviceGroup" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</td>
<th class="tl">검색어</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr>
<section id="Content" class="system_management"> </tbody>
<div class="location"> </table>
<ul> </div>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템 관리</a></li>
<li><a href="#">서비스그룹 관리</a></li>
</ul>
</div> </div>
<div class="cont_box">
<div class="sub_cont menu06_01_03"> <div class="box_title">
<div class="cont_box"> <div class="fl">
<div class="box_title"> <h2 class="mt12">서비스그룹 리스트</h2>
<div class="fl"> </div>
<h2 class="mt12">서비스그룹 조회</h2> <div class="btn_wrap fr">
</div>
<div class="fr">
<div class="btn_wrap fl">
<a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
</div>
</div> </div>
<div class="tbl"> </div>
<table class="search block">
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup> <colgroup>
<col width="140px"> <col width="15%">
<col width="25%"> <col width="15%">
<col width="140px"> <col width="15%">
<col width="40%"> <col width="15%">
<col width="15%">
<col width="auto">
</colgroup> </colgroup>
<tbody> <thead>
<tr> <tr>
<th class="tl">서비스그룹</th> <th>custCode</th>
<td> <th>고객사</th>
<div class="sel_box"> <th>서비스그룹</th>
<select id="serviceGroup" class="wide"> <th>서비스그룹이름</th>
<option value="ALL">전체</option> <th>서비스그룹타입</th>
</select> <th>사용여부</th>
</div> <th>생성일</th>
</td>
<th class="tl">검색어</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr> </tr>
</thead>
<tbody>
</tbody> </tbody>
</table> </table>
</div> </form>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">서비스그룹 리스트</h2>
</div>
<div class="btn_wrap fr">
</div>
</div>
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup>
<col width="15%">
<col width="15%">
<col width="15%">
<col width="15%">
<col width="15%">
<col width="auto">
</colgroup>
<thead>
<tr>
<th>custCode</th>
<th>고객사</th>
<th>서비스그룹</th>
<th>서비스그룹이름</th>
<th>서비스그룹타입</th>
<th>사용여부</th>
<th>생성일</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</div> </div>
</div> </div>
</section> </div>
</section>
</body> </body>
</th:block>
</html>

@ -1,385 +1,379 @@
<!DOCTYPE html> <head>
<html xmlns:th="http://www.thymeleaf.org" <meta charset="UTF-8">
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" <title>사용자관리</title>
layout:decorate="~{layout/layout}"> </head>
<th:block layout:fragment="content">
<head>
<meta charset="UTF-8">
<title>사용자관리</title>
</head>
<script>
$(document).ready(function () {
<script> // getOprSelect();
$(document).ready(function () { getCust();
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
// getOprSelect(); $('#btnSearchOpr').on('click', function () {
getCust(); fnCustSearchBtn();
PagingDataTable(); });
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
$('#btnSearchOpr').on('click', function () { $('#btnRegModal').on('click', function () {
fnCustSearchBtn(); fnInsertBtn();
}); });
$('#btnRegModal').on('click', function () {
fnInsertBtn();
});
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
}
);
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) { function getOprSelect() {
fnCustSearchBtn(); var html = '<option value="' + "ALL" + '">' + "전체" + '</option>';
} $.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: '/adm/menu/oprmng' + "?serviceType=M",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';
}); });
} }
); })
$('#serviceGroup').html(html);
$('#serviceGroup').niceSelect('update');
};
function getCust() {
var html = '<option value="' + "ALL" + '">' + "전체" + '</option>';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: '/admin/common/system/user/cust/select',
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html += '<option value="' + e.custCode + '">' + e.custName + '</option>';
});
}
})
$('#selectCust').html(html);
$('#selectCust').niceSelect('update');
}
function getOprSelect() { function viewPage(rowData) {
var html = '<option value="' + "ALL" + '">' + "전체" + '</option>'; // console.log(rowData.userSeq);
$.ajax({ // document.location.href = "/BotMain_VM/admin/common/system/user/view" + "?userSeq=" + rowData.userSeq;
type: "GET", document.location.href = '/view/admin/common/system/user/view' + "?userSeq=" + rowData.userSeq;
contentType: "application/json; charset=utf-8", }
datatype: "JSON",
async: false,
url: '/adm/menu/oprmng' + "?serviceType=M",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';
});
}
})
$('#serviceGroup').html(html);
$('#serviceGroup').niceSelect('update');
};
function getCust() { var PagingDataTable = function () {
var html = '<option value="' + "ALL" + '">' + "전체" + '</option>'; // console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
$.ajax({ var paging = JSON.stringify({'page': 0, 'size': 10})
type: "GET", $('#listTable').DataTable(
contentType: "application/json; charset=utf-8", {
datatype: "JSON", ajax: {
async: false, url: '/admin/common/system/user/list',
url: '/admin/common/system/user/cust/select', contentType: "application/json; charset=utf-8",
success: function (data) { type: "POST",
// console.log(JSON.stringify(data)); dataType: "JSON",
data.forEach(function (e, f) { async: false,
html += '<option value="' + e.custCode + '">' + e.custName + '</option>'; data: function (data) {
}); var json = {};
} if (data) {
}) json.page = data.start / data.length;
$('#selectCust').html(html); json.size = 10
$('#selectCust').niceSelect('update'); json.custCode = $("#selectCust option:selected").val();
} json.codeType = $("#codeType option:selected").val();
json.codeText = $('#codeText').val();
function viewPage(rowData) { } else {
// console.log(rowData.userSeq); json = JSON.stringify({'page': 0, 'size': 10});
// document.location.href = "/BotMain_VM/admin/common/system/user/view" + "?userSeq=" + rowData.userSeq; }
document.location.href = '/view/admin/common/system/user/view' + "?userSeq=" + rowData.userSeq; return JSON.stringify(json);
} }
,
var PagingDataTable = function () { dataFilter: function (data) {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"})); var jsons = jQuery.parseJSON(data);
var paging = JSON.stringify({'page': 0, 'size': 10}) // console.log(JSON.stringify(data));
$('#listTable').DataTable( var json = {};
{ json.recordsTotal = jsons.getTotal;
ajax: { json.recordsFiltered = jsons.getTotal;
url: '/admin/common/system/user/list', json.data = jsons.getList;
contentType: "application/json; charset=utf-8", // console.log(json);
type: "POST", return JSON.stringify(json);
dataType: "JSON", }
async: false, },
data: function (data) { columns: [
var json = {}; {data: "custCode"},
if (data) { {data: "custName"},
json.page = data.start / data.length; // {data: "serviceGroup"},
json.size = 10 // {data: "serviceGroupName"},
json.custCode = $("#selectCust option:selected").val(); {data: "userSeq"},
json.codeType = $("#codeType option:selected").val(); {data: "userId"},
json.codeText = $('#codeText').val(); {data: "userName"},
{data: "eMail"},
{data: "mobileNo"},
{data: "useYn"},
{data: "registDate"}
],
order: [0, "asc"],
scrollX: false,
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: false,
sProcessing: false,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
// pagingType: "first_last_numbers"
} else { columnDefs: [
json = JSON.stringify({'page': 0, 'size': 10}); {
} targets: 0,
return JSON.stringify(json); visible: false,
searchable: false,
orderable: false,
render: function (data) {
// console.log(data)
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
} }
, },
dataFilter: function (data) { {
var jsons = jQuery.parseJSON(data); targets: 2,
// console.log(JSON.stringify(data)); visible: false,
var json = {}; searchable: false,
json.recordsTotal = jsons.getTotal; orderable: false,
json.recordsFiltered = jsons.getTotal; render: function (data) {
json.data = jsons.getList; return '<a style="display: block;text-align: center;">' + data + '</a>';
// console.log(json);
return JSON.stringify(json);
} }
}, },
columns: [ {
{data: "custCode"}, targets: 3,
{data: "custName"}, orderable: false,
// {data: "serviceGroup"}, render: function (data) {
// {data: "serviceGroupName"}, return '<a style="display: block;text-align: center;">' + data + '</a>';
{data: "userSeq"},
{data: "userId"},
{data: "userName"},
{data: "eMail"},
{data: "mobileNo"},
{data: "useYn"},
{data: "registDate"}
],
order: [0, "asc"],
scrollX: false,
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: false,
sProcessing: false,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
// pagingType: "first_last_numbers"
columnDefs: [
{
targets: 0,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
// console.log(data)
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 3,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
visible: false,
searchable: false,
targets: 5,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 6,
orderable: false,
render: function (data) {
if (data == null)
data = '';
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 7,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
// {
// targets: 8,
// render: function (data) {
// return '<a style="display: block;text-align: center;">' + data + '</a>';
// }
// },
// {
// targets: 9,
// render: function (data) {
// return '<a style="display: block;text-align: center;">' + data + '</a>';
// }
// },
{
targets: 8,
orderable: false,
render: function (data, type, full, meta) {
// var arr = data.slice();
// return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
}
} }
] },
} {
) targets: 4,
}; orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
visible: false,
searchable: false,
targets: 5,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 6,
orderable: false,
render: function (data) {
if (data == null)
data = '';
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 7,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
// {
// targets: 8,
// render: function (data) {
// return '<a style="display: block;text-align: center;">' + data + '</a>';
// }
// },
// {
// targets: 9,
// render: function (data) {
// return '<a style="display: block;text-align: center;">' + data + '</a>';
// }
// },
{
targets: 8,
orderable: false,
render: function (data, type, full, meta) {
// var arr = data.slice();
// return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
}
}
]
}
)
};
function fnCustSearchBtn() { function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload(); $('#listTable').DataTable().ajax.reload();
}; };
function fnInsertBtn() { function fnInsertBtn() {
// document.location.href = "/BotMain_VM/admin/common/system/user/insert"; // document.location.href = "/BotMain_VM/admin/common/system/user/insert";
document.location.href = '/view/admin/common/system/user/insert'; document.location.href = '/view/admin/common/system/user/insert';
} }
</script> </script>
<body> <body>
<h1>ICOMSYS ADMIN</h1> <h1>ICOMSYS ADMIN</h1>
<div class="skip_navigation"> <div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="system_management">
<div class="location">
<ul> <ul>
<li> <li class="home"><a href="#">HOME</a></li>
<a href="#Content" class="go_content">본문 바로가기</a> <li><a href="#">시스템관리</a></li>
</li> <li><a href="#">사용자관리</a></li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul> </ul>
</div> </div>
<header id="header"> <div class="sub_cont menu06_01_03">
</header> <div class="cont_box">
<section id="Content" class="system_management"> <div class="box_title">
<div class="location"> <div class="fl">
<ul> <h2 class="mt12">사용자 조회</h2>
<li class="home"><a href="#">HOME</a></li> </div>
<li><a href="#">시스템관리</a></li> <div class="fr">
<li><a href="#">사용자관리</a></li> <div class="btn_wrap fl">
</ul> <a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
<div class="sub_cont menu06_01_03">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">사용자 조회</h2>
</div>
<div class="fr">
<div class="btn_wrap fl">
<a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
</div> </div>
</div> </div>
<div class="tbl"> </div>
<table class="search block"> <div class="tbl">
<table class="search block">
<colgroup>
<col width="140px">
<col width="25%">
<col width="140px">
<col width="25%">
<col width="140px">
<col width="25%">
</colgroup>
<tbody>
<tr>
<th class="tl">고객사</th>
<td>
<div class="sel_box">
<select id="selectCust" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</td>
<th class="tl">분류</th>
<td>
<div class="sel_box">
<select id="codeType" class="wide">
<option value="ALL">분류 선택</option>
<option value="userId">사용자아이디</option>
<option value="userName">사용자이름</option>
</select>
</div>
</td>
<th class="tl">검색어</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12"> 사용자 리스트</h2>
</div>
<div class="btn_wrap fr">
<%-- <a href="#" class="btn grey" id="btnDelCust">삭제</a>--%>
<%-- <a href="#" rel="reg_modal" class="btn modalLoad" id="btnRegModal">추가</a>--%>
<a href="#" class="btn line modalLoad" id="btnRegModal">등록</a>
</div>
</div>
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup> <colgroup>
<col width="140px"> <col width="auto">
<col width="25%"> <col width="auto">
<col width="140px"> <col width="auto">
<col width="25%"> <col width="auto">
<col width="140px"> <col width="auto">
<col width="25%"> <col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
</colgroup> </colgroup>
<tbody> <thead>
<tr> <tr>
<th class="tl">고객사</th> <th>고객사코드</th>
<td> <th>고객사</th>
<div class="sel_box"> <th>사용자시퀀스</th>
<select id="selectCust" class="wide"> <th>사용자아이디</th>
<option value="ALL">전체</option> <th>사용자이름</th>
</select> <th>eMail</th>
</div> <th>전화번호</th>
</td> <th>사용여부</th>
<th class="tl">분류</th> <th>생성일</th>
<td>
<div class="sel_box">
<select id="codeType" class="wide">
<option value="ALL">분류 선택</option>
<option value="userId">사용자아이디</option>
<option value="userName">사용자이름</option>
</select>
</div>
</td>
<th class="tl">검색어</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr> </tr>
</thead>
<tbody>
</tbody> </tbody>
</table> </table>
</div> </form>
</div> </div>
<div class="cont_box"> </div>
<div class="box_title"> </div>
<div class="fl"> </section>
<h2 class="mt12"> 사용자 리스트</h2>
</div>
<div class="btn_wrap fr">
<%-- <a href="#" class="btn grey" id="btnDelCust">삭제</a>--%>
<%-- <a href="#" rel="reg_modal" class="btn modalLoad" id="btnRegModal">추가</a>--%>
<a href="#" class="btn line modalLoad" id="btnRegModal">등록</a>
</div>
</div>
<div class="tbl"> </body>
<form id="custListForm">
<table id="listTable" class="">
<colgroup>
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
</colgroup>
<thead>
<tr>
<th>고객사코드</th>
<th>고객사</th>
<th>사용자시퀀스</th>
<th>사용자아이디</th>
<th>사용자이름</th>
<th>eMail</th>
<th>전화번호</th>
<th>사용여부</th>
<th>생성일</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</div>
</div>
</section>
</body>
</th:block>
</html>

@ -1,379 +1,371 @@
<!DOCTYPE html> <head>
<html xmlns:th="http://www.thymeleaf.org" <meta charset="UTF-8">
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" <title>운영자관리</title>
layout:decorate="~{layout/layout}"> </head>
<th:block layout:fragment="content">
<head>
<meta charset="UTF-8">
<title>운영자관리</title>
</head>
<script>
$(document).ready(function () {
<script> getCust();
$(document).ready(function () { PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
getCust(); $('#btnSearchOpr').on('click', function () {
PagingDataTable(); fnCustSearchBtn();
$('#listTable tbody').on('dblclick', 'tr', function () { });
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
$('#btnSearchOpr').on('click', function () { $('#btnRegModal').on('click', function () {
fnCustSearchBtn(); fnInsertBtn();
}); });
$('#btnRegModal').on('click', function () {
fnInsertBtn();
});
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
}
);
$("#Content").on("keyup", function (key) { function getOpr() {
if (key.keyCode == 13) { var html = '<option value="' + "ALL" + '">' + "전체" + '</option>';
fnCustSearchBtn(); $.ajax({
} type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: '/adm/menu/oprmng' + "?serviceType=M",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';
}); });
} }
); })
$('#serviceGroup').html(html);
$('#serviceGroup').niceSelect('update');
};
function getOpr() { function getCust() {
var html = '<option value="' + "ALL" + '">' + "전체" + '</option>'; var html = '<option value="' + "ALL" + '">' + "전체" + '</option>';
$.ajax({ $.ajax({
type: "GET", type: "GET",
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",
datatype: "JSON", datatype: "JSON",
async: false, async: false,
url: '/adm/menu/oprmng' + "?serviceType=M", url: '/admin/common/system/user/cust/select',
success: function (data) { success: function (data) {
// console.log(JSON.stringify(data)); // console.log(JSON.stringify(data));
data.forEach(function (e, f) { data.forEach(function (e, f) {
html += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>'; html += '<option value="' + e.custCode + '">' + e.custName + '</option>';
}); });
} }
}) })
$('#serviceGroup').html(html); $('#selectCust').html(html);
$('#serviceGroup').niceSelect('update'); $('#selectCust').niceSelect('update');
}; }
function getCust() {
var html = '<option value="' + "ALL" + '">' + "전체" + '</option>';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: '/admin/common/system/user/cust/select',
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html += '<option value="' + e.custCode + '">' + e.custName + '</option>';
});
}
})
$('#selectCust').html(html);
$('#selectCust').niceSelect('update');
}
function viewPage(rowData) {
// console.log(rowData.userSeq);
document.location.href = '/view/admin/common/system/userAdmin/view' + "?userSeq=" + rowData.userSeq;
// document.location.href = '/admin/common/system/cust/view';
}
function viewPage(rowData) { var PagingDataTable = function () {
// console.log(rowData.userSeq); // console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
document.location.href = '/view/admin/common/system/userAdmin/view' + "?userSeq=" + rowData.userSeq; var paging = JSON.stringify({'page': 0, 'size': 10})
// document.location.href = '/admin/common/system/cust/view'; $('#listTable').DataTable(
} {
ajax: {
url: '/admin/common/system/userAdmin/list',
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "JSON",
async: false,
data: function (data) {
var json = {};
if (data) {
json.page = data.start / data.length;
json.size = 10
json.custCode = $("#selectCust option:selected").val();
json.codeType = $("#codeType option:selected").val();
json.codeText = $('#codeText').val();
var PagingDataTable = function () { } else {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"})); json = JSON.stringify({'page': 0, 'size': 10});
var paging = JSON.stringify({'page': 0, 'size': 10}) }
$('#listTable').DataTable( return JSON.stringify(json);
{ }
ajax: { ,
url: '/admin/common/system/userAdmin/list', dataFilter: function (data) {
contentType: "application/json; charset=utf-8", var jsons = jQuery.parseJSON(data);
type: "POST", // console.log(JSON.stringify(data));
dataType: "JSON", var json = {};
async: false, json.recordsTotal = jsons.getTotal;
data: function (data) { json.recordsFiltered = jsons.getTotal;
var json = {}; json.data = jsons.getList;
if (data) { // console.log(json);
json.page = data.start / data.length; return JSON.stringify(json);
json.size = 10 }
json.custCode = $("#selectCust option:selected").val(); },
json.codeType = $("#codeType option:selected").val(); columns: [
json.codeText = $('#codeText').val(); {data: "custCode"},
{data: "custName"},
// {data: "serviceGroup"},
// {data: "serviceGroupName"},
{data: "userSeq"},
{data: "userId"},
{data: "userName"},
{data: "eMail"},
{data: "mobileNo"},
{data: "useYn"},
{data: "registDate"}
],
order: [0, "asc"],
scrollX: false,
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: false,
sProcessing: false,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
// pagingType: "first_last_numbers"
} else { columnDefs: [
json = JSON.stringify({'page': 0, 'size': 10}); {
} targets: 0,
return JSON.stringify(json); visible: false,
searchable: false,
orderable: false,
render: function (data) {
// console.log(data)
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
} }
, },
dataFilter: function (data) { {
var jsons = jQuery.parseJSON(data); targets: 2,
// console.log(JSON.stringify(data)); visible: false,
var json = {}; searchable: false,
json.recordsTotal = jsons.getTotal; orderable: false,
json.recordsFiltered = jsons.getTotal; render: function (data) {
json.data = jsons.getList; return '<a style="display: block;text-align: center;">' + data + '</a>';
// console.log(json);
return JSON.stringify(json);
} }
}, },
columns: [ {
{data: "custCode"}, targets: 3,
{data: "custName"}, orderable: false,
// {data: "serviceGroup"}, render: function (data) {
// {data: "serviceGroupName"}, return '<a style="display: block;text-align: center;">' + data + '</a>';
{data: "userSeq"},
{data: "userId"},
{data: "userName"},
{data: "eMail"},
{data: "mobileNo"},
{data: "useYn"},
{data: "registDate"}
],
order: [0, "asc"],
scrollX: false,
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: false,
sProcessing: false,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
// pagingType: "first_last_numbers"
columnDefs: [
{
targets: 0,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
// console.log(data)
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 3,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
visible: false,
searchable: false,
targets: 5,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 6,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 7,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
// {
// targets: 8,
// render: function (data) {
// return '<a style="display: block;text-align: center;">' + data + '</a>';
// }
// },
// {
// targets: 9,
// render: function (data) {
// return '<a style="display: block;text-align: center;">' + data + '</a>';
// }
// },
{
targets: 8,
orderable: false,
render: function (data, type, full, meta) {
// var arr = data.slice();
// return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
}
} }
] },
} {
) targets: 4,
}; orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
visible: false,
searchable: false,
targets: 5,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 6,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 7,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
// {
// targets: 8,
// render: function (data) {
// return '<a style="display: block;text-align: center;">' + data + '</a>';
// }
// },
// {
// targets: 9,
// render: function (data) {
// return '<a style="display: block;text-align: center;">' + data + '</a>';
// }
// },
{
targets: 8,
orderable: false,
render: function (data, type, full, meta) {
// var arr = data.slice();
// return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
}
}
]
}
)
};
function fnCustSearchBtn() { function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload(); $('#listTable').DataTable().ajax.reload();
}; };
function fnInsertBtn() {
document.location.href = '/view/admin/common/system/userAdmin/insert';
}
function fnInsertBtn() {
document.location.href = '/view/admin/common/system/userAdmin/insert';
}
</script>
</script>
<body>
<body> <h1>ICOMSYS ADMIN</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<h1>ICOMSYS ADMIN</h1> <header id="header">
<div class="skip_navigation"> </header>
<section id="Content" class="system_management">
<div class="location">
<ul> <ul>
<li> <li class="home"><a href="#">HOME</a></li>
<a href="#Content" class="go_content">본문 바로가기</a> <li><a href="#">시스템관리</a></li>
</li> <li><a href="#">운영자관리</a></li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul> </ul>
</div> </div>
<header id="header"> <div class="sub_cont menu06_01_03">
</header> <div class="cont_box">
<section id="Content" class="system_management"> <div class="box_title">
<div class="location"> <div class="fl">
<ul> <h2 class="mt12">운영자 조회</h2>
<li class="home"><a href="#">HOME</a></li> </div>
<li><a href="#">시스템관리</a></li> <div class="fr">
<li><a href="#">운영자관리</a></li> <div class="btn_wrap fl">
</ul> <a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
<div class="sub_cont menu06_01_03">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">운영자 조회</h2>
</div>
<div class="fr">
<div class="btn_wrap fl">
<a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
</div> </div>
</div> </div>
<div class="tbl"> </div>
<table class="search block"> <div class="tbl">
<table class="search block">
<colgroup>
<col width="140px">
<col width="25%">
<col width="140px">
<col width="25%">
<col width="140px">
<col width="25%">
</colgroup>
<tbody>
<tr>
<th class="tl">고객사</th>
<td>
<div class="sel_box">
<select id="selectCust" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</td>
<th class="tl">분류</th>
<td>
<div class="sel_box">
<select id="codeType" class="wide">
<option value="ALL">분류 선택</option>
<option value="userId">운영자아이디</option>
<option value="userName">움영자이름</option>
</select>
</div>
</td>
<th class="tl">검색어</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12"> 운영자 리스트</h2>
</div>
<div class="btn_wrap fr">
<a href="#" class="btn line modalLoad" id="btnRegModal">등록</a>
</div>
</div>
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup> <colgroup>
<col width="140px"> <col width="auto">
<col width="25%"> <col width="auto">
<col width="140px"> <col width="auto">
<col width="25%"> <col width="auto">
<col width="140px"> <col width="auto">
<col width="25%"> <col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
</colgroup> </colgroup>
<tbody> <thead>
<tr> <tr>
<th class="tl">고객사</th> <th>고객사코드</th>
<td> <th>고객사</th>
<div class="sel_box"> <th>운영자시퀀스</th>
<select id="selectCust" class="wide"> <th>운영자아이디</th>
<option value="ALL">전체</option> <th>운영자이름</th>
</select> <th>eMail</th>
</div> <th>전화번호</th>
</td> <th>사용여부</th>
<th class="tl">분류</th> <th>생성일</th>
<td>
<div class="sel_box">
<select id="codeType" class="wide">
<option value="ALL">분류 선택</option>
<option value="userId">운영자아이디</option>
<option value="userName">움영자이름</option>
</select>
</div>
</td>
<th class="tl">검색어</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr> </tr>
</thead>
<tbody>
</tbody> </tbody>
</table> </table>
</div> </form>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12"> 운영자 리스트</h2>
</div>
<div class="btn_wrap fr">
<a href="#" class="btn line modalLoad" id="btnRegModal">등록</a>
</div>
</div>
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup>
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
</colgroup>
<thead>
<tr>
<th>고객사코드</th>
<th>고객사</th>
<th>운영자시퀀스</th>
<th>운영자아이디</th>
<th>운영자이름</th>
<th>eMail</th>
<th>전화번호</th>
<th>사용여부</th>
<th>생성일</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</div> </div>
</div> </div>
</section> </div>
</section>
</body> </body>
</th:block>
</html>

@ -1,9 +1,3 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<th:block layout:fragment="content">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>사용자관리</title> <title>사용자관리</title>
@ -32,10 +26,10 @@
// }) // })
// }); // });
//선택 이벤트 //선택 이벤트
$('#newCustUser').change(function () { $('#newCustUser').change(function () {
SelectServiceGroupUpdate($(this).val()) SelectServiceGroupUpdate($(this).val())
}); });
//서비스그룹 추가 -> 적용버튼 //서비스그룹 추가 -> 적용버튼
@ -343,7 +337,7 @@
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",
datatype: "JSON", datatype: "JSON",
async: false, async: false,
url: '/adm/menu/oprmng'+ "?serviceType=M", url: '/adm/menu/oprmng' + "?serviceType=M",
success: function (data) { success: function (data) {
// console.log(JSON.stringify(data)); // console.log(JSON.stringify(data));
data.forEach(function (e, f) { data.forEach(function (e, f) {
@ -384,14 +378,14 @@
} }
; ;
function SelectServiceGroupUpdate(custCode){ function SelectServiceGroupUpdate(custCode) {
var html1 = ''; var html1 = '';
$.ajax({ $.ajax({
type: "GET", type: "GET",
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",
datatype: "JSON", datatype: "JSON",
async: false, async: false,
url: '/admin/common/system/userAdmin/service/select' + "?custCode="+custCode, url: '/admin/common/system/userAdmin/service/select' + "?custCode=" + custCode,
success: function (data) { success: function (data) {
// console.log(JSON.stringify(data)); // console.log(JSON.stringify(data));
data.forEach(function (e, f) { data.forEach(function (e, f) {
@ -458,11 +452,10 @@
var reg = /(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{10,}$/; var reg = /(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{10,}$/;
if(text2.length > 7){ if (text2.length > 7) {
if (text1 === text2) { if (text1 === text2) {
$('#passDoubleCheckUi').html(htmlY) $('#passDoubleCheckUi').html(htmlY)
} } else {
else {
$('#passDoubleCheckUi').html(htmlN) $('#passDoubleCheckUi').html(htmlN)
} }
} }
@ -470,19 +463,15 @@
if (text1.length < 10 || text1.length > 20) { if (text1.length < 10 || text1.length > 20) {
$('#passCheckUi').html(htmlN) $('#passCheckUi').html(htmlN)
return; return;
} } else if (text1.search(/\s/) != -1) {
else if (text1.search(/\s/) != -1) {
$('#passCheckUi').html(htmlN) $('#passCheckUi').html(htmlN)
return false; return false;
} } else if (false === reg.test(text1)) {
else if (false === reg.test(text1)) {
$('#passCheckUi').html(regDesc) $('#passCheckUi').html(regDesc)
return false; return false;
} } else if ($('#newUserPassDoubleChkVal').val() == "Y") {
else if ($('#newUserPassDoubleChkVal').val() == "Y") {
newUserDoublePassCheck() newUserDoublePassCheck()
} } else {
else {
$('#passCheckUi').html(htmlY) $('#passCheckUi').html(htmlY)
return true; return true;
} }
@ -724,7 +713,5 @@
</body> </body>
</th:block>
</html>

@ -3,12 +3,6 @@
<th:block th:fragment="sidebarFragment"> <th:block th:fragment="sidebarFragment">
<style>
header + article {
z -index: 0;
}
</style>
<article> <article>
<div class="lnb_menu_btn_area open"> <div class="lnb_menu_btn_area open">
<a href="#" class="lnb_menu_menu"> <a href="#" class="lnb_menu_menu">
@ -28,10 +22,11 @@
<script type=text/javascript> <script type=text/javascript>
$(document).ready(function () { $(document).ready(function () {
testGetAuth(); GetAuth();
PageControll('/admin/common/dashboard/manage.do');
}).off(lnbEvt()) }).off(lnbEvt())
function testGetAuth() { function GetAuth() {
$.ajax({ $.ajax({
type: "GET", type: "GET",
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",
@ -41,26 +36,54 @@
success: function (data) { success: function (data) {
data.forEach(function (e, i) { data.forEach(function (e, i) {
var addMenu = ''; var addMenu = '';
if (!(e.level == '0' || e.level == '1' )&& !$("#menuSeq" + e.seq).length > 0) { if (!(e.level == '0' || e.level == '1') && !$("#menuSeq" + e.seq).length > 0) {
var menuUrl = "#"; var menuUrl = "#";
if (e.url != '0') { if (e.url != '0') {
menuUrl = e.url; menuUrl = e.url;
} }
addMenu += '<li>' addMenu += '<li>'
+ '<a href=' + menuUrl + '>' //+ '<a href=' + menuUrl + '>'
+ '<a value=' + menuUrl + '>'
// + '<a href="'+'javascript:PageControll('+ menuUrl +')">'
+ '<span>' + '<span>'
+ e.menuName + e.menuName + '</span></a>'
+ '</span></a>'
+ '<ul class="depth' + e.level + '" id="menuSeq' + e.seq + '">' + '<ul class="depth' + e.level + '" id="menuSeq' + e.seq + '">'
+ '</ul>' + '</ul>'
+ '</li>' + '</li>'
$('#menuSeq' + e.seqUpper).append(addMenu); $('#menuSeq' + e.seqUpper).append(addMenu);
} }
}) })
$(".lnb").on("click", "a", function() {
PageControll($(this).attr("value"));
});
} }
}) })
}; };
function PageControll(e) {
if (e == '#') {
return;
}
var redi = '';
if (e == "" || e == null) {
redi = '/admin/common/dashboard/manage.do'
} else {
redi = e;
}
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "HTML",
async: false,
url: redi,
success: function (data) {
$('#pageControll').html(data);
}
});
}
</script> </script>
<script th:src="@{/lib/assets/js/scripts.js}"></script> <script th:src="@{/lib/assets/js/scripts.js}"></script>

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<th:block layout:fragment="content">
<div id="pageControll">
</div>
</th:block>
</html>

@ -140,8 +140,9 @@
}) })
.complete(function (data) { .complete(function (data) {
if (data.status == 200) { if (data.status == 200) {
console.log(data);
document.cookie = 'accessToken=' + data.responseText + '; path=/;'; document.cookie = 'accessToken=' + data.responseText + '; path=/;';
console.log("cookie ="+document.cookie)
document.signinInfoForm.action = '/adm/main/actionSecurityLogin.do'; document.signinInfoForm.action = '/adm/main/actionSecurityLogin.do';
document.signinInfoForm.submit(); document.signinInfoForm.submit();
} else if (data.status == 400) { } else if (data.status == 400) {

Loading…
Cancel
Save