This commit is contained in:
133
app/Views/pages/manage/menu/lists.php
Normal file
133
app/Views/pages/manage/menu/lists.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#logList tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>메뉴 관리</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-xl-7">
|
||||
<div class="main-card mb-3 card">
|
||||
<!-- <div class="card-header">조직 관리</div> -->
|
||||
<div class="card-body">
|
||||
<table id="menuList" class="table table-hover table-striped table-bordered"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 col-xl-5">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header">메뉴 정보</div>
|
||||
<div class="card-body">
|
||||
<form action="frm_menu_info" onsubmit="return false;">
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- The jqGrid language file code-->
|
||||
<script type="text/javascript" src="//cdn.jsdelivr.net/jqgrid/4.6.0/i18n/grid.locale-kr.js">
|
||||
</script>
|
||||
<!-- The atual jqGrid code -->
|
||||
<script type="text/javascript" src="//cdn.jsdelivr.net/jqgrid/4.6.0/jquery.jqGrid.src.js">
|
||||
</script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/themes/redmond/jquery-ui.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/free-jqgrid/4.15.5/css/ui.jqgrid.min.css">
|
||||
<script type="text/javascript">
|
||||
|
||||
const tpl = document.querySelector('.my-loader-template')
|
||||
let date = new Date()
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#menuList").jqGrid({
|
||||
url: "/manage/menu/getMenuList",
|
||||
datatype: "json",
|
||||
mtype: "POST",
|
||||
height: 480,
|
||||
rowNum: 10000,
|
||||
autowidth: true,
|
||||
width: "auto",
|
||||
shrinkToFit: true,
|
||||
treeGrid: true,
|
||||
treedatatype: "json",
|
||||
gridview: true,
|
||||
sortorder: "desc",
|
||||
ExpandColumn: 'mnu_nm',
|
||||
expanded: true,
|
||||
viewrecords: true,
|
||||
scrollrows: true,
|
||||
treeGridModel: 'adjacency',
|
||||
colNames: ['메뉴명', '메뉴ID', '메뉴유형코드', '메뉴유형', 'URL', '정렬순서'],
|
||||
colModel: [
|
||||
{ name: 'mnu_nm', index: 'mnu_nm', width: 150 },
|
||||
{ name: 'mnu_id', index: 'mnu_id', width: 80 },
|
||||
{ name: 'menu_tp', index: 'menu_tp', width: 50, hidden: true },
|
||||
{ name: 'menu_tp_nm', index: 'menu_tp_nm', width: 100, align: "center" },
|
||||
{ name: 'mnu_url', index: 'mnu_url', width: 200 },
|
||||
{ name: 'view_odr', index: 'view_odr', width: 50, align: "center" }
|
||||
],
|
||||
|
||||
jsonReader: {
|
||||
// root: "rows", // 🔹 지금 JSON 구조: { total: "...", rows: [ ... ] }
|
||||
repeatitems: false,
|
||||
id: "mnu_id"
|
||||
},
|
||||
|
||||
treeReader: {
|
||||
parent_id_field: "mnu_pid", // 🔴 부모 필드 지정 (중요)
|
||||
level_field: "level", // 이미 JSON에 들어있음
|
||||
left_field: "lft",
|
||||
right_field: "rgt",
|
||||
leaf_field: "isLeaf", // true / false (boolean 권장)
|
||||
expanded_field: "expanded", // ROOT(M) 에만 true 있으면 됨
|
||||
icon_field: "iconCls"
|
||||
},
|
||||
|
||||
|
||||
sortname: "mnu_id",
|
||||
sortorder: "asc",
|
||||
|
||||
loadComplete: function () {
|
||||
$("#menuList")
|
||||
.jqGrid('setGridParam', { datatype: 'local' })
|
||||
.trigger("reloadGrid");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
Reference in New Issue
Block a user