bkjxxxw/WebContent/webpage/modules/sys/areaList.jsp

132 lines
4.9 KiB
Plaintext
Raw Normal View History

2024-03-18 10:04:33 +08:00
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
<title>区域管理</title>
<meta name="decorator" content="default" />
<%@include file="/webpage/include/treetable.jsp"%>
<script type="text/javascript">
$(document).ready(function() {
var tpl = $("#treeTableTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
var data = ${fns:toJson(list)}, rootId = "0";
addRow("#treeTableList", tpl, data, rootId, true);
$("#treeTable").treeTable({expandLevel : 5});
});
function addRow(list, tpl, data, pid, root){
for (var i=0; i<data.length; i++){
var row = data[i];
if ((${fns:jsGetVal('row.parentId')}) == pid){
$(list).append(Mustache.render(tpl, {
dict: {
type: getDictLabel(${fns:toJson(fns:getDictList('sys_area_type'))}, row.type)
}, pid: (root?0:pid), row: row
}));
addRow(list, tpl, data, row.id);
}
}
}
function refresh(){//刷新
window.location="${ctx}/sys/area/";
};
</script>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-list-content">
<div class="ibox">
<div class="ibox-content ibox-content-list">
<sys:message content="${message}" />
<div class="pane-query-circle">
<!--查询条件-->
<div class="row">
<div class="col-sm-12">
<div class="row pane-query-anying">
<div
class="col-sm-6 col-md-4 col-lg-3 pane-query-anying-div pane-query-anying-div-button">
<div class="pull-right pane-query-anying-div-input">
<shiro:hasPermission name="sys:area:add">
<table:addRow url="${ctx}/sys/area/form" title="区域"></table:addRow>
<!-- 增加按钮 -->
</shiro:hasPermission>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="ibox-title"> -->
<!-- <h5>区域列表 </h5> -->
<!-- <div class="ibox-tools"> -->
<!-- <a class="collapse-link"> -->
<!-- <i class="fa fa-chevron-up"></i> -->
<!-- </a> -->
<!-- <a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#"> -->
<!-- <i class="fa fa-wrench"></i> -->
<!-- </a> -->
<!-- <ul class="dropdown-menu dropdown-user"> -->
<!-- <li><a href="###">选项1</a> -->
<!-- </li> -->
<!-- <li><a href="###">选项2</a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- <a class="close-link"> -->
<!-- <i class="fa fa-times"></i> -->
<!-- </a> -->
<!-- </div> -->
<!-- </div> -->
<table id="treeTable"
class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
<thead>
<tr>
<th><nobr>区域名称</nobr></th>
<th><nobr>区域编码</nobr></th>
<th><nobr>区域类型</nobr></th>
<th><nobr>备注</nobr></th>
<th style="width: 75px;"><nobr>操作</nobr></th>
</tr>
</thead>
<tbody id="treeTableList"></tbody>
</table>
<br/>
</div>
</div>
<%-- <shiro:hasPermission name="sys:area:view"> --%>
<%-- <a href="###" title="查看区域" onclick="openDialogView('查看区域', '${ctx}/sys/area/form?id={{row.id}}','800px', '500px')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> </a> --%>
<%-- </shiro:hasPermission> --%>
<script type="text/template" id="treeTableTpl">
<tr id="{{row.id}}" pId="{{pid}}">
<td class="query-datatable-nowrap" title="{{row.name}}"><a href="###" onclick="openDialogView('查看区域', '${ctx}/sys/area/form?id={{row.id}}','800px', '500px')">
<label class="query-datatable-nowrap td-fixed-width-200">
{{row.name}}
</label>
</a></td>
<td class="query-datatable-nowrap" title="{{row.code}}">
<label class="query-datatable-nowrap td-fixed-width-200">
{{row.code}}
</label>
</td>
<td class="query-datatable-nowrap">{{dict.type}}</td>
<td class="query-datatable-nowrap" title="{{row.remarks}}">
<label class="query-datatable-nowrap td-fixed-width-200">{{row.remarks}}</label>
</td>
<td class="query-datatable-nowrap">
<shiro:hasPermission name="sys:area:edit">
<a href="###" title="修改区域" onclick="openDialog('修改区域', '${ctx}/sys/area/form?id={{row.id}}','800px', '500px')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> </a>
</shiro:hasPermission>
<shiro:hasPermission name="sys:area:del">
<a href="${ctx}/sys/area/delete?id={{row.id}}" title="删除区域" onclick="return confirmx('要删除该区域及所有子区域项吗?', this.href)" class="btn btn-danger btn-xs" ><i class="fa fa-trash"></i> </a>
</shiro:hasPermission>
<shiro:hasPermission name="sys:area:add">
<a href="###" title="添加下级区域" onclick="openDialog('添加下级区域', '${ctx}/sys/area/form?parent.id={{row.id}}','800px', '500px')" class="btn btn-primary btn-xs" ><i class="fa fa-plus"></i> </a>
</shiro:hasPermission>
</td>
</tr>
</script>
</body>
</html>