first commit
This commit is contained in:
1081
WebRoot/jsp/visual/interaction/cameraFrame.jsp
Normal file
1081
WebRoot/jsp/visual/interaction/cameraFrame.jsp
Normal file
File diff suppressed because it is too large
Load Diff
122
WebRoot/jsp/visual/interaction/cameraInteraction.jsp
Normal file
122
WebRoot/jsp/visual/interaction/cameraInteraction.jsp
Normal file
@ -0,0 +1,122 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.visual.JspElement"%>
|
||||
<%request.setAttribute("Type_GetValue", JspElement.Type_GetValue); %>
|
||||
<%request.setAttribute("Type_GetHistory", JspElement.Type_GetHistory); %>
|
||||
<%request.setAttribute("Type_GetModbus", JspElement.Type_GetModbus); %>
|
||||
<%request.setAttribute("Type_GetHttp", JspElement.Type_GetHttp); %>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/*.playWnd {
|
||||
margin: 0 0 0 0;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
border: 1px solid red;
|
||||
}*/
|
||||
.playWnd {
|
||||
margin: 0;
|
||||
width: 99%;
|
||||
height: 99%;
|
||||
/* border: 1px solid red; */
|
||||
}
|
||||
|
||||
.cbInfoDiv {
|
||||
float: left;
|
||||
width: 360px;
|
||||
margin-left: 16px;
|
||||
border: 1px solid #7F9DB9;
|
||||
}
|
||||
|
||||
.cbInfo {
|
||||
height: 200px;
|
||||
padding: 5px;
|
||||
border: 1px solid #7F9DB9;
|
||||
overflow: auto;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.operate {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.operate::after {
|
||||
content: '';
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.operate .btns {
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.module {
|
||||
float: left;
|
||||
width: 340px;
|
||||
min-height: 320px;
|
||||
margin-left: 16px;
|
||||
padding: 16px 8px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.module .item {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.module .label {
|
||||
width: 150px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-right: 8px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.module input[type="text"],
|
||||
.module select {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-left: 0;
|
||||
width: 150px;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
.module .btn {
|
||||
min-width: 80px;
|
||||
min-height: 24px;
|
||||
margin-top: 16px;
|
||||
margin-left: 158px;
|
||||
}
|
||||
</style>
|
||||
<jsp:include page="/jsp/incVisual.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
//自动执行第一步
|
||||
$(function () {
|
||||
//console.log("videoTypeInteraction1","${param.videoTypeInteraction}");
|
||||
document.getElementById('frameCamera').src = ext.contextPath
|
||||
+ "/jsp/visual/interaction/cameraFrame.jsp?planInteractionId=${planInteractionId}&fId=frameCamera&videoType=switch&top="
|
||||
+ document.getElementById('subModal').offsetTop + "&left=" + document.getElementById('subModal').offsetLeft
|
||||
+ "&videoTypeInteraction=${param.videoTypeInteraction}";
|
||||
//启动插件
|
||||
document.getElementById("modalDialog").style.height = 0.7 * document.documentElement.offsetHeight + "px";
|
||||
document.getElementById("modalDialog").style.width = 0.5 * document.documentElement.offsetWidth + "px";
|
||||
})
|
||||
</script>
|
||||
<div class="modal fade" id="subModal" style="width:100%;height:100%">
|
||||
<div class="modal-dialog" id="modalDialog" style="position:relative">
|
||||
<div id="modalContent" class="modal-content" style="width:100%;height:100%">
|
||||
<iframe id="frameCamera" scrolling="no" allowtransparency="yes"
|
||||
style="height:100%;width:100%;border:0px;padding:0px;margin:0px"></iframe>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
212
WebRoot/jsp/visual/interaction/lineInteraction.jsp
Normal file
212
WebRoot/jsp/visual/interaction/lineInteraction.jsp
Normal file
@ -0,0 +1,212 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.visual.JspElement"%>
|
||||
<%request.setAttribute("Type_GetValue", JspElement.Type_GetValue); %>
|
||||
<%request.setAttribute("Type_GetHistory", JspElement.Type_GetHistory); %>
|
||||
<%request.setAttribute("Type_GetModbus", JspElement.Type_GetModbus); %>
|
||||
<%request.setAttribute("Type_GetHttp", JspElement.Type_GetHttp); %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var colors = ['#75BC63', '#D12FD6', '#00c200', '#d14a61', '#675bba', '#5793f3'];
|
||||
var symbols = ['circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'];
|
||||
/* 请求数据 */
|
||||
function getValue() {
|
||||
//折线图
|
||||
$.post(ext.contextPath + '/plan/getDataByPlanInteractionId.do', { planInteractionId: "${planInteractionId}" }, function (data) {
|
||||
var yaAxis = [];
|
||||
var series = [];
|
||||
var measuredt = [];
|
||||
var legendName = [];
|
||||
for (var d = 0; d < data[0].mPoint.length; d++) {
|
||||
var ArrayDatas = data[0].mPoint[d].mPointHistory//eval("(" + data + ")");
|
||||
var offset = 60;
|
||||
|
||||
//y轴
|
||||
var yobj = {
|
||||
type: 'value',
|
||||
scale: true,
|
||||
name: data[0].mPoint[d].parmname + "(" + data[0].mPoint[d].unit + ")",
|
||||
nameTextStyle: {
|
||||
color: '#fff',
|
||||
fontSize: 18
|
||||
},
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#97C8E6',
|
||||
width: 2,
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
color: '#fff',
|
||||
formatter: '{value}' + data[0].mPoint[d].unit,
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
//max: 1200,
|
||||
min: function (value) {
|
||||
return value.min;
|
||||
},
|
||||
boundaryGap: [0.2, 0.2]
|
||||
}
|
||||
if (d == 0) {
|
||||
yobj.position = 'left';
|
||||
yobj.offset = 0;
|
||||
} else {
|
||||
yobj.position = 'right';
|
||||
yobj.offset = offset * (d - 1);
|
||||
}
|
||||
if (d >= 2) {
|
||||
yobj.show = false;
|
||||
}
|
||||
yaAxis.push(yobj);
|
||||
|
||||
//series
|
||||
var sobj = {
|
||||
name: data[0].mPoint[d].parmname,
|
||||
xAxisIndex: 1,
|
||||
yAxisIndex: d,
|
||||
symbol: symbols[d % symbols.length],
|
||||
symbolSize: 10,
|
||||
itemStyle: {
|
||||
color: colors[d % colors.length],
|
||||
borderWidth: 1,
|
||||
},
|
||||
lineStyle: {
|
||||
width: 3,
|
||||
},
|
||||
};
|
||||
sobj.type = "line";
|
||||
|
||||
//legend名称
|
||||
legendName.push(data[0].mPoint[d].parmname);
|
||||
var dataSeries = [];
|
||||
for (var j = 0; j < ArrayDatas.length; j++) {
|
||||
//x轴 只取data第一条数据进行生成x轴
|
||||
if (d == 0) {
|
||||
measuredt.push(ArrayDatas[j].measuredt.substring(5, 10) + "-" + ArrayDatas[j].measuredt.substring(11, 13));
|
||||
}
|
||||
dataSeries.push(ArrayDatas[j].parmvalue);
|
||||
}
|
||||
sobj.data = dataSeries;
|
||||
series.push(sobj);
|
||||
}
|
||||
|
||||
//赋值 x轴 y轴 series
|
||||
optionBL.legend.data = legendName;
|
||||
optionBL.xAxis[0].data = measuredt;
|
||||
optionBL.yAxis = yaAxis;
|
||||
optionBL.series = series;
|
||||
//图标加载
|
||||
//console.log("option",optionBL);
|
||||
BLChart.setOption(optionBL);
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
/* 定时器 */
|
||||
setInterval(getValue, 300000); //<!--每隔5分钟刷新一次-->
|
||||
//setInterval(change, 60000); //每1分钟切换
|
||||
|
||||
/* 初始化 */
|
||||
$(function () {
|
||||
document.getElementById("modalDialog").style.height = 0.7 * document.documentElement.offsetHeight +"px";
|
||||
document.getElementById("modalDialog").style.width = 0.5 * document.documentElement.offsetWidth + "px";
|
||||
document.getElementById("barline").style.height = 0.97*$("#modalDialog").height() +"px";
|
||||
document.getElementById("barline").style.width = 0.97*$("#modalDialog").width()+ "px";
|
||||
// console.log("modalContentHeight",document.getElementById("modalDialog").offsetHeight);
|
||||
// console.log("modalContentWidth",document.getElementById("modalDialog").offsetWidth);
|
||||
// console.log("modalContentHeight2",$("#modalDialog").height());
|
||||
// console.log("modalContentWidth2",$("#modalDialog").width());
|
||||
getValue();
|
||||
//console.log("height",document.body.scrollHeight);
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
<div class="modal fade" id="subModal" style="width:100%;height:100%">
|
||||
<div id="modalDialog" class="modal-dialog" style="width:50%;height:70%">
|
||||
<div id="modalContent" class="modal-content" style="width:100%;height:100%">
|
||||
<div class="modal-body" style="background-color: #182F52;width:100%;height:100%;">
|
||||
<div id="barline" style="width:100%;height:100%;"></div>
|
||||
<script language="JavaScript">
|
||||
/* 构造图表 */
|
||||
var BLChart = echarts.init(document.getElementById('barline'));
|
||||
optionBL = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
label: {
|
||||
backgroundColor: '#283b56'
|
||||
}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '5%',
|
||||
right: '5%',
|
||||
bottom: '5%',
|
||||
top: '10%',
|
||||
},
|
||||
legend: {
|
||||
left: 'center',
|
||||
itemGap: 100,
|
||||
textStyle: {
|
||||
color: '#fff',
|
||||
fontSize: 20
|
||||
},
|
||||
//data: ['出水量', '1#压力', '2#压力']
|
||||
},
|
||||
dataZoom: {
|
||||
show: false,
|
||||
start: 0,
|
||||
end: 100
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#97C8E6',
|
||||
width: 2,
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
color: '#fff'
|
||||
},
|
||||
boundaryGap: true,
|
||||
//data: ['0:00', '1:00', '2:00', '3:00', '4:00', '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00']
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
show: false,
|
||||
boundaryGap: true,
|
||||
//data: ['0:00', '1:00', '2:00', '3:00', '4:00', '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00']
|
||||
}
|
||||
],
|
||||
yAxis: [],
|
||||
series: []
|
||||
};
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
Reference in New Issue
Block a user