<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
<!DOCTYPE html>
|
<html>
|
<head>
|
<title>源数据监控</title>
|
<jsp:include page="../../../initlib/initAll.jsp"></jsp:include>
|
<script type="text/javascript" src="${pageContext.request.contextPath }/pms/pub/combobox/comboboxUtil.js"
|
charset="utf-8"></script>
|
<script type="text/javascript">
|
var twoGrid = null;
|
$(function () {
|
twoGrid = $('#twoGrid').datagrid({
|
rownumbers: true,
|
idField: 'key',
|
fit: true,
|
singleSelect: true,
|
fitColumns: true, //fitColumns= true就会自动适应宽度(无滚动条)
|
border: false,
|
striped: true,
|
nowrap: true,
|
remoteSort: false,
|
checkOnSelect: false,
|
selectOnCheck: false,
|
columns: [[{
|
field: 'key',
|
title: '键',
|
width: 130,
|
align: 'center',
|
sortable: true
|
}, {
|
field: 'value',
|
title: '值',
|
align: 'center',
|
width: 130,
|
sortable: true
|
/*formatter: function(value){
|
return '<span title='+value+'>'+value+'</span>';
|
}*/
|
}]],
|
toolbar: '#typeToolbar',
|
onLoadSuccess: function () {
|
$(this).datagrid('tooltip');
|
},
|
onRowContextMenu: function (e, rowIndex, rowData) {
|
e.preventDefault();
|
$(this).datagrid('unselectAll').datagrid('uncheckAll');
|
$(this).datagrid('selectRow', rowIndex);
|
$('#typeMenu').menu('show', {
|
left: e.pageX - 10,
|
top: e.pageY - 5
|
});
|
}
|
});
|
});
|
|
//点击主菜单,查询相应的数据
|
function querySourceDate(name) {
|
//重新加载datagrid的数据
|
twoGrid.datagrid({
|
url: "${pageContext.request.contextPath}/pms/monitoring/querySourceDate.do?name=" + name
|
});
|
|
}
|
|
var categoryGrid = null;
|
$(function () {
|
|
categoryGrid = $('#categoryGrid').datagrid({
|
fit: true,
|
fitColumns: true, //fitColumns= true就会自动适应宽度(无滚动条)
|
border: false,
|
idField: 'name',
|
//pagination : true, //在DataGrid控件底部显示分页工具栏。
|
nowrap: true,
|
rownumbers: true,
|
striped: true,
|
remoteSort: false,
|
//pageSize : 20, //每页显示多少条记录
|
//pageList : [ 10, 20, 30, 40, 50 ], //每页显示条数可选项
|
sortName: 'name',
|
sortOrder: 'asc',
|
singleSelect: true,
|
checkOnSelect: false,
|
selectOnCheck: false,
|
showPageList: false,
|
columns: [[{
|
field: 'name',
|
title: '一级名称',
|
width: 170,
|
align: 'center',
|
sortable: true
|
}, {
|
field: 'des',
|
title: '描述',
|
width: 150,
|
align: 'center'
|
}]],
|
toolbar: '#categoryToolbar',
|
url: "${pageContext.request.contextPath}/pms/monitoring/querySourceDateList.do",
|
queryParams: $("#categroyForm").form("getData"),
|
onLoadSuccess: function () {
|
$(this).datagrid('tooltip');
|
},
|
onRowContextMenu: function (e, rowIndex, rowData) {
|
e.preventDefault();
|
$(this).datagrid('unselectAll').datagrid('uncheckAll');
|
$(this).datagrid('selectRow', rowIndex);
|
$('#categoryMenu').menu('show', {
|
left: e.pageX - 10,
|
top: e.pageY - 5
|
});
|
},
|
onClickRow: function (rowIndex, rowData) {
|
querySourceDate(rowData.name);
|
}
|
});
|
});
|
|
/**
|
* 查询数据
|
*/
|
function querySourceDateList() {
|
categoryGrid.datagrid({
|
url: "${pageContext.request.contextPath}/pms/monitoring/querySourceDateList.do",
|
queryParams: $("#categroyForm").form("getData")
|
});
|
}
|
</script>
|
</head>
|
<body class="easyui-layout" data-options="fit : true,border : false">
|
<div data-options="region:'west',border:true,split:false,title:'源数据监控数据字典【可单击表格】'" style="width: 400px;">
|
<div id="categoryToolbar" style="display: none;">
|
<form id="categroyForm" style="margin:4px 0px 0px 0px">
|
<div class="topTool">
|
<fieldset>
|
<div>
|
<span class="label">一级名称:</span>
|
<input type="text" name="name" class="easyui-validatebox "
|
data-options="prompt: '请输入数据名称',width:120"/>
|
</div>
|
<div>
|
<span class="label">设备类型:</span>
|
<select name="eqpType"
|
class="easyui-combobox"
|
data-options="panelHeight:'auto',editable:false,width:120">
|
<!-- 1-月 2-周 3-日 -->
|
<option value="">全部</option>
|
<option value="卷烟机">卷烟机</option>
|
<option value="包装机">包装机</option>
|
<option value="装封箱机">装封箱机</option>
|
<option value="发射机">发射机</option>
|
<option value="成型机">成型机</option>
|
<option value="提升机">提升机</option>
|
</select>
|
</div>
|
</fieldset>
|
</div>
|
</form>
|
<div class="easyui-toolbar" style="width:400px;">
|
<a onclick="querySourceDateList()" href="javascript:void(0);" class="easyui-linkbutton"
|
data-options="plain:true,iconCls:'icon-standard-zoom'">查询</a>
|
</div>
|
</div>
|
<table id="categoryGrid"></table>
|
</div>
|
|
<div data-options="region:'center',border:true,title:'二级数据'">
|
<div id="typeToolbar" style="display: none;"></div>
|
<table id="twoGrid"></table>
|
</div>
|
</body>
|
</html>
|