spa식으로 변경

dev_tymeleaf
jangwonseokicom 2 years ago
parent 24ba911482
commit dfea91edc8

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

@ -1,8 +1,4 @@
<!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>
<meta charset="UTF-8">
<title>대시보드</title>
@ -120,5 +116,4 @@
</section>
</body>
</th:block>
</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>
<meta charset="UTF-8">
<title>시나리오코드</title>
@ -77,12 +72,12 @@
fncDeleteCommonCode();
});
// $('#listTable').on('page.dt', function(){
// // var info = table.page.info();
// // console.log( 'Showing page: '+info.page+' of '+info.pages );
// // console.log( 'Showing page: ' );
// modalUi();
// });
// $('#listTable').on('page.dt', function(){
// // var info = table.page.info();
// // console.log( 'Showing page: '+info.page+' of '+info.pages );
// // console.log( 'Showing page: ' );
// modalUi();
// });
}
);
@ -141,7 +136,7 @@
});
}
function fncDeleteCommonCode(){
function fncDeleteCommonCode() {
var json = {};
var majorCode = $("#setMajorCode").val();
var custCode = $("#setCustCode").val();
@ -182,7 +177,7 @@
datatype: "JSON",
async: false,
url: "<c:url value='/adm/menu/oprmng'/>"
// + "?serviceType=S"
// + "?serviceType=S"
,
success: function (data) {
data.forEach(function (e, f) {
@ -340,8 +335,8 @@
//
// if the second column cell is blank apply special formatting
//
console.dir(row);
$(row).addClass('modalLoad').attr('rel','reg_edit_modal');
console.dir(row);
$(row).addClass('modalLoad').attr('rel', 'reg_edit_modal');
}
,
columnDefs: [
@ -534,7 +529,7 @@
<h2 class="mt12">공통 코드 리스트</h2>
</div>
<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>
</div>
</div>
@ -667,7 +662,9 @@
</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>
<dd>
<div class="ipt_box">
@ -728,5 +725,3 @@
<!-- modal :: 공통 코드 수정 팝업 end -->
</body>
</th:block>
</html>

@ -1,265 +1,258 @@
<!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>
<meta charset="UTF-8">
<title>고객사관리</title>
</head>
<head>
<meta charset="UTF-8">
<title>고객사관리</title>
</head>
<script>
$(document).ready(function () {
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
<script>
$(document).ready(function () {
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$('#btnRegModal').on('click', function () {
fnInsertBtn();
});
$("#Content").on("keyup", function (key) {
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 () {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
var paging = JSON.stringify({'page': 0, 'size': 10})
$('#listTable').DataTable(
{
ajax: {
url: '/admin/common/system/cust/list',
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "JSON",
data: function (data) {
var json = {};
if (data) {
json.page = data.start / data.length;
json.size = 10
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);
function fnInsertBtn() {
// document.location.href = "/BotMain_VM/admin/common/system/cust/insert";
document.location.href = '/view/admin/common/system/cust/insert';
}
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/cust/list',
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "JSON",
data: function (data) {
var json = {};
if (data) {
json.page = data.start / data.length;
json.size = 10
json.codeText = $('#codeText').val();
} else {
json = JSON.stringify({'page': 0, 'size': 10});
}
},
columns: [
{data: "custCode"},
{data: "custName"},
{data: "custServiceMent"},
{data: "custTel"},
{data: "useYn"},
{data: "registDate"}
// {data: "registId"},
// {data: "updateDate"},
// {data: "updateId"},
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: "custServiceMent"},
{data: "custTel"},
{data: "useYn"},
{data: "registDate"}
// {data: "registId"},
// {data: "updateDate"},
// {data: "updateId"},
],
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"
],
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) {
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>';
}
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: 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>';
}
},
{
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,
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();
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
</script>
</script>
<body>
<body>
<h1>ICOMSYS ADMIN</h1>
<h1>대시보드</h1>
<div class="skip_navigation">
<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>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">고객사 관리</a></li>
</ul>
</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="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 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 class="tbl">
<table class="search block">
<colgroup>
<col width="140px">
<col width="85%">
</colgroup>
<tbody>
<tr>
<th class="tl">고객사명</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr>
</div>
<div class="tbl">
<table class="search block">
<colgroup>
<col width="140px">
<col width="85%">
</colgroup>
<tbody>
<tr>
<th class="tl">고객사명</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</tbody>
</table>
</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="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">
</colgroup>
<thead>
<tr>
<!-- <th>고객사코드</th>-->
<th>고객사명</th>
<th>고객사안내멘트</th>
<!-- <th>대표번호</th>-->
<th>사용유무</th>
<th>생성일</th>
<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>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</div>
</section>
</body>
</th:block>
</html>
</div>
</section>
</body>

@ -1,529 +1,521 @@
<!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>
<meta charset="UTF-8">
<title>그룹별권한</title>
</head>
<script>
$(document).ready(function () {
getOpr();
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();
});
<head>
<meta charset="UTF-8">
<title>그룹별권한</title>
</head>
<script>
$(document).ready(function () {
getOpr();
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();
});
//선택 이벤트
$('#insertServiceGroup').change(function () {
getRoleAndOpr($(this).val());
});
}
);
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;
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
})
// 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({
type: "GET",
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;
//선택 이벤트
$('#insertServiceGroup').change(function () {
getRoleAndOpr($(this).val());
});
}
);
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 = []
$.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;
}
function getOpr() {
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));
}
})
var setUrl = '';
var role = getRoleAndOpr();
// console.log(role)
if (role === 'SYSTEMADMIN') {
setUrl = '/adm/menu/oprmng';
} else {
setUrl = '/adm/menu/oprmng'
// + "?serviceType=S"
;
}
///!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!수정!!!!!!!!!
function newTreeWrap(serviceGroup) {
if (serviceGroup === 'ALL') {
return;
var html = '<option value="' + "ALL" + '">' + "전체" + '</option>';
$.ajax({
type: "GET",
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>';
});
}
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
}
};
});
})
$('#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 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 = []
$.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;
// $('#newTreeWrap').jstree(true).refresh();
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 (insertGroupName.length < 1) {
$.utils.warning("권한그룹명을 선택해주세요.");
return;
}
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 () {
// 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>';
}
setTimeout(() => {
$('#newTreeWrap').jstree({
'core': {
'data': treeData
},
{
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
"checkbox": {
"keep_selected_style": false
, "three_state": false
},
{
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>
"plugins": ["checkbox"]
});
}, "1")
<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>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">그룹별권한 관리</a></li>
</ul>
</div>
<header id="header">
</header>
<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="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 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">
<div class="tbl">
<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>
<col width="160px">
<col width="5%">
<col width="140px">
<col width="15%">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
</colgroup>
<tbody>
<thead>
<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>
<th>서비스코드</th>
<th>시나리오그룹명</th>
<th>권한번호</th>
<th>권한명</th>
<th>권한설명</th>
<th>고객사코드</th>
<th>생성일</th>
</tr>
</thead>
<tbody>
</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>
<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>
</form>
</div>
</div>
</section>
</div>
</section>
<!-- modal :: 권한그룹생성 -->
<div class="modal" id="createGroupModal">
<div class="modal_header">
<h3>권한그룹 생성</h3>
</div>
<div class="modal_body">
<div class="modal_cont">
<input type="hidden" id="custCode">
<dl>
<dt>
<h4><em class="">시나리오그룹</em></h4>
</dt>
<dd>
<div class="sel_box">
<select id="insertServiceGroup" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</dd>
</dl>
<dl>
<dt>
<h4><em class="">그룹명</em></h4>
</dt>
<dd>
<div class="ipt_box">
<input type="text" id="insertGroupName" placeholder="그룹명을 입력해주세요.">
</div>
</dd>
</dl>
<dl>
<dt>
<h4><em class="">그룹설명</em></h4>
</dt>
<dd>
<div class="ipt_box">
<input type="text" id="insertGroupDesc" placeholder="그룹 설명을 입력해주세요.">
</div>
</dd>
</dl>
<dl>
<dt>
<h4><em class="">권한선택</em></h4>
</dt>
<dd>
<div class="content tree tree-maxHeight type-chk">
<div class="newTreeWrap" id="newTreeWrap">
</div>
<!-- modal :: 권한그룹생성 -->
<div class="modal" id="createGroupModal">
<div class="modal_header">
<h3>권한그룹 생성</h3>
</div>
<div class="modal_body">
<div class="modal_cont">
<input type="hidden" id="custCode">
<dl>
<dt>
<h4><em class="">시나리오그룹</em></h4>
</dt>
<dd>
<div class="sel_box">
<select id="insertServiceGroup" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</dd>
</dl>
<dl>
<dt>
<h4><em class="">그룹명</em></h4>
</dt>
<dd>
<div class="ipt_box">
<input type="text" id="insertGroupName" placeholder="그룹명을 입력해주세요.">
</div>
</dd>
</dl>
<dl>
<dt>
<h4><em class="">그룹설명</em></h4>
</dt>
<dd>
<div class="ipt_box">
<input type="text" id="insertGroupDesc" placeholder="그룹 설명을 입력해주세요.">
</div>
</dd>
</dl>
<dl>
<dt>
<h4><em class="">권한선택</em></h4>
</dt>
<dd>
<div class="content tree tree-maxHeight type-chk">
<div class="newTreeWrap" id="newTreeWrap">
</div>
</dd>
</dl>
</div>
</div>
<div class="modal_footer">
<div class="btn_wrap fr">
<a href="#" id="btnRegModal" class="btn">저장</a>
</div>
</div>
</dd>
</dl>
</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 class="modal_controller">
<a href="#" class="close">close</a>
</div>
</div>
</body>
</th:block>
</html>
</body>

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

@ -1,328 +1,319 @@
<!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>
<meta charset="UTF-8">
<title>그룹별권한</title>
</head>
<head>
<meta charset="UTF-8">
<title>그룹별권한</title>
</head>
<script>
z
$(document).ready(function () {
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() {
$.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>
</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>
<h1>대시보드</h1>
<div class="skip_navigation">
<header id="header">
</header>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">그룹별권한 관리</a></li>
</ul>
</div>
<header id="header">
</header>
<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>
<!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">권한그룹편집</h2>
</div>
<!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">권한그룹편집</h2>
</div>
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
</colgroup>
<tbody>
<tr>
<th class="tl">그룹명</th>
<td>
<div class="ipt_box">
<input type="text" value="인텐트 조회권한" name="" class="">
</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="ipt_box type-flex">
<div class="select2-lib-ipt">
<select class="select-search" multiple="multiple"></select>
</div>
<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 class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
</colgroup>
<tbody>
<tr>
<th class="tl">그룹명</th>
<td>
<div class="ipt_box">
<input type="text" value="인텐트 조회권한" name="" class="">
</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="ipt_box type-flex">
<div class="select2-lib-ipt">
<select class="select-search" multiple="multiple"></select>
</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>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">김길동</label>
</div>
</li>
<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 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>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">홍길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">김길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">김길동</label>
</div>
</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>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">홍길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk04" checked>
<label for="chk04">김길동</label>
</div>
</li>
</ul>
</div> -->
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">김길동</label>
</div>
</li>
</ul>
</div>
</td>
</tr>
<!-- 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>
<tr>
<th class="tl">권한</th>
<td class="tl">
<script>
$(document).ready(function () {
$('.tree_wrap').jstree({
"checkbox": {
"keep_selected_style": false
},
"plugins": ["checkbox"]
});
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk04" checked>
<label for="chk04">김길동</label>
</div>
</li>
</ul>
</div> -->
</div>
</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">
<div class="tree_wrap">
<ul>
<li data-jstree='{ "opened" : true }'>root
<ul>
<li data-jstree='{ "opened" : true }'>주소BOT
<ul>
<li>지명 유사어 관리</li>
<li>빌딩 유사어 관리</li>
<li>유의어 전처리 관리</li>
<li>주소봇 멘트 관리</li>
<li>발화 건물유형 관리</li>
<li>주소 월별 업데이트</li>
<li>주소처리내역(녹취)</li>
</ul>
</li>
<li data-jstree='{ "opened" : true }'>BOT 공통 관리
<ul>
<li data-jstree='{ "opened" : true }'>서비스별관리
<ul>
<li>요일/시간대별 멘트 관리</li>
<li>휴무일 관리</li>
<li>자연어 전처리 관리</li>
</ul>
</li>
<li>공통 코드 관리</li>
</ul>
</li>
<li data-jstree='{ "opened" : true }'>무인접수BOT
<ul>
<li>무인 접수 리스트</li>
<li>제품군 유의어 관리</li>
</ul>
</li>
<li data-jstree='{ "opened" : true }'>영상상담
<ul>
<li>컨텐츠등록 관리</li>
<li>영상상담</li>
<li>상담이력 조회</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
});
</script>
<div class="content tree tree-maxHeight type-chk">
<div class="tree_wrap">
<ul>
<li data-jstree='{ "opened" : true }'>root
<ul>
<li data-jstree='{ "opened" : true }'>주소BOT
<ul>
<li>지명 유사어 관리</li>
<li>빌딩 유사어 관리</li>
<li>유의어 전처리 관리</li>
<li>주소봇 멘트 관리</li>
<li>발화 건물유형 관리</li>
<li>주소 월별 업데이트</li>
<li>주소처리내역(녹취)</li>
</ul>
</li>
<li data-jstree='{ "opened" : true }'>BOT 공통 관리
<ul>
<li data-jstree='{ "opened" : true }'>서비스별관리
<ul>
<li>요일/시간대별 멘트 관리</li>
<li>휴무일 관리</li>
<li>자연어 전처리 관리</li>
</ul>
</li>
<li>공통 코드 관리</li>
</ul>
</li>
<li data-jstree='{ "opened" : true }'>무인접수BOT
<ul>
<li>무인 접수 리스트</li>
<li>제품군 유의어 관리</li>
</ul>
</li>
<li data-jstree='{ "opened" : true }'>영상상담
<ul>
<li>컨텐츠등록 관리</li>
<li>영상상담</li>
<li>상담이력 조회</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</td>
</tr>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="btn_wrap center">
<a href="#" class="btn basic grey">취소</a>
<a href="#" class="btn basic">저장</a>
</div>
<div class="cont_box">
<div class="btn_wrap center">
<a href="#" class="btn basic grey">취소</a>
<a href="#" class="btn basic">저장</a>
</div>
</div>
</div>
</section>
</section>
</body>
</body>
</th:block>
</html>

@ -1,306 +1,298 @@
<!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>
<meta charset="UTF-8">
<title>정책별메뉴</title>
</head>
<head>
<meta charset="UTF-8">
<title>정책별메뉴</title>
</head>
<script>
$(document).ready(function () {
getOpr();
<script>
$(document).ready(function () {
getOpr();
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$('#btnSearchOpr').on('click', function () {
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
});
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
}
});
});
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() {
$.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');
});
}
})
};
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/policyMenu/list',
contentType: "application/json; charset=utf-8",
type: "POST",
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.codeText1 = $('#codeText1').val();
json.codeText2 = $('#codeText2').val();
json.codeText3 = $('#codeText3').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);
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/policyMenu/list',
contentType: "application/json; charset=utf-8",
type: "POST",
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.codeText1 = $('#codeText1').val();
json.codeText2 = $('#codeText2').val();
json.codeText3 = $('#codeText3').val();
} else {
json = JSON.stringify({'page': 0, 'size': 10});
}
},
columns: [
{data: "custCode"},
{data: "custName"},
{data: "serviceGroup"},
{data: "serviceGroupName"},
{data: "policyVal"},
{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"
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: "policyVal"},
{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: [
{
targets: 0,
visible: false,
searchable: false,
render: function (data) {
// console.log(data)
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>';
}
columnDefs: [
{
targets: 0,
visible: false,
searchable: false,
render: function (data) {
// console.log(data)
return '<a style="display: block;text-align: center;" onclick="click()">' + 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>';
}
},
{
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) {
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() {
$('#listTable').DataTable().ajax.reload();
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
</script>
</script>
<body>
<body>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<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>
<header id="header">
</header>
<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>
<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="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 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="40%">
<col width="140px">
<col width="40%">
</colgroup>
<tbody>
<div class="tbl">
<table class="search block">
<colgroup>
<col width="140px">
<col width="40%">
<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>
<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="codeText1" name="typeText1">
</div>
</td>
</tr>
<th class="tl">정책코드</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText1" name="typeText1">
</div>
</td>
</tr>
<tr>
<th class="tl">정책명</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText2" name="typeText2">
</div>
</td>
<tr>
<th class="tl">정책명</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText2" name="typeText2">
</div>
</td>
<th class="tl">메뉴명</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText3" name="typeText3">
</div>
</td>
</tr>
<th class="tl">메뉴명</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText3" name="typeText3">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</tbody>
</table>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">정책별 메뉴 리스트</h2>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">정책별 메뉴 리스트</h2>
</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">
</colgroup>
<thead>
<tr>
<th>고객코드</th>
<th>고객사</th>
<th>서비스그룹</th>
<th>서비스그룹명</th>
<th>정책코드</th>
<th>정책명</th>
<th>메뉴명</th>
<th>메뉴번호</th>
</tr>
</thead>
<tbody>
<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">
</colgroup>
<thead>
<tr>
<th>고객코드</th>
<th>고객사</th>
<th>서비스그룹</th>
<th>서비스그룹명</th>
<th>정책코드</th>
<th>정책명</th>
<th>메뉴명</th>
<th>메뉴번호</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</tbody>
</table>
</form>
</div>
</div>
</section>
</div>
</section>
</body>
</th:block>
</html>
</body>

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

@ -1,324 +1,316 @@
<!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>
<meta charset="UTF-8">
<title>서비스그룹 관리List</title>
</head>
<head>
<meta charset="UTF-8">
<title>서비스그룹 관리List</title>
</head>
<script>
$(document).ready(function () {
<script>
$(document).ready(function () {
getMainOprSelectBox();
getMainOprSelectBox();
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$('#btnSearchOpr').on('click', function () {
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
});
}
});
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
$('#btnRegModal').on('click', function () {
fnServiceGroupInsertBtn();
});
$('#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() {
// document.location.href = "/BotMain_VM/admin/common/system/serviceGroup/insert";
document.location.href = '/view/admin/common/system/serviceGroup/insert';
};
function getMainOprSelectBox() {
$.ajax({
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() {
$.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 viewPage(rowData) {
// console.log(rowData.serviceGroup);
// document.location.href = "/BotMain_VM/admin/common/system/serviceGroup/view" + "?serviceGroup=" + rowData.serviceGroup;
document.location.href = '/view/admin/common/system/serviceGroup/view' + "?serviceGroup=" + rowData.serviceGroup;
}
function getMainOprSelectBox() {
$.ajax({
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');
});
}
})
};
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/serviceGroup/list',
contentType: "application/json; charset=utf-8",
type: "POST",
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);
// document.location.href = "/BotMain_VM/admin/common/system/serviceGroup/view" + "?serviceGroup=" + rowData.serviceGroup;
document.location.href = '/view/admin/common/system/serviceGroup/view' + "?serviceGroup=" + rowData.serviceGroup;
}
],
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"
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/serviceGroup/list',
contentType: "application/json; charset=utf-8",
type: "POST",
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();
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 {
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));
var json = {};
json.recordsTotal = jsons.getTotal;
json.recordsFiltered = jsons.getTotal;
json.data = jsons.getList;
// console.log(json);
return JSON.stringify(json);
},
{
targets: 5,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
columns: [
{data: "custCode"},
{data: "custName"},
{data: "serviceGroup"},
{data: "serviceGroupName"},
{data: "serviceType"},
{data: "useYn"},
{data: "registDate"}
{
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>';
}
}
]
}
)
};
],
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"
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
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>';
}
}
},
{
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>';
}
}
]
}
)
};
</script>
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>
<h1>ICOMSYS ADMIN</h1>
<h1>대시보드</h1>
<div class="skip_navigation">
<section id="Content" class="system_management">
<div class="location">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
<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="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">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템 관리</a></li>
<li><a href="#">서비스그룹 관리</a></li>
</ul>
</tbody>
</table>
</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 class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">서비스그룹 리스트</h2>
</div>
<div class="btn_wrap fr">
</div>
<div class="tbl">
<table class="search block">
</div>
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup>
<col width="140px">
<col width="25%">
<col width="140px">
<col width="40%">
<col width="15%">
<col width="15%">
<col width="15%">
<col width="15%">
<col width="15%">
<col width="auto">
</colgroup>
<tbody>
<thead>
<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>
<th>custCode</th>
<th>고객사</th>
<th>서비스그룹</th>
<th>서비스그룹이름</th>
<th>서비스그룹타입</th>
<th>사용여부</th>
<th>생성일</th>
</tr>
</thead>
<tbody>
</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">
</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>
</form>
</div>
</div>
</section>
</div>
</section>
</body>
</th:block>
</html>
</body>

@ -1,385 +1,379 @@
<!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>
<meta charset="UTF-8">
<title>사용자관리</title>
</head>
<head>
<meta charset="UTF-8">
<title>사용자관리</title>
</head>
<script>
$(document).ready(function () {
<script>
$(document).ready(function () {
// getOprSelect();
getCust();
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
// getOprSelect();
getCust();
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$('#btnRegModal').on('click', function () {
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) {
fnCustSearchBtn();
}
function getOprSelect() {
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() {
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 viewPage(rowData) {
// console.log(rowData.userSeq);
// 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;
}
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');
}
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/user/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();
function viewPage(rowData) {
// console.log(rowData.userSeq);
// 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;
}
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/user/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();
} 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: "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 {
json = JSON.stringify({'page': 0, 'size': 10});
}
return JSON.stringify(json);
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>';
}
,
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);
},
{
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
columns: [
{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"
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: 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>';
}
}
]
}
)
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
function fnInsertBtn() {
// document.location.href = "/BotMain_VM/admin/common/system/user/insert";
document.location.href = '/view/admin/common/system/user/insert';
}
function fnInsertBtn() {
// document.location.href = "/BotMain_VM/admin/common/system/user/insert";
document.location.href = '/view/admin/common/system/user/insert';
}
</script>
</script>
<body>
<body>
<h1>ICOMSYS ADMIN</h1>
<div class="skip_navigation">
<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>
<header id="header">
</header>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">사용자관리</a></li>
</ul>
</div>
<header id="header">
</header>
<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="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 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 class="tbl">
<table class="search block">
</div>
<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>
<col width="140px">
<col width="25%">
<col width="140px">
<col width="25%">
<col width="140px">
<col width="25%">
<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>
<tbody>
<thead>
<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>
<th>고객사코드</th>
<th>고객사</th>
<th>사용자시퀀스</th>
<th>사용자아이디</th>
<th>사용자이름</th>
<th>eMail</th>
<th>전화번호</th>
<th>사용여부</th>
<th>생성일</th>
</tr>
</thead>
<tbody>
</tbody>
</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 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>
</div>
</section>
<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>
</section>
</body>
</body>
</th:block>
</html>

@ -1,379 +1,371 @@
<!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>
<meta charset="UTF-8">
<title>운영자관리</title>
</head>
<head>
<meta charset="UTF-8">
<title>운영자관리</title>
</head>
<script>
$(document).ready(function () {
<script>
$(document).ready(function () {
getCust();
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
getCust();
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$('#btnRegModal').on('click', function () {
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) {
fnCustSearchBtn();
}
function getOpr() {
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 getOpr() {
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 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) {
// console.log(rowData.userSeq);
document.location.href = '/view/admin/common/system/userAdmin/view' + "?userSeq=" + rowData.userSeq;
// document.location.href = '/admin/common/system/cust/view';
}
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/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 () {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
var paging = JSON.stringify({'page': 0, 'size': 10})
$('#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();
} 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: "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 {
json = JSON.stringify({'page': 0, 'size': 10});
}
return JSON.stringify(json);
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>';
}
,
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);
},
{
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
columns: [
{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"
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: 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>';
}
}
]
}
)
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
function fnCustSearchBtn() {
$('#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>
<div class="skip_navigation">
<header id="header">
</header>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">운영자관리</a></li>
</ul>
</div>
<header id="header">
</header>
<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="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 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 class="tbl">
<table class="search block">
</div>
<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>
<col width="140px">
<col width="25%">
<col width="140px">
<col width="25%">
<col width="140px">
<col width="25%">
<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>
<tbody>
<thead>
<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>
<th>고객사코드</th>
<th>고객사</th>
<th>운영자시퀀스</th>
<th>운영자아이디</th>
<th>운영자이름</th>
<th>eMail</th>
<th>전화번호</th>
<th>사용여부</th>
<th>생성일</th>
</tr>
</thead>
<tbody>
</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>
<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>
</form>
</div>
</div>
</section>
</div>
</section>
</body>
</th:block>
</html>
</body>

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

@ -3,12 +3,6 @@
<th:block th:fragment="sidebarFragment">
<style>
header + article {
z -index: 0;
}
</style>
<article>
<div class="lnb_menu_btn_area open">
<a href="#" class="lnb_menu_menu">
@ -28,10 +22,11 @@
<script type=text/javascript>
$(document).ready(function () {
testGetAuth();
GetAuth();
PageControll('/admin/common/dashboard/manage.do');
}).off(lnbEvt())
function testGetAuth() {
function GetAuth() {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
@ -41,26 +36,54 @@
success: function (data) {
data.forEach(function (e, i) {
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 = "#";
if (e.url != '0') {
menuUrl = e.url;
}
addMenu += '<li>'
+ '<a href=' + menuUrl + '>'
//+ '<a href=' + menuUrl + '>'
+ '<a value=' + menuUrl + '>'
// + '<a href="'+'javascript:PageControll('+ menuUrl +')">'
+ '<span>'
+ e.menuName
+ '</span></a>'
+ e.menuName + '</span></a>'
+ '<ul class="depth' + e.level + '" id="menuSeq' + e.seq + '">'
+ '</ul>'
+ '</li>'
$('#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 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) {
if (data.status == 200) {
console.log(data);
document.cookie = 'accessToken=' + data.responseText + '; path=/;';
console.log("cookie ="+document.cookie)
document.signinInfoForm.action = '/adm/main/actionSecurityLogin.do';
document.signinInfoForm.submit();
} else if (data.status == 400) {

Loading…
Cancel
Save