first commit
This commit is contained in:
116
bin/WebRoot/jsp/clean/monitorAdd.jsp
Normal file
116
bin/WebRoot/jsp/clean/monitorAdd.jsp
Normal file
@ -0,0 +1,116 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
//获取已选的工位id
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/clean/CleanMonitor/save.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectPoint(pointPosition,equipmentName,temperature,humidity,dust){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择监测设备',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/clean/CleanMonitor/showlistForSelect.do',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+pointPosition).textbox("setValue",res.equipmentName);
|
||||
$("#"+equipmentName).val(res.Name);
|
||||
$("#"+temperature).textbox("setValue",res.temperature);
|
||||
$("#"+humidity).textbox("setValue",res.humidity);
|
||||
$("#"+dust).textbox("setValue",res.dust);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>监测点位</th>
|
||||
<td><input id="pointPosition" name="pointPosition" class="easyui-textbox" data-options="required:true,validType:'isBlank'" value="" readonly/>
|
||||
<input id="equipmentName" name="equipmentName" type="hidden" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#pointPosition").textbox('textbox').bind("click", function () {
|
||||
selectPoint("pointPosition","equipmentName","temperature","humidity","dust");
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>采集时间</th>
|
||||
<td><input id="collectionTime" name="collectionTime" class="Wdate"
|
||||
value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
|
||||
readonly/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>温度</th>
|
||||
<td><input id="temperature" name="temperature" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>湿度</th>
|
||||
<td><input id="humidity" name="humidity" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" />
|
||||
</td>
|
||||
</tr><tr>
|
||||
<th>尘埃粒子</th>
|
||||
<td><input id="dust" name="dust" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br/>
|
||||
<div id="p">
|
||||
<table id="grid" data-options="border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user