136 lines
3.9 KiB
Plaintext
136 lines
3.9 KiB
Plaintext
<%@ 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>
|
|
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
|
<!-- 引用页头及CSS页-->
|
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
|
<!-- 颜色选择器-->
|
|
<link rel="stylesheet"
|
|
href="<%=request.getContextPath()%>/plugins/bootstrap-colorpicker/dist/css/bootstrap-colorpicker.min.css"
|
|
type="text/css" rel="stylesheet" />
|
|
<script type="text/javascript"
|
|
src="<%=request.getContextPath()%>/plugins/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.min.js"
|
|
charset="utf-8"></script>
|
|
<script type="text/javascript">
|
|
var addFun = function () {
|
|
var node = $('#tree').treeview('getSelected');
|
|
var pid = "";
|
|
if (node != null && node.length > 0) {
|
|
pid = node[0].id;
|
|
}
|
|
$.post(ext.contextPath + '/plan/showPlanAdd.do', { pid: pid }, function (data) {
|
|
$("#planBox").html(data);
|
|
|
|
});
|
|
};
|
|
var editFun = function (id) {
|
|
$.post(ext.contextPath + '/plan/showPlanEdit.do', { id: id }, function (data) {
|
|
$("#planBox").html(data);
|
|
});
|
|
};
|
|
var deleteFun = function (id) {
|
|
swal({
|
|
text: "您确定要删除此记录?",
|
|
dangerMode: true,
|
|
buttons: {
|
|
cancel: {
|
|
text: "取消",
|
|
value: null,
|
|
visible: true,
|
|
className: "btn btn-default btn-sm",
|
|
closeModal: true,
|
|
},
|
|
confirm: {
|
|
text: "确定",
|
|
value: true,
|
|
visible: true,
|
|
className: "btn btn-danger btn-sm",
|
|
closeModal: true
|
|
}
|
|
}
|
|
})
|
|
.then(function (willDelete) {
|
|
if (willDelete) {
|
|
$.post(ext.contextPath + '/plan/deletePlan.do', { id: id }, function (data) {
|
|
if (data == 1) {
|
|
$("#table").bootstrapTable('refresh');
|
|
} else {
|
|
showAlert('d', '删除失败', 'mainAlertdiv');
|
|
}
|
|
});
|
|
|
|
}
|
|
});
|
|
};
|
|
var initTreeView = function () {
|
|
$.post(ext.contextPath + '/plan/getPlansJson.do', { ng: '' }, function (data) {
|
|
//console.info(data)
|
|
$('#tree').treeview({
|
|
data: data,
|
|
});
|
|
$('#tree').on('nodeSelected', function (event, data) {
|
|
editFun(data.id);
|
|
//var node=$('#tree').treeview('getSelected');
|
|
});
|
|
}, 'json');
|
|
$("#planBox").html("");
|
|
};
|
|
$(function () {
|
|
$('#treeCollapse').collapse('show');//显示折叠框
|
|
initTreeView();
|
|
});
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
|
<div class="wrapper">
|
|
<div class="content-wrapper">
|
|
<!-- Content Header (Page header) -->
|
|
<section class="content-header">
|
|
<h1 id="head_title"></h1>
|
|
<ol class="breadcrumb">
|
|
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
|
</ol>
|
|
</section>
|
|
<!-- Main content -->
|
|
<section class="content container-fluid">
|
|
<div id="mainAlertdiv"></div>
|
|
<div id="subDiv"></div>
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<div id="treeCollapse" class="collapse">
|
|
<div class="box box-primary">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">方案列表</h3>
|
|
<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:550px;overflow:auto; "></div>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-9" id="planBox"></div>
|
|
</div>
|
|
</section>
|
|
<!-- /.content -->
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
</html> |