86 lines
3.1 KiB
Plaintext
86 lines
3.1 KiB
Plaintext
|
|
<%@ 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/treeview.jsp" %>
|
|||
|
|
<style type="text/css">
|
|||
|
|
.ztree {margin:0;_margin-top:10px;padding:10px 10 0 10px; width: 98%;height:420px;}
|
|||
|
|
</style>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
var validateForm;
|
|||
|
|
function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|||
|
|
if(validateForm.form()){
|
|||
|
|
$("#inputForm").submit();
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
$(document).ready(function() {
|
|||
|
|
validateForm = $("#inputForm").validate({
|
|||
|
|
submitHandler: function(form){
|
|||
|
|
loading('正在提交,请稍等...');
|
|||
|
|
form.submit();
|
|||
|
|
},
|
|||
|
|
errorContainer: "#messageBox",
|
|||
|
|
errorPlacement: function(error, element) {
|
|||
|
|
$("#messageBox").text("输入有误,请先更正。");
|
|||
|
|
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
|||
|
|
error.appendTo(element.parent().parent());
|
|||
|
|
} else {
|
|||
|
|
error.insertAfter(element);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
laydate({
|
|||
|
|
elem: '#issueDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
|
|||
|
|
event: 'focus' //响应事件。如果没有传入event,则按照默认的click
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
</script>
|
|||
|
|
</head>
|
|||
|
|
<body class="gray-bg">
|
|||
|
|
<!--查询条件-->
|
|||
|
|
<div class="col-sm-12">
|
|||
|
|
<form:form id="inputForm" method="post" class="form-inline">
|
|||
|
|
<input type="hidden" id="actionType" name="actionType" value="${actionType}" />
|
|||
|
|
<input type="hidden" id="magType" name="magType" value="${magType}" />
|
|||
|
|
<input type="hidden" id="treeId" />
|
|||
|
|
</form:form>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div style="height:450px;">
|
|||
|
|
<div id="ztree" class="ztree"></div>
|
|||
|
|
<div style="height:10px;"></div>
|
|||
|
|
</div>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
var id;
|
|||
|
|
var setting = {data:{simpleData:{enable:true,idKey:"id",pIdKey:"pId",rootPId:'0'}},
|
|||
|
|
callback:{onClick:function(event, treeId, treeNode){
|
|||
|
|
id = treeNode.id;
|
|||
|
|
if(treeNode.isParent){
|
|||
|
|
top.layer.msg("不能选择根节点("+treeNode.name+")请重新选择。", {icon: 0});
|
|||
|
|
}else {
|
|||
|
|
$("#treeId").val(id+","+treeNode.name);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
|
|||
|
|
function refreshTree(){
|
|||
|
|
var type=$("#magType").val();
|
|||
|
|
var actionType=$("#actionType").val();
|
|||
|
|
$.getJSON("${ctx}/sys/sysTemplateMag/getTreeNode?magType="+type+"&actionType="+actionType,function(data){
|
|||
|
|
$.fn.zTree.init($("#ztree"), setting, data).expandAll(true);
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
refreshTree();
|
|||
|
|
|
|||
|
|
</script>
|
|||
|
|
<script src="${ctxStatic}/common/wsize.min.js" type="text/javascript"></script>
|
|||
|
|
</body>
|
|||
|
|
</html>
|