多单位版国产化地质资料管理系统
zs
2025-12-18 4f0d9bde31a80f6279e26466250da7716eec627f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
 
<!DOCTYPE HTML>
<html>
<head>
    <base href="<%=basePath%>">
 
    <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 href="static/plugins/jquery-easyui/themes/icon.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">
    <link rel="stylesheet" href="static/plugins/layer/skin/default/layer.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/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui-filterbuilder/jquery.filterbuilder.js"></script>
    <script type="text/javascript" src="static/scripts/easyuiExtend.js"></script>
    <script type="text/javascript" src="static/scripts/jquery-extend.js"></script>
    <script type="text/javascript" src="static/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.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>
    <!-- wcp组件 -->
    <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>
        .combobox-group {
            clear: both;
        }
 
        .f-full {
            -webkit-box-flex: 1 1 auto;
            -ms-flex: 1 1 auto;
            flex: 1 1 auto;
        }
 
        .f-row {
            display: -webkit-box;
            display: -webkit-flex;
            display: -moz-flex;
            display: -ms-flexbox;
            display: flex;
            position: relative;
        }
 
        .fb-tree .fb-field {
            background: #286090;
            color: #fff;
        }
 
        .fb-tree .fb-group-op {
            background: #c9302c;
            color: #fff;
        }
 
        .fb-tree .fb-op {
            background: #4cae4c;
            color: #fff;
        }
    </style>
 
</head>
<body>
<div class="margin-lr">
    <div class="pt-form">
        <div class="pt-note pt-note-info" style="margin: 10px 0 0 0;">
            <p>1.请点击右侧的“+”号按钮添加条件或者分组</p>
            <p>2.分组指一组独立的逻辑条件,在与其他条件组合时会用括号进行逻辑隔离</p>
        </div>
        <form id="formAdvancedQuery" method="post">
            <div class="ptbody">
                <div class="easyui-panel" style="margin-top: 10px;">
                    <ul id="filterBuilder" style="margin: 0 0 0 -45px;"/>
                </div>
            </div>
        </form>
        <div class="pt-form-btn">
            <div class="form-group">
                <button id="btnSearch" class="pt-btn pt-btn-primary">查询</button>
                <button id="btnClose" class="pt-btn pt-btn-default">关闭</button>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
<script>
 
    //窗口参数,用于弹窗传递
    var params = {
        callBack: null
    };
 
    $(function () {
        new ResizeScroll({
            "id": ".ptbody",
            fun: function () {
                var wh = $(window).height();
                return (wh - 82 - 60);
            }
        });
 
        //绑定按钮事件
        $("#btnSearch").click(function () {
            var ret = getFilter();
 
            if (params.callBack) {
                params.callBack(ret);
            }
 
            closeWindow();
        });
 
        $("#btnClose").click(function () {
            closeWindow();
        });
    });
 
    function initFilterBuilder(rules) {
        $('#filterBuilder').filterbuilder({
            rules: rules,
            groupMenus: [
                {name: 'condition', text: '添加条件'},
                {name: 'group', text: '添加分组'}
            ],
            groupOperators: [
                {op: 'and', text: '并且'},
                {op: 'or', text: '或者'}
            ],
            operators: [
                {op: 'equal', text: '等于'},
                {op: 'notequal', text: '不等于'},
                {op: 'contains', text: '包含'},
                {op: 'notcontains', text: '不包含'},
                {op: 'beginwith', text: '以...开始'},
                {op: 'endwith', text: '以...结束'},
                {op: 'less', text: '小于'},
                {op: 'lessorequal', text: '小于等于'},
                {op: 'greater', text: '大于'},
                {op: 'greaterorequal', text: '大于等于'}
            ],
            fields: [
                <c:forEach var="column" items="${columnList}" varStatus="staturs">
                <c:if test="${column.isNotForQuery==null || column.isNotForQuery=='0'}">
                {
                    field: '${column.columnName }',
                    title: '${column.displayName}'
                    <c:if test="${column.dataType=='datetime'}">
                    , editor: {type: 'datebox', options: {}}
                    </c:if>
                    <c:if test="${column.dataType=='int'||column.dataType=='bigint'||column.dataType=='tinyint'||column.dataType=='float'||column.dataType=='decimal'||column.dataType=='bit'}">
                    , editor: {type: 'numberbox', options: {}}
                    </c:if>
                    <c:if test="${column.dataType!='varchar'&&column.dataType!='nvarchar'&&column.dataType!='text'}">
                    , operators: [
                        {op: 'equal', text: '等于'},
                        {op: 'notequal', text: '不等于'},
                        {op: 'less', text: '小于'},
                        {op: 'lessorequal', text: '小于等于'},
                        {op: 'greater', text: '大于'},
                        {op: 'greaterorequal', text: '大于等于'}
                    ]
                    </c:if>
                }<c:if test="${!staturs.last}" >, </c:if></c:if>
                </c:forEach>
            ]
        })
    }
 
    function getFilter() {
        var rules = $('#filterBuilder').filterbuilder('getRules');
        return rules;
    }
 
    //加载已有条件
    function loadCondition(conditions) {
        if (conditions != null && !(conditions instanceof Array)) {
            conditions = [conditions];
        }
 
        initFilterBuilder(conditions);
    }
 
    function closeWindow() {
        var index = top.layer.getFrameIndex(window.name); //获取窗口索引
        top.layer.close(index);
    }
</script>
</html>