180 lines
5.3 KiB
Plaintext
180 lines
5.3 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()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css" />
|
||
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
||
|
|
<script type="text/javascript">
|
||
|
|
var nodeid = "-1";//树指针的全局变量
|
||
|
|
var addFun = function (type) {
|
||
|
|
$.post(ext.contextPath + '/base/basicComponents/showAdd.do', { pid: nodeid, type: type }, function (data) {
|
||
|
|
$("#basicComponentsBox").html(data);
|
||
|
|
});
|
||
|
|
};
|
||
|
|
var editFun = function (id) {
|
||
|
|
|
||
|
|
};
|
||
|
|
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(willDelete => {
|
||
|
|
if (willDelete) {
|
||
|
|
$.post(ext.contextPath + '/base/basicComponents/delete.do', { id: id }, function (data) {
|
||
|
|
if (data == 1) {
|
||
|
|
$("#table").bootstrapTable('refresh');
|
||
|
|
} else {
|
||
|
|
showAlert('d', '删除失败', 'mainAlertdiv');
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
}
|
||
|
|
});
|
||
|
|
};
|
||
|
|
var deletesFun = function () {
|
||
|
|
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||
|
|
var datas = "";
|
||
|
|
$.each(checkedItems, function (index, item) {
|
||
|
|
datas += item.id + ",";
|
||
|
|
});
|
||
|
|
if (datas == "") {
|
||
|
|
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||
|
|
} else {
|
||
|
|
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(willDelete => {
|
||
|
|
if (willDelete) {
|
||
|
|
$.post(ext.contextPath + '/base/basicComponents/deletes.do', { ids: datas }, function (data) {
|
||
|
|
if (data > 0) {
|
||
|
|
$("#table").bootstrapTable('refresh');
|
||
|
|
} else {
|
||
|
|
showAlert('d', '删除失败', 'mainAlertdiv');
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
var initTreeView = function () {
|
||
|
|
$.post(ext.contextPath + '/base/basicComponents/getBasicComponentsForTree.do', { ng: '' }, function (data) {
|
||
|
|
$('#basicComponentstree').treeview({
|
||
|
|
data: data,
|
||
|
|
showBorder: true,
|
||
|
|
levels: 3,
|
||
|
|
});
|
||
|
|
$('#basicComponentstree').on('nodeSelected', function (event, data) {
|
||
|
|
nodeid = data.id;
|
||
|
|
$.post(ext.contextPath + '/base/basicComponents/edit.do', { id: data.id }, function (data1) {
|
||
|
|
$("#basicComponentsBox").html(data1);
|
||
|
|
});
|
||
|
|
});
|
||
|
|
}, 'json');
|
||
|
|
$("#basicComponentsBox").html("");
|
||
|
|
};
|
||
|
|
$(function () {
|
||
|
|
initTreeView();
|
||
|
|
});
|
||
|
|
|
||
|
|
</script>
|
||
|
|
</head>
|
||
|
|
|
||
|
|
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||
|
|
<div class="wrapper">
|
||
|
|
<%-- <!-- 引用top --> --%>
|
||
|
|
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||
|
|
<!-- 菜单栏 -->
|
||
|
|
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||
|
|
<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>
|
||
|
|
<!-- <li class="active">Here</li> -->
|
||
|
|
</ol>
|
||
|
|
</section>
|
||
|
|
<!-- Main content -->
|
||
|
|
<section class="content container-fluid">
|
||
|
|
<div id="mainAlertdiv"></div>
|
||
|
|
<div id="alertDiv"></div>
|
||
|
|
<div id="subDiv"></div>
|
||
|
|
<div id="fileInputDiv"></div>
|
||
|
|
<div class="row">
|
||
|
|
<div class="col-md-3">
|
||
|
|
<div class="box box-solid">
|
||
|
|
<div class="box-header with-border">
|
||
|
|
<h3 class="box-title">配置项列表</h3>
|
||
|
|
<div class="box-tools">
|
||
|
|
<button type="buttonB" class="btn btn-box-tool" onclick="addFun();" >
|
||
|
|
<i class="fa fa-plus"></i> 新增
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="box-body no-padding">
|
||
|
|
<div id="basicComponentstree" style="height:550px;overflow:auto; "></div>
|
||
|
|
</div>
|
||
|
|
<!-- /.box-body -->
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="col-md-9" id="basicComponentsBox">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
<!-- /.content -->
|
||
|
|
</div>
|
||
|
|
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||
|
|
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
|
||
|
|
</html>
|