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

95 lines
3.6 KiB
Plaintext
Raw Normal View History

2017-12-29 16:18:40 +08:00
<%@ 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>
2017-12-29 16:18:40 +08:00
<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){
2017-12-29 16:18:40 +08:00
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">
2017-12-29 16:18:40 +08:00
<!-- <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> -->
2018-10-12 17:39:23 +08:00
<div class="">
2018-12-13 14:01:06 +08:00
<sys:message content="${message}" type="${messageType }"/>
2017-12-29 16:18:40 +08:00
<table id="treeTable" class="table table-striped table-bordered table-condensed">
2018-04-11 11:50:49 +08:00
<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>
2017-12-29 16:18:40 +08:00
<tbody id="treeTableList"></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
2017-12-29 16:18:40 +08:00
<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>
2018-04-11 11:50:49 +08:00
<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>
2017-12-29 16:18:40 +08:00
</td></shiro:hasPermission>
</tr>
</script>
</body>
</html>