first commit
This commit is contained in:
109
WebRoot/jsp/work/mPointForSignalTest.jsp
Normal file
109
WebRoot/jsp/work/mPointForSignalTest.jsp
Normal file
@ -0,0 +1,109 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%@page import="com.sipai.entity.scada.MPoint"%>
|
||||
<%request.setAttribute("Flag_Modbus",MPoint.Flag_Modbus);%>
|
||||
<%request.setAttribute("Flag_Sql",MPoint.Flag_Sql);%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var testFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getRows');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
$('#grid').datagrid({
|
||||
url:ext.contextPath +'/work/mpoint/getvaluefunc.do',
|
||||
queryParams:{ids:datas },
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
/* $.post(ext.contextPath + '/work/mpoint/getvaluefunc.do', {ids : datas}, function(data) {
|
||||
$('#grid').datagrid("loadData",data);
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','通讯成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','通讯失败','info');
|
||||
}
|
||||
}); */
|
||||
};
|
||||
function FormatDate (strTime) {
|
||||
var date = new Date(strTime);
|
||||
return date.Format("yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath +'/work/mpoint/getvaluefunc.do',
|
||||
queryParams:{ids:'${ids}' },
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'ID',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{width : '100', title : '测量点ID', field : 'id', sortable : true, halign:'center'},
|
||||
{width : '100', title : '测量点Code', field : 'mpointcode', sortable : true, halign:'center'},
|
||||
{width : '150', title : '名称', field : 'parmname', sortable : false, halign:'center'},
|
||||
{width : '120', title : '测量时间', field : 'measuredt', sortable : true, halign:'center', formatter : function(value, row) {
|
||||
return row.measuredt.substring(0,19);
|
||||
|
||||
}},
|
||||
{width : '60', title : '值', field : 'parmvalue', sortable : false, align:'center'},
|
||||
{width : '60', title : '信号源', field : 'valuetype', sortable : true, align:'center', formatter : function(value, row) {
|
||||
if(row.valuetype=='${Flag_Modbus}'){
|
||||
return "Modbus";
|
||||
}else{
|
||||
return "数据库";
|
||||
}
|
||||
|
||||
}},
|
||||
{width : '80', title : '信号类型', field : 'signaltype', sortable : false, align:'center'}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
//testFun();
|
||||
}
|
||||
});
|
||||
|
||||
$('#search_pid').combotree({
|
||||
url : ext.contextPath + '/user/getUnitsJson.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
width:200,
|
||||
onBeforeSelect:function(node){
|
||||
if(node.id=="-1"){
|
||||
$("#search_pid").tree("search_pid");
|
||||
}
|
||||
},
|
||||
editable:false
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user