first commit
This commit is contained in:
78
WebRoot/jsp/work/productionIndexPlanNameConfigureTree.jsp
Normal file
78
WebRoot/jsp/work/productionIndexPlanNameConfigureTree.jsp
Normal file
@ -0,0 +1,78 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
||||
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
var node=$('#tree').treeview('getSelected');
|
||||
var pid="";
|
||||
if(node!=null && node.length>0){
|
||||
pid=node[0].id;
|
||||
}else{
|
||||
pid="-1";
|
||||
}
|
||||
$.post(ext.contextPath + '/work/productionIndexPlanNameConfigure/doadd.do', {pid:pid} , function(data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/work/productionIndexPlanNameConfigure/doedit.do', {id:id} , function(data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
var initTreeView = function() {
|
||||
$.post(ext.contextPath + '/work/productionIndexPlanNameConfigure/getJson.do', {unitId:unitId} , function(data) {
|
||||
//console.info(data)
|
||||
$('#tree').treeview({
|
||||
data: data,
|
||||
levels:3
|
||||
});
|
||||
$('#tree').on('nodeSelected', function(event, data) {
|
||||
editFun(data.id);
|
||||
//var node=$('#tree').treeview('getSelected');
|
||||
});
|
||||
},'json');
|
||||
};
|
||||
$(function() {
|
||||
initTreeView();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">层级结构</h3>
|
||||
<!-- <button type="button" class="btn btn-default btn-sm" onclick="outWordView();"><i class="fa fa-file-word-o"></i> 预览</button> -->
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" onclick="addFun();"><i class="fa fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:700px;overflow:auto;"></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user