|
|
|
|
@ -1,75 +1,80 @@
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="zh" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" xmlns:th="http://www.thymeleaf.org">
|
|
|
|
|
<head>
|
|
|
|
|
<th:block th:include="include :: header('振动数据曲线')"/>
|
|
|
|
|
<th:block th:include="include :: layout-latest-css"/>
|
|
|
|
|
<th:block th:include="include :: ztree-css"/>
|
|
|
|
|
<th:block th:include="include :: datetimepicker-css"/>
|
|
|
|
|
<th:block th:include="include :: header('振动数据曲线')"/>
|
|
|
|
|
<th:block th:include="include :: layout-latest-css"/>
|
|
|
|
|
<th:block th:include="include :: ztree-css"/>
|
|
|
|
|
<th:block th:include="include :: datetimepicker-css"/>
|
|
|
|
|
</head>
|
|
|
|
|
<style>
|
|
|
|
|
.echarts{
|
|
|
|
|
width: 49%;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
|
|
|
|
.echarts {
|
|
|
|
|
width: 49%;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<body class="gray-bg">
|
|
|
|
|
|
|
|
|
|
<div class="ui-layout-west">
|
|
|
|
|
<div class="box box-main">
|
|
|
|
|
<div class="box-header">
|
|
|
|
|
<div class="box-title">
|
|
|
|
|
<i class="fa icon-grid"></i> 测控点信息
|
|
|
|
|
</div>
|
|
|
|
|
<div class="box-tools pull-right">
|
|
|
|
|
<a class="btn btn-box-tool" href="#" onclick="dept()" title="测控点信息" type="button"><i class="fa fa-edit"></i></a>
|
|
|
|
|
<button class="btn btn-box-tool" id="btnExpand" style="display:none;" title="展开" type="button"><i
|
|
|
|
|
class="fa fa-chevron-up"></i></button>
|
|
|
|
|
<button class="btn btn-box-tool" id="btnCollapse" title="折叠" type="button"><i class="fa fa-chevron-down"></i>
|
|
|
|
|
</button>
|
|
|
|
|
<button class="btn btn-box-tool" id="btnRefresh" title="刷新" type="button"><i class="fa fa-refresh"></i></button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="box box-main">
|
|
|
|
|
<div class="box-header">
|
|
|
|
|
<div class="box-title">
|
|
|
|
|
<i class="fa icon-grid"></i> 测控点信息
|
|
|
|
|
</div>
|
|
|
|
|
<div class="box-tools pull-right">
|
|
|
|
|
<a class="btn btn-box-tool" href="#" onclick="dept()" title="测控点信息" type="button"><i
|
|
|
|
|
class="fa fa-edit"></i></a>
|
|
|
|
|
<button class="btn btn-box-tool" id="btnExpand" style="display:none;" title="展开" type="button"><i
|
|
|
|
|
class="fa fa-chevron-up"></i></button>
|
|
|
|
|
<button class="btn btn-box-tool" id="btnCollapse" title="折叠" type="button"><i
|
|
|
|
|
class="fa fa-chevron-down"></i>
|
|
|
|
|
</button>
|
|
|
|
|
<button class="btn btn-box-tool" id="btnRefresh" title="刷新" type="button"><i
|
|
|
|
|
class="fa fa-refresh"></i></button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ui-layout-content">
|
|
|
|
|
<div class="ztree" id="tree"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ui-layout-content">
|
|
|
|
|
<div class="ztree" id="tree"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="ui-layout-center">
|
|
|
|
|
<div class="container-div">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-sm-12 search-collapse">
|
|
|
|
|
<form id="formId">
|
|
|
|
|
<input id="monitorId" name="monitorId" type="hidden">
|
|
|
|
|
<div class="select-list">
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="select-time">
|
|
|
|
|
<label>采集时间:</label><input class="form-control" id="laydate-demo-3" name="params[beginCollectTime]"
|
|
|
|
|
placeholder="开始时间"
|
|
|
|
|
style="width: 150px" type="text"/>
|
|
|
|
|
<span>-</span>
|
|
|
|
|
<input class="form-control" id="laydate-demo-4" name="params[endCollectTime]" placeholder="结束时间"
|
|
|
|
|
style="width: 150px"
|
|
|
|
|
type="text"/>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<!-- <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search();"><i class="fa fa-search"></i> 搜索</a>-->
|
|
|
|
|
<!-- <a class="btn btn-primary btn-rounded btn-sm" onclick="getdata($('#monitorId').val())"><i class="fa fa-search"></i> 搜索</a>-->
|
|
|
|
|
<!-- <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>-->
|
|
|
|
|
</li>
|
|
|
|
|
<div class="container-div">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-sm-12 search-collapse">
|
|
|
|
|
<form id="formId">
|
|
|
|
|
<input id="monitorId" name="monitorId" type="hidden">
|
|
|
|
|
<div class="select-list">
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="select-time">
|
|
|
|
|
<label>采集时间:</label><input class="form-control" id="laydate-demo-3"
|
|
|
|
|
name="params[beginCollectTime]"
|
|
|
|
|
placeholder="开始时间"
|
|
|
|
|
style="width: 150px" type="text"/>
|
|
|
|
|
<span>-</span>
|
|
|
|
|
<input class="form-control" id="laydate-demo-4" name="params[endCollectTime]"
|
|
|
|
|
placeholder="结束时间"
|
|
|
|
|
style="width: 150px"
|
|
|
|
|
type="text"/>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<!-- <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search();"><i class="fa fa-search"></i> 搜索</a>-->
|
|
|
|
|
<!-- <a class="btn btn-primary btn-rounded btn-sm" onclick="getdata($('#monitorId').val())"><i class="fa fa-search"></i> 搜索</a>-->
|
|
|
|
|
<!-- <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>-->
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ibox-content" style="margin-top: 80px;margin-right: 0px;">
|
|
|
|
|
<div class="echarts" id="echarts-line-chart" style="height: 40vh"></div>
|
|
|
|
|
<div class="echarts" id="echarts-line-chart1" style="height: 40vh"></div>
|
|
|
|
|
<div class="echarts" id="echarts-line-chart2" style="height: 40vh"></div>
|
|
|
|
|
<div class="echarts" id="echarts-line-chart3" style="height: 40vh"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ibox-content" style="margin-top: 80px;margin-right: 0px;">
|
|
|
|
|
<div class="echarts" id="echarts-line-chart" style="height: 80vh;width: 100%"></div>
|
|
|
|
|
<div class="echarts" id="echarts-line-chart1" style="height: 40vh"></div>
|
|
|
|
|
<div class="echarts" id="echarts-line-chart2" style="height: 40vh"></div>
|
|
|
|
|
<div class="echarts" id="echarts-line-chart3" style="height: 40vh"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<th:block th:include="include :: footer"/>
|
|
|
|
|
@ -81,344 +86,401 @@
|
|
|
|
|
<script th:inline="javascript">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var prefix = ctx + "report/temandhumreport"
|
|
|
|
|
var timedata = [];
|
|
|
|
|
var tempreturedata = [];
|
|
|
|
|
var humdata = [];
|
|
|
|
|
layui.use('laydate', function () {
|
|
|
|
|
var laydate = layui.laydate;
|
|
|
|
|
var prefix = ctx + "report/temandhumreport"
|
|
|
|
|
var timedata = [];
|
|
|
|
|
var tempreturedata = [];
|
|
|
|
|
var humdata = [];
|
|
|
|
|
layui.use('laydate', function () {
|
|
|
|
|
var laydate = layui.laydate;
|
|
|
|
|
|
|
|
|
|
laydate.render({
|
|
|
|
|
elem: '#laydate-demo-3',
|
|
|
|
|
type: 'datetime',
|
|
|
|
|
trigger: 'click'
|
|
|
|
|
laydate.render({
|
|
|
|
|
elem: '#laydate-demo-3',
|
|
|
|
|
type: 'datetime',
|
|
|
|
|
trigger: 'click'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
laydate.render({
|
|
|
|
|
elem: '#laydate-demo-4',
|
|
|
|
|
type: 'datetime',
|
|
|
|
|
trigger: 'click'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
$(function () {
|
|
|
|
|
|
|
|
|
|
var panehHidden = false;
|
|
|
|
|
// var time=getNowFormatDate();
|
|
|
|
|
// console.log(time);
|
|
|
|
|
|
|
|
|
|
getdata(null);
|
|
|
|
|
|
|
|
|
|
if ($(this).width() < 769) {
|
|
|
|
|
panehHidden = true;
|
|
|
|
|
}
|
|
|
|
|
$('body').layout({initClosed: panehHidden, west__size: 185});
|
|
|
|
|
// initTable();
|
|
|
|
|
queryUserList();
|
|
|
|
|
queryDeptTree();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
laydate.render({
|
|
|
|
|
elem: '#laydate-demo-4',
|
|
|
|
|
type: 'datetime',
|
|
|
|
|
trigger: 'click'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
$(function () {
|
|
|
|
|
function queryUserList() {
|
|
|
|
|
var options = {
|
|
|
|
|
url: prefix + "/list",
|
|
|
|
|
modalName: "压缩空气数据曲线",
|
|
|
|
|
columns: [{
|
|
|
|
|
checkbox: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'objid',
|
|
|
|
|
title: '自增标识',
|
|
|
|
|
visible: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'monitorId',
|
|
|
|
|
title: '测控点编号'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'between',
|
|
|
|
|
title: '采集时间'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'temmaxNumber',
|
|
|
|
|
title: '温度最大值'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'temminNumber',
|
|
|
|
|
title: '温度最小值'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'temavgNumber',
|
|
|
|
|
title: '温度平均值'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'hummaxNumber',
|
|
|
|
|
title: '湿度最大值'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'humminNumber',
|
|
|
|
|
title: '湿度最小值'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'humavgNumber',
|
|
|
|
|
title: '湿度平均值'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
var panehHidden = false;
|
|
|
|
|
// var time=getNowFormatDate();
|
|
|
|
|
// console.log(time);
|
|
|
|
|
|
|
|
|
|
getdata(null);
|
|
|
|
|
|
|
|
|
|
if ($(this).width() < 769) {
|
|
|
|
|
panehHidden = true;
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
|
$.table.init(options);
|
|
|
|
|
}
|
|
|
|
|
$('body').layout({initClosed: panehHidden, west__size: 185});
|
|
|
|
|
// initTable();
|
|
|
|
|
queryUserList();
|
|
|
|
|
queryDeptTree();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function queryUserList() {
|
|
|
|
|
var options = {
|
|
|
|
|
url: prefix + "/list",
|
|
|
|
|
modalName: "压缩空气数据曲线",
|
|
|
|
|
columns: [{
|
|
|
|
|
checkbox: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'objid',
|
|
|
|
|
title: '自增标识',
|
|
|
|
|
visible: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'monitorId',
|
|
|
|
|
title: '测控点编号'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'between',
|
|
|
|
|
title: '采集时间'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'temmaxNumber',
|
|
|
|
|
title: '温度最大值'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'temminNumber',
|
|
|
|
|
title: '温度最小值'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'temavgNumber',
|
|
|
|
|
title: '温度平均值'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'hummaxNumber',
|
|
|
|
|
title: '湿度最大值'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'humminNumber',
|
|
|
|
|
title: '湿度最小值'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'humavgNumber',
|
|
|
|
|
title: '湿度平均值'
|
|
|
|
|
},
|
|
|
|
|
function queryDeptTree() {
|
|
|
|
|
var url = ctx + "system/Monitor/treeData?monitorType=20";
|
|
|
|
|
var options = {
|
|
|
|
|
url: url,
|
|
|
|
|
expandLevel: 1,
|
|
|
|
|
onClick: zOnClick,
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
$.tree.init(options);
|
|
|
|
|
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
|
$.table.init(options);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function queryDeptTree() {
|
|
|
|
|
var url = ctx + "system/Monitor/treeData?monitorType=20";
|
|
|
|
|
var options = {
|
|
|
|
|
url: url,
|
|
|
|
|
expandLevel: 1,
|
|
|
|
|
onClick: zOnClick,
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
$.tree.init(options);
|
|
|
|
|
|
|
|
|
|
function zOnClick(event, treeId, treeNode) {
|
|
|
|
|
$("#monitorId").val(treeNode.id);
|
|
|
|
|
/*alert(treeNode.id)*/
|
|
|
|
|
$.table.search();
|
|
|
|
|
getdata(treeNode.id);
|
|
|
|
|
function zOnClick(event, treeId, treeNode) {
|
|
|
|
|
$("#monitorId").val(treeNode.id);
|
|
|
|
|
/*alert(treeNode.id)*/
|
|
|
|
|
$.table.search();
|
|
|
|
|
getdata(treeNode.id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('#btnExpand').click(function () {
|
|
|
|
|
$._tree.expandAll(true);
|
|
|
|
|
$(this).hide();
|
|
|
|
|
$('#btnCollapse').show();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#btnCollapse').click(function () {
|
|
|
|
|
$._tree.expandAll(false);
|
|
|
|
|
$(this).hide();
|
|
|
|
|
$('#btnExpand').show();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#btnRefresh').click(function () {
|
|
|
|
|
queryDeptTree();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/* 社区信息 */
|
|
|
|
|
function dept() {
|
|
|
|
|
var url = ctx + "system/Monitor";
|
|
|
|
|
$.modal.openTab("社区信息", url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getdata(monitorId) {
|
|
|
|
|
var formData = new FormData();
|
|
|
|
|
formData.append("sensorId", monitorId);
|
|
|
|
|
formData.append("params[beginCollectTime]", $("#laydate-demo-3").val());
|
|
|
|
|
formData.append("params[endCollectTime]",$("#laydate-demo-4").val());
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: ctx + "system/TVibrationsensorData/sensorList",
|
|
|
|
|
type: 'post',
|
|
|
|
|
cache: false,
|
|
|
|
|
data: formData,
|
|
|
|
|
processData: false,
|
|
|
|
|
contentType: false,
|
|
|
|
|
dataType: "json",
|
|
|
|
|
success: function (result) {
|
|
|
|
|
design(result.data);
|
|
|
|
|
}
|
|
|
|
|
$('#btnExpand').click(function () {
|
|
|
|
|
$._tree.expandAll(true);
|
|
|
|
|
$(this).hide();
|
|
|
|
|
$('#btnCollapse').show();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function design(e) {
|
|
|
|
|
console.log(e)
|
|
|
|
|
let lineChart = echarts.init(document.getElementById("echarts-line-chart"));
|
|
|
|
|
let lineChart1 = echarts.init(document.getElementById("echarts-line-chart1"));
|
|
|
|
|
let lineChart2 = echarts.init(document.getElementById("echarts-line-chart2"));
|
|
|
|
|
let lineChart3 = echarts.init(document.getElementById("echarts-line-chart3"));
|
|
|
|
|
lineChart.setOption({
|
|
|
|
|
title: {
|
|
|
|
|
text: '温度数据曲线(℃)',
|
|
|
|
|
left: 'center'
|
|
|
|
|
},
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
axisPointer: {
|
|
|
|
|
animation: false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
legend: {
|
|
|
|
|
data: ['温度'],
|
|
|
|
|
left: 10
|
|
|
|
|
},
|
|
|
|
|
dataZoom: [
|
|
|
|
|
{
|
|
|
|
|
show: true,
|
|
|
|
|
realtime: true,
|
|
|
|
|
start: 0,
|
|
|
|
|
end: 100,
|
|
|
|
|
xAxisIndex: 0
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'inside',
|
|
|
|
|
realtime: true,
|
|
|
|
|
start: 30,
|
|
|
|
|
end: 70,
|
|
|
|
|
xAxisIndex: 0
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
data: e.map(v=>v.collectTime)
|
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
type: 'value'
|
|
|
|
|
},
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
data: e.map(v=>v.temperature),
|
|
|
|
|
type: 'line'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
$('#btnCollapse').click(function () {
|
|
|
|
|
$._tree.expandAll(false);
|
|
|
|
|
$(this).hide();
|
|
|
|
|
$('#btnExpand').show();
|
|
|
|
|
});
|
|
|
|
|
lineChart1.setOption({
|
|
|
|
|
title: {
|
|
|
|
|
text: '速度数据曲线(mm/s)',
|
|
|
|
|
left: 'center'
|
|
|
|
|
},
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
axisPointer: {
|
|
|
|
|
animation: false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
legend: {
|
|
|
|
|
data: ['速度'],
|
|
|
|
|
left: 10
|
|
|
|
|
},
|
|
|
|
|
dataZoom: [
|
|
|
|
|
{
|
|
|
|
|
show: true,
|
|
|
|
|
realtime: true,
|
|
|
|
|
start: 0,
|
|
|
|
|
end: 100,
|
|
|
|
|
xAxisIndex: 0
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'inside',
|
|
|
|
|
realtime: true,
|
|
|
|
|
start: 30,
|
|
|
|
|
end: 70,
|
|
|
|
|
xAxisIndex: 0
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
data: e.map(v=>v.collectTime)
|
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
type: 'value'
|
|
|
|
|
},
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
data: e.map(v=>v.speed),
|
|
|
|
|
type: 'line'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}, true);
|
|
|
|
|
lineChart2.setOption({
|
|
|
|
|
title: {
|
|
|
|
|
text: '位移数据曲线(um)',
|
|
|
|
|
left: 'center'
|
|
|
|
|
},
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
axisPointer: {
|
|
|
|
|
animation: false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
legend: {
|
|
|
|
|
data: ['位移'],
|
|
|
|
|
left: 10
|
|
|
|
|
},
|
|
|
|
|
dataZoom: [
|
|
|
|
|
{
|
|
|
|
|
show: true,
|
|
|
|
|
realtime: true,
|
|
|
|
|
start: 0,
|
|
|
|
|
end: 100,
|
|
|
|
|
xAxisIndex: 0
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'inside',
|
|
|
|
|
realtime: true,
|
|
|
|
|
start: 30,
|
|
|
|
|
end: 70,
|
|
|
|
|
xAxisIndex: 0
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
data: e.map(v=>v.collectTime)
|
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
type: 'value'
|
|
|
|
|
},
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
data: e.map(v=>v.displacement),
|
|
|
|
|
type: 'line'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}, true);
|
|
|
|
|
lineChart3.setOption({
|
|
|
|
|
title: {
|
|
|
|
|
text: '加速度数据曲线(g)',
|
|
|
|
|
left: 'center'
|
|
|
|
|
},
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
axisPointer: {
|
|
|
|
|
animation: false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
legend: {
|
|
|
|
|
data: ['加速度'],
|
|
|
|
|
left: 10
|
|
|
|
|
},
|
|
|
|
|
dataZoom: [
|
|
|
|
|
{
|
|
|
|
|
show: true,
|
|
|
|
|
realtime: true,
|
|
|
|
|
start: 0,
|
|
|
|
|
end: 100,
|
|
|
|
|
xAxisIndex: 0
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'inside',
|
|
|
|
|
realtime: true,
|
|
|
|
|
start: 30,
|
|
|
|
|
end: 70,
|
|
|
|
|
xAxisIndex: 0
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
data: e.map(v=>v.collectTime)
|
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
type: 'value'
|
|
|
|
|
},
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
data: e.map(v=>v.acceleration),
|
|
|
|
|
type: 'line'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}, true);
|
|
|
|
|
|
|
|
|
|
$(window).resize(lineChart.resize);
|
|
|
|
|
$(window).resize(lineChart1.resize);
|
|
|
|
|
$(window).resize(lineChart2.resize);
|
|
|
|
|
$(window).resize(lineChart3.resize);
|
|
|
|
|
}
|
|
|
|
|
$('#btnRefresh').click(function () {
|
|
|
|
|
queryDeptTree();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/* 社区信息 */
|
|
|
|
|
function dept() {
|
|
|
|
|
var url = ctx + "system/Monitor";
|
|
|
|
|
$.modal.openTab("社区信息", url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getdata(monitorId) {
|
|
|
|
|
var formData = new FormData();
|
|
|
|
|
formData.append("sensorId", monitorId);
|
|
|
|
|
formData.append("params[beginCollectTime]", $("#laydate-demo-3").val());
|
|
|
|
|
formData.append("params[endCollectTime]", $("#laydate-demo-4").val());
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: ctx + "system/TVibrationsensorData/sensorList",
|
|
|
|
|
type: 'post',
|
|
|
|
|
cache: false,
|
|
|
|
|
data: formData,
|
|
|
|
|
processData: false,
|
|
|
|
|
contentType: false,
|
|
|
|
|
dataType: "json",
|
|
|
|
|
success: function (result) {
|
|
|
|
|
design(result.data);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function design(e) {
|
|
|
|
|
console.log(e)
|
|
|
|
|
let lineChart = echarts.init(document.getElementById("echarts-line-chart"));
|
|
|
|
|
lineChart.setOption({
|
|
|
|
|
title: {
|
|
|
|
|
text: '温度、速度、位移数据曲线',
|
|
|
|
|
left: 'center',
|
|
|
|
|
top: 20
|
|
|
|
|
},
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
axisPointer: {
|
|
|
|
|
animation: false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
grid: {
|
|
|
|
|
right: 100,
|
|
|
|
|
left: 80
|
|
|
|
|
},
|
|
|
|
|
legend: {
|
|
|
|
|
x: 'center'
|
|
|
|
|
},
|
|
|
|
|
dataZoom: [
|
|
|
|
|
{
|
|
|
|
|
show: false,
|
|
|
|
|
realtime: true,
|
|
|
|
|
start: 0,
|
|
|
|
|
end: 100,
|
|
|
|
|
xAxisIndex: 0
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'inside',
|
|
|
|
|
realtime: true,
|
|
|
|
|
start: 30,
|
|
|
|
|
end: 70,
|
|
|
|
|
xAxisIndex: 0
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
data: e.map(v => v.collectTime)
|
|
|
|
|
},
|
|
|
|
|
yAxis: [
|
|
|
|
|
{
|
|
|
|
|
type: 'value',
|
|
|
|
|
name: '℃',
|
|
|
|
|
axisLine: {
|
|
|
|
|
show: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'mm/s',
|
|
|
|
|
type: 'value',
|
|
|
|
|
axisLine: {
|
|
|
|
|
show: true
|
|
|
|
|
},
|
|
|
|
|
offset: 25,
|
|
|
|
|
position: 'left'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'um',
|
|
|
|
|
type: 'value',
|
|
|
|
|
axisLine: {
|
|
|
|
|
show: true
|
|
|
|
|
},
|
|
|
|
|
offset: 50
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// name: 'g',
|
|
|
|
|
// type: 'value',
|
|
|
|
|
// axisLine: {
|
|
|
|
|
// show: true
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
],
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
name: '温度',
|
|
|
|
|
data: e.map(v => v.temperature),
|
|
|
|
|
type: 'line',
|
|
|
|
|
yAxisIndex: 0
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '速度',
|
|
|
|
|
data: e.map(v => v.speed),
|
|
|
|
|
type: 'line',
|
|
|
|
|
yAxisIndex: 1
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '位移',
|
|
|
|
|
data: e.map(v => v.displacement),
|
|
|
|
|
type: 'line',
|
|
|
|
|
yAxisIndex: 2
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// name: '加速度',
|
|
|
|
|
// data: e.map(v => v.acceleration),
|
|
|
|
|
// type: 'line',
|
|
|
|
|
// yAxisIndex: 3
|
|
|
|
|
// },
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
$(window).resize(lineChart.resize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// let lineChart1 = echarts.init(document.getElementById("echarts-line-chart1"));
|
|
|
|
|
// let lineChart2 = echarts.init(document.getElementById("echarts-line-chart2"));
|
|
|
|
|
// let lineChart3 = echarts.init(document.getElementById("echarts-line-chart3"));
|
|
|
|
|
|
|
|
|
|
// lineChart1.setOption({
|
|
|
|
|
// title: {
|
|
|
|
|
// text: '速度数据曲线(mm/s)',
|
|
|
|
|
// left: 'center'
|
|
|
|
|
// },
|
|
|
|
|
// tooltip: {
|
|
|
|
|
// trigger: 'axis',
|
|
|
|
|
// axisPointer: {
|
|
|
|
|
// animation: false
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// legend: {
|
|
|
|
|
// data: ['速度'],
|
|
|
|
|
// left: 10
|
|
|
|
|
// },
|
|
|
|
|
// dataZoom: [
|
|
|
|
|
// {
|
|
|
|
|
// show: true,
|
|
|
|
|
// realtime: true,
|
|
|
|
|
// start: 0,
|
|
|
|
|
// end: 100,
|
|
|
|
|
// xAxisIndex: 0
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// type: 'inside',
|
|
|
|
|
// realtime: true,
|
|
|
|
|
// start: 30,
|
|
|
|
|
// end: 70,
|
|
|
|
|
// xAxisIndex: 0
|
|
|
|
|
// }
|
|
|
|
|
// ],
|
|
|
|
|
// xAxis: {
|
|
|
|
|
// type: 'category',
|
|
|
|
|
// data: e.map(v => v.collectTime)
|
|
|
|
|
// },
|
|
|
|
|
// yAxis: {
|
|
|
|
|
// type: 'value'
|
|
|
|
|
// },
|
|
|
|
|
// series: [
|
|
|
|
|
// {
|
|
|
|
|
// data: e.map(v => v.speed),
|
|
|
|
|
// type: 'line'
|
|
|
|
|
// }
|
|
|
|
|
// ]
|
|
|
|
|
// }, true);
|
|
|
|
|
// lineChart2.setOption({
|
|
|
|
|
// title: {
|
|
|
|
|
// text: '位移数据曲线(um)',
|
|
|
|
|
// left: 'center'
|
|
|
|
|
// },
|
|
|
|
|
// tooltip: {
|
|
|
|
|
// trigger: 'axis',
|
|
|
|
|
// axisPointer: {
|
|
|
|
|
// animation: false
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// legend: {
|
|
|
|
|
// data: ['位移'],
|
|
|
|
|
// left: 10
|
|
|
|
|
// },
|
|
|
|
|
// dataZoom: [
|
|
|
|
|
// {
|
|
|
|
|
// show: true,
|
|
|
|
|
// realtime: true,
|
|
|
|
|
// start: 0,
|
|
|
|
|
// end: 100,
|
|
|
|
|
// xAxisIndex: 0
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// type: 'inside',
|
|
|
|
|
// realtime: true,
|
|
|
|
|
// start: 30,
|
|
|
|
|
// end: 70,
|
|
|
|
|
// xAxisIndex: 0
|
|
|
|
|
// }
|
|
|
|
|
// ],
|
|
|
|
|
// xAxis: {
|
|
|
|
|
// type: 'category',
|
|
|
|
|
// data: e.map(v => v.collectTime)
|
|
|
|
|
// },
|
|
|
|
|
// yAxis: {
|
|
|
|
|
// type: 'value'
|
|
|
|
|
// },
|
|
|
|
|
// series: [
|
|
|
|
|
// {
|
|
|
|
|
// data: e.map(v => v.displacement),
|
|
|
|
|
// type: 'line'
|
|
|
|
|
// }
|
|
|
|
|
// ]
|
|
|
|
|
// }, true);
|
|
|
|
|
// lineChart3.setOption({
|
|
|
|
|
// title: {
|
|
|
|
|
// text: '加速度数据曲线(g)',
|
|
|
|
|
// left: 'center'
|
|
|
|
|
// },
|
|
|
|
|
// tooltip: {
|
|
|
|
|
// trigger: 'axis',
|
|
|
|
|
// axisPointer: {
|
|
|
|
|
// animation: false
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// legend: {
|
|
|
|
|
// data: ['加速度'],
|
|
|
|
|
// left: 10
|
|
|
|
|
// },
|
|
|
|
|
// dataZoom: [
|
|
|
|
|
// {
|
|
|
|
|
// show: true,
|
|
|
|
|
// realtime: true,
|
|
|
|
|
// start: 0,
|
|
|
|
|
// end: 100,
|
|
|
|
|
// xAxisIndex: 0
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// type: 'inside',
|
|
|
|
|
// realtime: true,
|
|
|
|
|
// start: 30,
|
|
|
|
|
// end: 70,
|
|
|
|
|
// xAxisIndex: 0
|
|
|
|
|
// }
|
|
|
|
|
// ],
|
|
|
|
|
// xAxis: {
|
|
|
|
|
// type: 'category',
|
|
|
|
|
// data: e.map(v => v.collectTime)
|
|
|
|
|
// },
|
|
|
|
|
// yAxis: {
|
|
|
|
|
// type: 'value'
|
|
|
|
|
// },
|
|
|
|
|
// series: [
|
|
|
|
|
// {
|
|
|
|
|
// data: e.map(v => v.acceleration),
|
|
|
|
|
// type: 'line'
|
|
|
|
|
// }
|
|
|
|
|
// ]
|
|
|
|
|
// }, true);
|
|
|
|
|
|
|
|
|
|
// $(window).resize(lineChart1.resize);
|
|
|
|
|
// $(window).resize(lineChart2.resize);
|
|
|
|
|
// $(window).resize(lineChart3.resize);
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
|