<!DOCTYPE html>
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
xmlns:th="http://www.w3.org/1999/xhtml" >
|
<head>
|
<meta charset="utf-8" />
|
<title th:text="${systemName}"></title>
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport" />
|
<link rel="stylesheet" th:href="@{${pubzyWebRoot} + 'BootStrap4/assets/css/style.css'}" />
|
<link rel="stylesheet" th:href="@{${pubzyWebRoot} + 'BootStrap4/expand/css/bootstrap-extract.css'}" />
|
<link rel="stylesheet" th:href="@{${pubzyWebRoot} + 'BootStrap4/assets/plugins/bootstrap-datepicker/old_datepaker/datepicker.css'}" />
|
<link rel="stylesheet" th:href="@{${pubzyWebRoot} + 'BootStrap4/expand/plugins/portlet/css/portlet.css'}" />
|
<script th:src="@{${pubzyWebRoot} + 'BootStrap4/expand/plugins/portlet/portlet.js'}"></script>
|
<!-- 表单样式 -->
|
<script th:src="@{${pubzyWebRoot} + 'BootStrap4/assets/js/jquery.min.js'}"></script>
|
<script th:src="@{${pubzyWebRoot} + 'BootStrap4/expand/plugins/layer/layer.js'}"></script>
|
<script th:src="@{${pubzyWebRoot} + 'BootStrap4/assets/js/tether.min.js'}"></script>
|
<script th:src="@{${pubzyWebRoot} + 'BootStrap4/assets/js/bootstrap.min.js'}"></script>
|
<script th:src="@{${pubzyWebRoot} + 'BootStrap4/assets/plugins/bootstrap-datepicker/old_datepaker/bootstrap-datepicker.js'}"></script>
|
<script th:src="@{${pubzyWebRoot} + 'BootStrap4/assets/plugins/bootstrap-datepicker/old_datepaker/bootstrap-datepicker.zh-CN.min.js'}"></script>
|
<link th:href="@{${pubzyWebRoot} + 'ext-4.2.1.883/resources/css/ext-all-neptune.css'}" rel="stylesheet" type="text/css" />
|
|
<script th:src="@{${pubzyWebRoot} + 'ext-4.2.1.883/ext-all.js'}"></script>
|
<script th:src="@{${pubzyWebRoot} + 'ext-4.2.1.883/locale/ext-lang-zh_CN.js'}"></script>
|
<script th:src="@{${pubzyWebRoot} + 'ext-4.2.1.883/PagingToolbar.js'}"></script>
|
|
<script th:src="@{${pubzyWebRoot} + 'media/js/winPro.js'}"></script>
|
<style>
|
.x-grid-with-row-lines .x-grid-td {
|
vertical-align: text-top;
|
}
|
.x-grid-view {
|
overflow: hidden !important;
|
}
|
.x-body{
|
overflow-x: hidden;
|
}
|
.DivHeight {
|
height: 45px;
|
}
|
|
.form-horizontal .control-label {
|
width: 70px;
|
}
|
|
[class*='span'] {
|
margin-left: 0 !important;
|
}
|
|
.row-fluid [class*='span'] {
|
margin-left: 0 !important;
|
}
|
|
.row {
|
margin-left: 0;
|
margin-right: 0;
|
}
|
|
.x-grid-row td,
|
.x-grid-data-row td {
|
border-right: 1px solid #E3E3E3;
|
}
|
|
.col-sm-12, .col-md-6, .col-lg-4, .col-xl-3 {
|
padding-left: 0;
|
padding-right: 0;
|
}
|
|
body {
|
padding-bottom: 10px;
|
}
|
|
.x-grid-view{
|
overflow:auto !important;
|
}
|
</style>
|
<script th:inline="javascript">
|
var msg = [[${msg}]];
|
$(function(){
|
if(msg != "") {
|
alert(msg);
|
}
|
$(".date-picker").datepicker({format: 'yyyy-mm-dd', language: 'zh-CN'}); //初始化时间控件
|
var type = $(this).find("option:selected").attr("ZiDuanType");
|
//如果是时间的话 input变成两个
|
if(type=="时间"){
|
$("#pubdateBegin").show();
|
$("#pubdatefinish").show();
|
$("#IntNumfinish").css("display", "none");
|
$("#IntNumBegin").css("display", "none");
|
$("#selcetZiDuanZhi").css("display", "none");
|
$("#ZiDian").css("display", "none");
|
}
|
else {
|
$("#pubdateBegin").css("display", "none");
|
$("#pubdatefinish").css("display", "none");
|
$("#IntNumfinish").css("display", "none");
|
$("#IntNumBegin").css("display", "none");
|
$("#selcetZiDuanZhi").show();
|
$("#ZiDian").css("display", "none");
|
}
|
if(type=="整数"){
|
$("#IntNumfinish").show();
|
$("#IntNumBegin").show();
|
$("#pubdateBegin").css("display", "none");
|
$("#pubdatefinish").css("display", "none");
|
$("#selcetZiDuanZhi").css("display", "none");
|
$("#ZiDian").css("display", "none");
|
}else {
|
$("#pubdateBegin").css("display", "none");
|
$("#pubdatefinish").css("display", "none");
|
$("#IntNumfinish").css("display", "none");
|
$("#IntNumBegin").css("display", "none");
|
$("#selcetZiDuanZhi").show();
|
$("#ZiDian").css("display", "none");
|
}
|
|
$("#ZiDian").change(function () {
|
var type = $(this).find("option:selected").attr("ZiDuanType");
|
var ZiDuanGeShi= $(this).find("option:selected").attr("ziduangeshi");
|
//如果类型是整数 并且 字段关联了字典表
|
if(type=="整数" && ZiDuanGeShi.indexOf("guanlianzidian")>0){
|
var values = $("#ZiDian").find("option:selected").val();
|
//将values赋值给 $("#IntNumfinish") $("#IntNumBegin")
|
$("#IntNumfinish").val(values);
|
$("#IntNumBegin").val(values);
|
}else {
|
var values = $("#ZiDian").find("option:selected").val();
|
$("#selcetZiDuanZhi").val(values);
|
}
|
})
|
|
$("#selcetZiDuan").change(function(){
|
$("#ZiDian").html("");
|
//切换一下 input框的内容就要被清除
|
$("#selcetZiDuanZhi").val("");
|
$("#pubdateBegin").val("");
|
$("#pubdatefinish").val("");
|
$("#IntNumfinish").val("");
|
$("#IntNumBegin").val("");
|
//获取自定义属性的值
|
var type = $(this).find("option:selected").attr("ZiDuanType");
|
var ZiDuanGeShi= $(this).find("option:selected").attr("ziduangeshi");
|
//{"guanlianzidian":"ApplyStatus"}
|
//如果是时间的话 input变成两个
|
if(type=="时间"){
|
$("#pubdateBegin").show();
|
$("#pubdatefinish").show();
|
$("#IntNumfinish").css("display", "none");
|
$("#IntNumBegin").css("display", "none");
|
$("#selcetZiDuanZhi").css("display", "none");
|
|
}else if(type=="整数"){
|
$("#IntNumfinish").show();
|
$("#IntNumBegin").show();
|
$("#pubdateBegin").css("display", "none");
|
$("#pubdatefinish").css("display", "none");
|
$("#selcetZiDuanZhi").css("display", "none");
|
}else {
|
$("#pubdateBegin").css("display", "none");
|
$("#pubdatefinish").css("display", "none");
|
$("#IntNumfinish").css("display", "none");
|
$("#IntNumBegin").css("display", "none");
|
$("#selcetZiDuanZhi").show();
|
}
|
if(ZiDuanGeShi.indexOf("guanlianzidian")>0){
|
var arr1=ZiDuanGeShi.split(":");
|
var arr2=arr1[1].replace("\"","").replace("\"","").replace("}","").trim();
|
$("#ZiDian").html("");
|
//获取字典表,然后循环
|
$.ajax({
|
type: "GET",
|
url: '/res/ZiYuan/DataType?type='+arr2,
|
success: function (result) {
|
var data= eval('[' + result + ']');
|
var html = "<option value=\"\">全部</option>";
|
for(var i = 0; i < data.length; i++){
|
html += "<option value=\""+data[i].key+"\">"+ data[i].value +"</option>";
|
}
|
$("#ZiDian").append(html);
|
}
|
});
|
$("#pubdateBegin").css("display", "none");
|
$("#pubdatefinish").css("display", "none");
|
$("#IntNumfinish").css("display", "none");
|
$("#IntNumBegin").css("display", "none");
|
$("#selcetZiDuanZhi").css("display", "none");
|
$("#ZiDian").show();
|
|
}else if(ZiDuanGeShi.indexOf("SQLchaxun")>0){
|
var json= eval('(' + ZiDuanGeShi + ')');
|
var json2= eval(json.SQLchaxun[0]);
|
var resourceid=$("#resourceid").val();
|
$("#ZiDian").html("");
|
//获取字典表,然后循环
|
$.ajax({
|
type: "GET",
|
url: '/res/ZiYuan/SQLSource?SQLkey='+json2.SQLkey+'&SQLtext='+json2.SQLtext+'&SQLtable='+json2.SQLtable+'&resourceid='+resourceid,
|
success: function (result) {
|
var data= eval('[' + result + ']');
|
var html = "<option value=\"\">全部</option>";
|
for(var i = 0; i < data.length; i++){
|
html += "<option value=\""+data[i].key+"\">"+ data[i].value +"</option>";
|
}
|
$("#ZiDian").append(html);
|
}
|
});
|
$("#pubdateBegin").css("display", "none");
|
$("#pubdatefinish").css("display", "none");
|
$("#IntNumfinish").css("display", "none");
|
$("#IntNumBegin").css("display", "none");
|
$("#selcetZiDuanZhi").css("display", "none");
|
$("#ZiDian").show();
|
}else {
|
$("#ZiDian").css("display", "none");
|
}
|
|
|
});
|
});
|
|
//查询事件
|
function Search() {
|
Ext.getCmp('gridexample').dockedItems.items[1].store.currentPage = 1;
|
ZYMLZiYuanStore.load()
|
|
}
|
|
//查询区清除
|
function Clear() {
|
document.getElementById("SearchForm").reset();
|
$("#ZiDian").html("");
|
}
|
|
//导出
|
function Export() {
|
GetSearchWhere("SearchForm");
|
Ext.MessageBox.wait("正在进行导出,请稍后...", "操作提示", {
|
interval: 100
|
});
|
formdata.PageSize = ZYMLZiYuanStore.pageSize;
|
formdata.PageIndex = ZYMLZiYuanStore.currentPage;
|
Ext.Ajax.request({
|
url: '/res/ZiYuan/BaseLeftSourceShuJuExcel?resourceid='+resourceid,
|
params: eval(formdata),
|
success: function (response) {
|
Ext.MessageBox.hide();
|
//加载
|
window.open(response.responseText);
|
}
|
});
|
}
|
</script>
|
</head>
|
<script th:inline="javascript">
|
var resourceid = [[${resourceid}]];
|
var list = [[${list}]];
|
var columns = [[${columns}]];
|
|
/*]]>*/
|
</script>
|
<script src="/js/manage/databasetable.js"></script>
|
<body>
|
<div id="rapp">
|
<input type="hidden" id="resourceid" th:value="${resourceid}"/>
|
<div>
|
<div class="panel panel-default">
|
<div class="panel-heading">
|
查询区
|
</div>
|
<div class="panel-body SearchBox">
|
<form id="SearchForm">
|
<div class="row">
|
<div class="col-sm-12 col-md-6 col-lg-4 col-xl-3 DivHeight">
|
<label class="control-label">字段:</label>
|
<div class="controls">
|
<select class="form-control col-sm-12" name="selcetZiDuan" onchange="" id="selcetZiDuan">
|
<option >--选择字段--</option>
|
<option th:each="item:${map}" th:value="${item.ZiDuanName}"
|
th:text="${item.ZiDuanBieMing}"
|
th:attr="ZiDuanType=${item.ZiDuanType},ZiDuanGeShi=${item.ZiDuanGeShi}">
|
</option>
|
</select>
|
|
</div>
|
</div>
|
<div class="col-sm-12 col-md-6 col-lg-4 col-xl-3 DivHeight">
|
<label class="control-label">字段值:</label>
|
<div class="controls">
|
<input type="text" class="form-control" id="selcetZiDuanZhi" name="selcetZiDuanZhi" />
|
<input type="text" class="custom-form-control date-picker" readonly="readonly" id="pubdateBegin" name="pubdateBegin" style="width:49%; float: left" />
|
<input type="text" class="custom-form-control date-picker" readonly="readonly" id="pubdatefinish" name="pubdatefinish" style="width:49%; float: right;" />
|
<input type="text" class="custom-form-control " id="IntNumBegin" name="IntNumBegin" style="width:49%; float: left" />
|
<input type="text" class="custom-form-control " id="IntNumfinish" name="IntNumfinish" style="width:49%; float: right;" />
|
<select class="form-control col-sm-12" id="ZiDian">
|
|
</select>
|
</div>
|
</div>
|
|
</div>
|
|
<div class="row" style="display:block;">
|
<div style="float: right;padding-right: 0.75em;">
|
<a class="btn btn-primary-outline" onclick="Search();"><i class="fa fa-search"></i> 查询</a>
|
<a class="btn btn-primary-outline" onclick="Clear();"><i class="fa fa-trash-o"></i> 清除</a>
|
<a class="btn btn-primary-outline" onclick="Export();"><i class="fa fa-share-alt"></i> 导出</a>
|
</div>
|
</div>
|
</form>
|
</div>
|
</div>
|
<div id="grid" style="width: 100%"></div>
|
</div>
|
</div>
|
</body>
|
</html>
|