<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
<%
|
String path = request.getContextPath();
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
|
+ path + "/";
|
%>
|
|
<!DOCTYPE HTML>
|
<html>
|
<head>
|
<base href="<%=basePath%>">
|
<meta charset="UTF-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<title>选择模块</title>
|
<link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
|
<link href="static/plugins/jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css">
|
<link rel="stylesheet" href="static/styles/initialize.css" type="text/css">
|
<link rel="stylesheet" href="static/styles/common.css" type="text/css">
|
|
<script type="text/javascript" src="static/plugins/jquery/jquery.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/jquery.easyui.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/plugins/datagrid-scrollview.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
|
<script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
|
<script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
|
<script type="text/javascript" src="static/plugins/layer/layer.js"></script>
|
|
<script type="text/javascript" src="static/plugins/spinjs/spin.js"></script>
|
<script type="text/javascript" src="static/plugins/spinjs/jquery.spin.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery.blockUI.js"></script>
|
|
<script type="text/javascript" src="static/wcp/scripts/wcp.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.layer.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.blockUI.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.spin.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.jquery.js"></script>
|
|
<!--[if lt IE 9]>
|
<script type="text/javascript" src="static/plugins/json2.js"></script>
|
<![endif]-->
|
<style>
|
html, body {
|
height: 100%;
|
}
|
|
.container {
|
width: 100%;
|
height: 100%;
|
padding: 10px;
|
}
|
|
.left {
|
width: 100%;
|
float: left;
|
}
|
|
.left .pt-tree {
|
border-right: 1px solid rgb(212, 212, 212) !important;
|
}
|
|
.search {
|
clear: both;
|
}
|
</style>
|
|
</head>
|
<body>
|
<div class="container">
|
<div class="pt-note pt-note-danger">
|
<p >注:勾选的模块对应的业务表数据将被清除,对应的附件数据、流程数据也将同时被清除。请谨慎选择!</p>
|
</div>
|
<div class="left">
|
<div class="easyui-panel pt-tree" style="border-right: none;">
|
<ul id="ul_module"></ul>
|
</div>
|
</div>
|
<div class="pt-form-btn" style="bottom:0px;">
|
<div class="form-group">
|
<button type="button" class="pt-btn pt-btn-info" onclick="doSave();">确定</button>
|
<button type="reset" class="pt-btn pt-btn-default" onclick="doClose();">关闭</button>
|
</div>
|
</div>
|
</div>
|
</body>
|
|
<script>
|
//窗口参数,用于弹窗传递
|
var params = {
|
opts : null,
|
callBack : null
|
};
|
|
//模块树URL
|
var url = "config/module/getModuleListByTree";
|
|
var moduleTree = $("#ul_module").tree({
|
method : "post",
|
url : url,
|
animate : true,
|
checkbox : true,
|
cascadeCheck : true,
|
onBeforeLoad : function(node, param) {
|
new ResizeScroll({
|
"id" : "#ul_module",
|
"height" : "400"
|
});
|
|
wcp.ui.setBusy("#ul_module");
|
},
|
onLoadSuccess : function(node, data) {
|
wcp.ui.clearBusy("#ul_module");
|
new ResizeScroll({
|
"id" : "#ul_module",
|
"height" : "390"
|
});
|
|
},
|
onLoadError : function(args) {
|
wcp.ui.clearBusy("#ul_module");
|
},
|
});
|
|
//查询数据
|
function doSearch(value) {
|
moduleTree.tree({
|
queryParams : {
|
searchText : value
|
}
|
})
|
}
|
|
//确定按钮事件
|
function doSave() {
|
var checkRows = $("#ul_module").tree("getChecked");
|
if (checkRows.length == 0) {
|
layer.alert("请选择要初始化数据的模块!");
|
return false;
|
}
|
|
var ids = [];
|
for (var i = 0; i < checkRows.length; i++) {
|
ids.push(checkRows[i].id);
|
}
|
layer.confirm("确认要对选中的模块数据进行初始化吗?操作后数据将不可恢复!", {
|
icon : 3,
|
title : '提示'
|
}, function(index) {
|
wcp.ui.setBusy("body", wcp.ajax({
|
url : "config/setting/initCnfData",
|
data : JSON.stringify(ids),
|
}).done(function(result) {
|
doClose();
|
top.wcp.notify.success("初始化成功!");
|
}));
|
});
|
}
|
function doClose() { //关闭按钮事件
|
var index = top.layer.getFrameIndex(window.name); //获取窗口索引
|
top.layer.close(index);
|
}
|
</script>
|
</html>
|