<!DOCTYPE html>
|
<html lang="en">
|
|
<head>
|
<meta charset="UTF-8">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<title>Document</title>
|
<script type="text/javascript" src="../js/jquery.js"></script>
|
<link href="../js/jqwidgets/styles/jqx.base.css" rel="stylesheet" />
|
<script type="text/javascript" src="../js/jqwidgets/jqxcore.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxdata.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxloader.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxscrollbar.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxbuttons.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxgrid.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxgrid.filter.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxgrid.pager.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxgrid.sort.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxgrid.columnsresize.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxgrid.selection.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxmenu.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxpanel.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxdropdownlist.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxlistbox.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxcombobox.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxinput.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxtextarea.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxcalendar.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/jqxdatetimeinput.js"></script>
|
<script type="text/javascript" src="../js/jqwidgets/globalization/globalize.culture.cn-CN.js"></script>
|
<script type="text/javascript" src="../js/JqxGridAPI.js"></script>
|
<script type="text/javascript" src="../js/WebServiceAPI6.5.js"></script>
|
<script type="text/javascript" src="../js/lodash.min.js"></script>
|
|
<style type="text/css">
|
html,
|
body {
|
width: 100%;
|
height: 100%;
|
margin: 0px;
|
padding: 0px;
|
font-size: 10px;
|
overflow: hidden;
|
}
|
|
.jqx-fill-state-normal {
|
-moz-box-sizing: content-box;
|
box-sizing: content-box;
|
-ms-touch-action: none;
|
font-family: Verdana, Arial, sans-serif;
|
font-style: normal;
|
font-size: 11px;
|
border-color: #aaa;
|
color: black !important;
|
background: transparent !important;
|
}
|
|
.jqx-fill-state-hover {
|
font-size: 12px;
|
border-color: #999;
|
/* background: #1b2533; */
|
}
|
|
.jqx-fill-state-pressed {
|
-moz-box-sizing: content-box;
|
box-sizing: content-box;
|
border-color: #999;
|
background: transparent !important;
|
}
|
|
.jqx-grid-cell,
|
.jqx-grid-group-cell {
|
font-size: 12px;
|
border-color: #aaa;
|
}
|
|
input[type="text"].jqx-input,
|
input[type="password"].jqx-input {
|
min-height: 16px;
|
min-width: 16px;
|
margin: 0px;
|
border-width: 1px;
|
border-style: solid;
|
font-size: 12px;
|
padding: 0px;
|
padding-left: 3px;
|
padding-right: 3px;
|
color: black;
|
}
|
div[role="row"]:nth-child(2n) {
|
background-color: #eee;
|
}
|
div[role="row"]:hover {
|
background-color: #eee;
|
}
|
.jqx-widget-content {
|
-moz-box-sizing: content-box;
|
box-sizing: content-box;
|
-ms-touch-action: none;
|
-moz-background-clip: padding;
|
-webkit-text-size-adjust: none;
|
background-clip: padding-box;
|
-webkit-background-clip: padding-box;
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
font-family: Verdana, Arial, sans-serif;
|
font-style: normal;
|
font-size: 12px;
|
border-color: #c7c7c7;
|
background: transparent;
|
color: black;
|
}
|
|
.jqx-widget-header {
|
-moz-box-sizing: content-box;
|
box-sizing: content-box;
|
-ms-touch-action: none;
|
-moz-background-clip: padding;
|
-webkit-text-size-adjust: none;
|
background-clip: padding-box;
|
-webkit-background-clip: padding-box;
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
border-color: #c5c5c5;
|
background: transparent !important;
|
color: black;
|
background-color: #eee !important;
|
}
|
|
.jqx-grid-cell {
|
border-style: solid;
|
border-width: 0px 1px 1px 0px;
|
margin-right: 1px;
|
margin-bottom: 1px;
|
border-color: transparent;
|
background: transparent !important;
|
white-space: nowrap;
|
font-weight: normal;
|
font-size: inherit;
|
overflow: hidden;
|
position: absolute !important;
|
height: 100%;
|
outline: none;
|
}
|
|
#txtwhere {
|
width: 99%;
|
}
|
|
.jqx-grid-column-menubutton {
|
display: none;
|
}
|
|
#gridmenugrid {
|
display: none !important;
|
}
|
|
.jqx-scrollbar-state-normal {
|
background: transparent;
|
margin: 0px;
|
padding: 0px;
|
border: 1px solid transparent;
|
}
|
|
.jqx-listbox {
|
-webkit-appearance: none;
|
outline: none;
|
border: 1px solid transparent;
|
padding: 0px;
|
margin: 0px;
|
cursor: default;
|
overflow: hidden;
|
background: white !important;
|
}
|
|
/* 滚动条样式 */
|
|
::-webkit-scrollbar {
|
/*滚动条的宽高*/
|
width: 3px;
|
height: 8px !important;
|
}
|
|
::-webkit-scrollbar-thumb {
|
/*滚动条里面小方块*/
|
border-radius: 4px;
|
background-color: #346ca7;
|
}
|
|
::-webkit-scrollbar-track {
|
/*滚动条里面轨道*/
|
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
|
background: rgba(52, 108, 167, 0.5);
|
border-radius: 4px;
|
}
|
</style>
|
<script type="text/javascript">
|
|
var color = window.localStorage.getItem('--bgcolor');
|
// alert(color);
|
|
var specialArr = ["经度", "周长", "面积", "长度", "东经", "北纬", "纬度"];
|
var baseurl = "http://71.3.110.201/ISServices/WebServices/ZHJCService/H_GRID_Server.asmx";
|
var H_Grid = {
|
//关键字段
|
gjzd: null,
|
isInit: false,
|
///是否可查
|
isSfkc: true,
|
///查询条件
|
searchWhere: "",
|
searchWhereText: "",
|
searchWhereSyn: "",
|
///后台返回表格的内容
|
Obj: null,
|
///初始化表格
|
popupHeight: 470,
|
popupWidth: 330,
|
popupLeft: -1,
|
popupTop: 135,
|
popupRight: 60,
|
popupBottom: -1,
|
arcgiSserverurl: "",
|
sjgd: 2000,
|
InitGrid: function (container, where, defaultWhere) {
|
|
//遮罩层初始化
|
$('#jqxLoader').jqxLoader({ width: "100%", height: "100%", text: '' });
|
|
///以图层编号查寻
|
var tcbh = GetQueryString("tcbh");
|
var width = GetQueryString("width");
|
var table = GetQueryString("table");
|
///查询条件工具栏高度
|
var sqlWhereHeight = 70;
|
///计算表格高度
|
var gridHeight = "calc(100% - " + sqlWhereHeight + "px)";
|
$("#sqlWhere").height(sqlWhereHeight + "px");
|
if (where == "" || defaultWhere != "") {
|
where = defaultWhere;
|
if (H_Grid.isInit) {
|
///清空表格
|
JqxGridAPI.ClearnJqxGrid(container);
|
///设置表格查询条件
|
JqxGridAPI.args = { tcbh: tcbh, where: H_Grid.searchWhere };
|
|
JqxGridAPI.UpdateBoundDataCells(container)
|
//选择使用排序重新加载表格
|
//JqxGridAPI.SortJqxGrid(container, H_Grid.Obj.columns[0].datafield, "asc");
|
return;
|
}
|
///表格插件的查询条件设置 由于有搜索功能 根据api不好实现 在插件中添加了个条件属性
|
JqxGridAPI.args = { table: table, where: "" };
|
if (width) {
|
JqxGridAPI.args.width = width;
|
}
|
|
// JqxGridAPI.FillJqxGrid(container, baseurl, "GridAllColumn", gridHeight, function (obj) {
|
JqxGridAPI.FillJqxGrid(container, baseurl, "GridAllChineseColumn", gridHeight, function (obj) {
|
|
if (obj.columns.length == 0) {
|
alert('尚未配置数据字段!')
|
return;
|
}
|
|
///关闭遮罩层
|
$('#jqxLoader').jqxLoader('close');
|
if (obj.item) {
|
$("#sqlWhere").show();
|
}
|
|
if (!H_Grid.isInit) {
|
H_Grid.isInit = true;
|
$("#columndiv").empty();
|
$("#operatordiv").empty();
|
///初始化表格查询字段
|
H_Grid.InitGridSelColum(obj);
|
///初始化表格查询操作符
|
H_Grid.InitGridSelOperator(obj);
|
///初始化value值
|
H_Grid.InitGridSelValue();
|
///初始化表格查询操作按钮
|
H_Grid.InitGridSelBtn();
|
H_Grid.Obj = obj;
|
///grid行点击事件
|
JqxGridAPI.RowClick(obj.item, function (data) {
|
|
var wkt=data.data.wkt;
|
var type = "";
|
if(wkt.indexOf(" (("))
|
{
|
type = wkt.substr(0,wkt.indexOf(" (("));
|
type = type.toLowerCase();
|
}
|
window.parent.pointToByCoord(5000,type,wkt,'','','');
|
|
});
|
}
|
});
|
} else {
|
///清空表格
|
JqxGridAPI.ClearnJqxGrid(container);
|
///设置表格查询条件
|
JqxGridAPI.args = { tcbh: tcbh, where: H_Grid.searchWhere };
|
|
JqxGridAPI.UpdateBoundDataCells(container)
|
///选择使用排序重新加载表格
|
//JqxGridAPI.SortJqxGrid(container, H_Grid.Obj.columns[0].datafield, "asc");
|
}
|
},
|
///初始化表格查询字段
|
InitGridSelColum: function (obj) {
|
|
///加载查询字段下拉框
|
$("#columndiv").append("<select id='column'></select>");
|
$.each(obj.columns, function (key, value) {
|
if (!value.hidden)
|
$("#column").append("<option data-value='" + value.datafield + "' data-columntype='" + value.columntype + "'>" + value.text + "<opion>");
|
})
|
$("#column").jqxDropDownList({ width: 120, height: 25, dropDownHeight: 200 });
|
$('#column').on('select', function (event) {
|
H_Grid.InitGridSelOperator();
|
///初始化value值
|
H_Grid.InitGridSelValue();
|
});
|
},
|
///初始化表格查询操作符
|
InitGridSelOperator: function () {
|
var column = $("#column_jqxDropDownList").find("option:eq(" + $("#column").jqxDropDownList('getSelectedIndex') + ")");
|
var columnText = column.text();
|
var columntype = column.attr("data-columntype");
|
|
$("#operatordiv").html("");
|
$("#operatordiv").append("<select id='operator'></select>");
|
switch (columntype) {
|
case "BLOB":
|
case "NVARCHAR2":
|
case "SDO_GEOMETRY":
|
if (specialArr.indexOf(columnText) > -1) {
|
$("#operator").append("<option value='like'>包含</option>");
|
|
$("#operator").append("<option value='>'>大于</option>");
|
$("#operator").append("<option value='<'>小于</option>");
|
} else {
|
$("#operator").append("<option value='='>等于</option>");
|
$("#operator").append("<option value='!='>不等于</option>");
|
$("#operator").append("<option value='like'>包含</option>");
|
}
|
break;
|
case "VARCHAR2":
|
if (specialArr.indexOf(columnText) > -1) {
|
$("#operator").append("<option value='like'>包含</option>");
|
|
$("#operator").append("<option value='>'>大于</option>");
|
$("#operator").append("<option value='<'>小于</option>");
|
} else {
|
$("#operator").append("<option value='='>等于</option>");
|
$("#operator").append("<option value='!='>不等于</option>");
|
$("#operator").append("<option value='like'>包含</option>");
|
}
|
//$("#operator").append("<option value='='>等于</option>");
|
//$("#operator").append("<option value='!='>不等于</option>");
|
//$("#operator").append("<option value='like'>包含</option>");
|
break;
|
case "NUMBER":
|
if (specialArr.indexOf(columnText) > -1) {
|
$("#operator").append("<option value='like'>包含</option>");
|
|
} else {
|
$("#operator").append("<option value='='>等于</option>");
|
$("#operator").append("<option value='!='>不等于</option>");
|
}
|
$("#operator").append("<option value='>'>大于</option>");
|
$("#operator").append("<option value='<'>小于</option>");
|
break;
|
case "DATE":
|
//$("#operator").append("<option value='='>等于</option>");
|
//$("#operator").append("<option value='!='>不等于</option>");
|
$("#operator").append("<option value='like'>包含</option>");
|
$("#operator").append("<option value='>'>大于</option>");
|
$("#operator").append("<option value='<'>小于</option>");
|
break;
|
default:
|
break;
|
}
|
$("#operator").jqxDropDownList({ width: 100, height: 25, autoDropDownHeight: true });
|
},
|
///初始化value值
|
InitGridSelValue: function () {
|
///查询字段类型
|
var columntype = $("#column_jqxDropDownList").find("option:eq(" + $("#column").jqxDropDownList('getSelectedIndex') + ")").attr("data-columntype");
|
$("#valuediv").empty();
|
$("#valuediv").append("<input type='text' id='valueText' />");
|
switch (columntype) {
|
case "BLOB":
|
case "SDO_GEOMETRY":
|
case "NVARCHAR2":
|
$("#valueText").jqxInput({ placeHolder: "请输入值", height: 27, width: 150, minLength: 1 });
|
//$("#valueText").jqxDateTimeInput({ placeHolder: "请输入日期", height: 27, width: 150 });
|
break;
|
case "VARCHAR2":
|
$("#valueText").jqxInput({ placeHolder: "请输入值", height: 27, width: 150, minLength: 1 });
|
//$("#valueText").jqxDateTimeInput({ placeHolder: "请输入日期", height: 27, width: 150 });
|
break;
|
case "NUMBER":
|
$("#valueText").jqxInput({ placeHolder: "请输入数值", height: 27, width: 150, minLength: 1 });
|
break;
|
case "DATE":
|
$("#valueText").jqxDateTimeInput({ placeHolder: "请输入日期", height: 27, width: 150, formatString: "yyyy/MM/dd" });
|
break;
|
default:
|
break;
|
}
|
},
|
///初始化表格查询操作按钮
|
InitGridSelBtn: function () {
|
$("#btnSubmit").jqxInput('destroy');
|
$("#btnSubmit").jqxButton({ width: 90, height: 27 });
|
$("#btnRest").jqxInput('destroy');
|
$("#btnRest").jqxButton({ width: 80, height: 27 });
|
$("#Andbtn").jqxInput('destroy');
|
$("#Andbtn").jqxButton({ width: 60, height: 27 });
|
$("#Orbtn").jqxInput('destroy');
|
$("#Orbtn").jqxButton({ width: 60, height: 27 });
|
$("#btnL").jqxInput('destroy');
|
$("#btnL").jqxButton({ width: 30, height: 27 });
|
$("#btnR").jqxInput('destroy');
|
$("#btnR").jqxButton({ width: 30, height: 27 });
|
///查找函数
|
$("#btnSubmit").on('click', function () {
|
/**
|
**默认执行并且按钮函数
|
**张恒2018-12-04
|
**/
|
if (H_Grid.searchWhere == "" && $('#txtwhere').jqxTextArea('val') == "") {
|
///查询字段类型 根据类型获取value的值
|
var columntype = $("#column_jqxDropDownList").find("option:eq(" + $("#column").jqxDropDownList('getSelectedIndex') + ")").attr("data-columntype");
|
var value = "";
|
if (columntype == "DATE") {
|
value = $('#valueText').jqxDateTimeInput('val')
|
} else {
|
value = $('#valueText').jqxInput('val')
|
}
|
if (value != "") {
|
//if (columntype == "DATE")
|
//{ }
|
//else {
|
$("#Andbtn").click();
|
//}
|
$("#btnSubmit").click();
|
return;
|
}
|
}
|
|
H_Grid.InitGrid("grid", H_Grid.searchWhere);
|
|
///判断是否是组合功能 根据选择条件刷新图表
|
try {
|
//alert(window.parent.window.document.title)
|
|
//H_Grid.searchWhereSyn = H_Grid.searchWhere;
|
window.parent.window.RefreshChart(H_Grid.searchWhere, $('#txtwhere').jqxTextArea('val'));
|
}
|
catch (ex) {
|
//alert(ex.message)
|
}
|
|
});
|
///重置函数
|
$("#btnRest").on('click', function () {
|
$('#txtwhere').jqxTextArea('val', '');
|
$('#valueText').jqxInput('val', '');
|
H_Grid.searchWhere = "";
|
H_Grid.searchWhereText = "";
|
getInitSearchWhere();
|
H_Grid.InitGrid("grid", H_Grid.searchWhere);
|
///判断是否是组合功能 根据选择条件刷新图表
|
try {
|
//alert(window.parent.window.document.title)
|
window.parent.window.RefreshChart(H_Grid.searchWhere, $('#txtwhere').jqxTextArea('val'));
|
}
|
catch (ex) {
|
//alert(ex.message)
|
}
|
});
|
///并且函数
|
$("#Andbtn").on('click', function () {
|
///查询字段类型 根据类型获取value的值
|
var columntype = $("#column_jqxDropDownList").find("option:eq(" + $("#column").jqxDropDownList('getSelectedIndex') + ")").attr("data-columntype");
|
var value = "";
|
if (columntype == "DATE") {
|
value = $('#valueText').jqxDateTimeInput('val')
|
} else {
|
value = $('#valueText').jqxInput('val')
|
}
|
var columnText = $("#column_jqxDropDownList").find("option:eq(" + $("#column").jqxDropDownList('getSelectedIndex') + ")").text();
|
var column = $("#column_jqxDropDownList").find("option:eq(" + $("#column").jqxDropDownList('getSelectedIndex') + ")").attr("data-value");
|
var operator = $("#operator_jqxDropDownList").find("option:eq(" + $("#operator").jqxDropDownList('getSelectedIndex') + ")").val();
|
///查询操作符
|
var operatorText = $("#operator_jqxDropDownList").find("option:eq(" + $("#operator").jqxDropDownList('getSelectedIndex') + ")").text();
|
if (value == "") return;
|
///拼接操作语句
|
var where = $('#txtwhere').jqxTextArea('val')
|
if (where == "") {
|
$('#txtwhere').jqxTextArea('val', " " + columnText + " " + operatorText + " " + value);
|
if (operator == "like") {
|
H_Grid.searchWhere += " and " + column + " " + operator + " '%" + value + "%'";
|
}
|
else {
|
H_Grid.searchWhere += " and " + column + " " + operator + " '" + value + "'";
|
}
|
}
|
else {
|
if (where == "(") {
|
$('#txtwhere').jqxTextArea('val', where + columnText + " " + operatorText + " " + value);
|
if (operator == "like") {
|
H_Grid.searchWhere += " " + column + " " + operator + " '%" + value + "%'";
|
}
|
else {
|
if (columntype == "DATE")
|
H_Grid.searchWhere += " " + column + " " + operator + " to_date('" + value + "','yyyy/MM/dd')";
|
else
|
H_Grid.searchWhere += " " + column + " " + operator + " '" + value + "'";
|
}
|
}
|
else {
|
$('#txtwhere').jqxTextArea('val', where + " 并且 " + columnText + " " + operatorText + " " + value);
|
if (operator == "like") {
|
H_Grid.searchWhere += " and " + column + " " + operator + " '%" + value + "%'";
|
}
|
else {
|
if (columntype == "DATE")
|
H_Grid.searchWhere += " and " + column + " " + operator + " to_date('" + value + "','yyyy/MM/dd')";
|
else
|
H_Grid.searchWhere += " and " + column + " " + operator + " '" + value + "'";
|
}
|
}
|
}
|
});
|
///或者函数
|
$("#Orbtn").on('click', function () {
|
///显示查询条件
|
var where = $('#txtwhere').jqxTextArea('val')
|
///字段类型 DATE NVCHAR2 NUMBER
|
var columntype = $("#column_jqxDropDownList").find("option:eq(" + $("#column").jqxDropDownList('getSelectedIndex') + ")").attr("data-columntype");
|
///获取值根据类型
|
var value = "";
|
if (columntype == "DATE") {
|
value = $('#valueText').jqxDateTimeInput('val')
|
}
|
else {
|
value = $('#valueText').jqxInput('val')
|
}
|
///查询字段的中文名称
|
var columnText = $("#column_jqxDropDownList").find("option:eq(" + $("#column").jqxDropDownList('getSelectedIndex') + ")").text();
|
///查询字段的数据库字段
|
var column = $("#column_jqxDropDownList").find("option:eq(" + $("#column").jqxDropDownList('getSelectedIndex') + ")").attr("data-value");
|
///查询操作符
|
var operator = $("#operator_jqxDropDownList").find("option:eq(" + $("#operator").jqxDropDownList('getSelectedIndex') + ")").val();
|
///查询操作符
|
var operatorText = $("#operator_jqxDropDownList").find("option:eq(" + $("#operator").jqxDropDownList('getSelectedIndex') + ")").text();
|
if (value == "") return;
|
///拼装查询条件
|
if (where == "") {
|
$('#txtwhere').jqxTextArea('val', " " + columnText + " " + operatorText + " " + value);
|
if (operator == "like") {
|
H_Grid.searchWhere += " or " + column + " " + operator + " '%" + value + "%'";
|
}
|
else {
|
H_Grid.searchWhere += " or " + column + " " + operator + " '" + value + "'";
|
}
|
}
|
else {
|
if (where == "(") {
|
$('#txtwhere').jqxTextArea('val', where + columnText + " " + operatorText + " " + value);
|
if (operator == "like") {
|
H_Grid.searchWhere += " " + column + " " + operator + " '%" + value + "%'";
|
}
|
else {
|
if (columntype == "DATE")
|
H_Grid.searchWhere += " " + column + " " + operator + " to_date('" + value + "','yyyy/MM/dd')";
|
else
|
H_Grid.searchWhere += " " + column + " " + operator + " '" + value + "'";
|
}
|
}
|
else {
|
$('#txtwhere').jqxTextArea('val', where + " 或者 " + columnText + " " + operatorText + " " + value);
|
if (operator == "like") {
|
H_Grid.searchWhere += " or " + column + " " + operator + " '%" + value + "%'";
|
}
|
else {
|
if (columntype == "DATE")
|
H_Grid.searchWhere += " or " + column + " " + operator + " to_date('" + value + "','yyyy/MM/dd')";
|
else
|
H_Grid.searchWhere += " or " + column + " " + operator + " '" + value + "'";
|
}
|
}
|
}
|
});
|
///左括号
|
$("#btnL").on('click', function () {
|
var where = $('#txtwhere').jqxTextArea('val')
|
if (where == "") {
|
$('#txtwhere').jqxTextArea('val', "(");
|
}
|
else {
|
$('#txtwhere').jqxTextArea('val', where + "(");
|
}
|
H_Grid.searchWhere += " ( ";
|
});
|
///右括号
|
$("#btnR").on('click', function () {
|
var where = $('#txtwhere').jqxTextArea('val')
|
if (where == "") {
|
$('#txtwhere').jqxTextArea('val', ")");
|
}
|
else {
|
$('#txtwhere').jqxTextArea('val', where + " ) ");
|
}
|
H_Grid.searchWhere += " ) ";
|
});
|
$('#txtwhere').jqxTextArea({ placeHolder: '', height: 30 });
|
$('#txtwhere').jqxTextArea('val', H_Grid.searchWhereText);
|
},
|
///正则验证输入值的有效性
|
validateValue: function () {
|
|
}
|
};
|
window.onload = function () {
|
|
getInitSearchWhere();
|
H_Grid.InitGrid("grid", "", H_Grid.searchWhere);
|
}
|
function getInitSearchWhere() {
|
var searchWhere = GetQueryString("where");
|
if (searchWhere == null || searchWhere == undefined) {
|
searchWhere = "";
|
}
|
else {
|
//where = where.replace("or", "");
|
//where = where.replace("and", "");
|
}
|
var searchWhereText = GetQueryString("searchWhereText");
|
if (searchWhereText == null || searchWhereText == undefined) {
|
searchWhereText = "";
|
}
|
|
H_Grid.searchWhere += decodeURI(searchWhere);
|
//$('#txtwhere').jqxTextArea('val', searchWhereText);
|
H_Grid.searchWhereText = searchWhereText;
|
}
|
///页面关闭清除创建的label
|
function closeDia() {
|
try {
|
//skylineAPIObject.ProjectTree.clearTempGroup();
|
//var H_MyMap = window.external.InvokeScript2D("GetArcgisAPI", "");
|
//H_MyMap.RemoveMarker();
|
}
|
catch (esx) { }
|
}
|
|
function GetQueryString(name) {
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
var r = window.location.search.substr(1).match(reg);
|
if (r != null) return r[2];
|
return null;
|
}
|
</script>
|
</head>
|
|
<body class='default' onunload="closeDia()">
|
<!-- 遮罩层div -->
|
<div id="jqxLoader"></div>
|
|
<div id="sqlWhere" style="width: 100%; padding-top: 3px; display: none;">
|
<div style="width: 100%; height: 30px; margin-bottom: 6px;">
|
<textarea id="txtwhere" disabled></textarea>
|
</div>
|
<div id="columndiv" style="width: 110px; height: 30px; float: left; margin-left: 20px;"></div>
|
<div id="operatordiv" style="width: 110px; height: 30px; float: left; margin-left: 20px"></div>
|
<div id="valuediv" style="width: 160px; height: 30px; float: left;">
|
<input type='text' id='valueText' />
|
</div>
|
<div id="Anddiv" style="width: 70px; height: 30px; float: left;">
|
<input type="button" id="Andbtn" value="并且" />
|
</div>
|
<div id="Ordiv" style="width: 70px; height: 30px; float: left;">
|
<input type="button" id="Orbtn" value="或者" />
|
</div>
|
<div id="divL" style="width: 40px; height: 30px; float: left; display: none">
|
<input type="button" id="btnL" value="(" />
|
</div>
|
<div id="divR" style="width: 40px; height: 30px; float: left; display: none">
|
<input type="button" id="btnR" value=")" />
|
</div>
|
<div id="divRest" style="width: 90px; height: 30px; float: left;">
|
<input type="button" id="btnRest" value="重置" />
|
</div>
|
<div id="btndiv" style="width: 90px; height: 30px; float: left;">
|
<input type="button" id="btnSubmit" value="查找" />
|
</div>
|
</div>
|
<div id="grid"></div>
|
</body>
|
|
</html>
|