This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
k18-ntcs-web-ntc/src/main/webapp/WEB-INF/views/sys/officeList.jsp
2018-12-13 14:01:06 +08:00

95 lines
3.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>机构管理</title>
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/global/scripts/mustache.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
var tpl = $("#treeTableTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
var data = ${fns:toJson(list)}, rootId = "${not empty sysOffice.id ? sysOffice.id : 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];
var value = ${fns:jsGetVal('row.parentId')};
if(!value){
value = 0;
}
if (value == pid){
$(list).append(Mustache.render(tpl, {
dict: {
type: getDictLabel(${fns:toJson(fns:getDictList('SYS_OFFICE_TYPE'))}, row.type),
grade: getDictLabel(${fns:toJson(fns:getDictList('SYS_OFFICE_GRADE'))}, row.grade),
jobType: getDictLabel(${fns:toJson(fns:getDictList('SYS_JOB_TYPE'))}, row.jobType)
},
pid: (root?0:pid),
row: row
}));
addRow(list, tpl, data, row.id);
}
}
}
</script>
</head>
<body>
<div class="page-content">
<div class="row">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<!-- <ul class="nav nav-tabs"> -->
<%-- <li class="active"><a href="${ctx}/sys/office/list?id=${sysOffice.id}&parentIds=${sysOffice.parentIds}">机构列表</a></li> --%>
<%-- <shiro:hasPermission name="sys:office:edit"><li><a href="${ctx}/sys/office/form?parent.id=${sysOffice.id}">机构添加</a></li></shiro:hasPermission> --%>
<!-- </ul> -->
<div class="">
<sys:message content="${message}" type="${messageType }"/>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead><tr><th><spring:message code="org_name"/></th><th><spring:message code="belong_area"/></th><th><spring:message code="org_coding"/></th><th><spring:message code="level"/></th><th><spring:message code="org_type"/></th><th><spring:message code="org_duty_type"/></th><th><spring:message code="remarks"/></th><shiro:hasPermission name="sys:office:edit"><th><spring:message code="operation"/></th></shiro:hasPermission></tr></thead>
<tbody id="treeTableList"></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/template" id="treeTableTpl">
<tr id="{{row.id}}" pId="{{pid}}">
<td><a href="${ctx}/sys/office/form?id={{row.id}}">{{row.name}}</a></td>
<td>{{row.area.name}}</td>
<td>{{row.code}}</td>
<td>{{dict.grade}}</td>
<td>{{dict.type}}</td>
<td>{{dict.jobType}}</td>
<td>{{row.remarks}}</td>
<shiro:hasPermission name="sys:office:edit"><td>
<a href="${ctx}/sys/office/form?id={{row.id}}"><spring:message code="edit"/></a>
<a href="${ctx}/sys/office/delete?id={{row.id}}" onclick="return confirmx('<spring:message code="delete_all_child"/>', this.href)"><spring:message code="delete"/></a>
<a href="${ctx}/sys/office/form?parent.id={{row.id}}"><spring:message code="add_level"/></a>
</td></shiro:hasPermission>
</tr>
</script>
</body>
</html>