代码拉取完成,页面将自动刷新
同步操作将从 WEB SCADA/WEB SCADA 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<!DOCTYPE html>
<html>
<head>
<title>Cooking Pressure Table</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="system/styles/igrX.css" />
<script type="text/javascript" src="system/scripts/igrX.js"></script>
</head>
<style>
h2{
text-align:center;
font-size: 1.5em;
}
#content-table{
width:100%;
text-align: center;
}
#content-table th{
text-align: center;
font-weight: bold;
background-color: #aaa;
}
#content-table tr:nth-child(even){
background-color: #ddd;
}
#content-table tr:nth-child(odd){
background-color: #eee;
}
</style>
<h2>压力值大于平均值 Daily list of Cooking Pressure values greater than the average</h2>
<br />
<br />
<div>
<span>Date: <input type="text" id="datep"></input></span>
<p>Average Value: <span id="avg"></span></p>
</div>
<div>
<table id="content-table">
<tr>
<th>Value</th>
<th>Time Stamp</th>
</tr>
</table>
</div>
<script type="text/javascript">
var updateTable = function(date) {
var param = {};
var date2 = new Date;
var dateS = "";
var date2S = "";
// Table for pressure_cook in DB
param["tbl"] = "log_14";
// Empty table in browser display for writeback
$("#content-table")['html']("");
$("#content-table")['append']("<tr><th>Value</th><th>Time Stamp</th></tr>");
// Prepare dates to send to SQL statement as parameters
date2.setTime(Date.parse(date));
dateS = (date2.getMonth() + 1) + "-" + (date2.getDate()) + "-" + date2.getFullYear();
date2S = (date2.getMonth() + 1) + "-" + (date2.getDate() + 1) + "-" + date2.getFullYear();
// Get average value first by querying "avgval" statement
runSql("avgval", {tbl:"log_14",col:"nvalue"},{outfmt:"json"},function(result){
if (result.statusCode == 200) {
var avgval = JSON.parse(result.response)[0]['expr1000'];
$("#avg")['html'](avgval); // Display average value on screen
// Store all parameters in the param object to be send to another SQL statement "pcookgta"
param["ts"] = dateS;
param["ts2"] = date2S;
param["val"] = avgval;
runSql("pcookgta", param, {outfmt:"json"}, function(result) {
if (result.statusCode == 200) {
var data = JSON.parse(result.response);
var tr = "";
// Fill in the display table with data retrieved from the ran SQL statement
for (var i in data){
tr = "<tr>";
tr += "<td>" + data[i]["nvalue"] + "</td>";
tr += "<td>" + data[i]["time_stamp"] + "</td></tr>";
$("#content-table")['append'](tr);
}
}
});
}
});
};
//*/
$(document).ready(function() {
$("#datep")['datepicker']();
$("#datep").datepicker("option", "dateFormat", "yy-mm-dd");
$("#datep").change(function() {
updateTable(this.value);
});
});
</script>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。