first commit
This commit is contained in:
441
WebRoot/jsp/work/scadapic/picdesignsubpic.jsp
Normal file
441
WebRoot/jsp/work/scadapic/picdesignsubpic.jsp
Normal file
@ -0,0 +1,441 @@
|
||||
<%@page contentType="text/html"%>
|
||||
<%@page pageEncoding="UTF-8"%>
|
||||
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%>
|
||||
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta http-equiv="pragma" content="no-cache">
|
||||
<meta http-equiv="cache-control" content="no-cache,must-revalidate">
|
||||
<meta http-equiv="expires" content="0">
|
||||
<link rel="StyleSheet" href="CSS/comm2.css" type="text/css" />
|
||||
<script type="text/javascript" src="JS/comm.js"></script>
|
||||
</head>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function searchSelect(o){
|
||||
//alert(unitid.value);
|
||||
window.location="UnitPointAction.do?method=detail&picid="+o+"&bizid=${bizid}";
|
||||
}
|
||||
|
||||
var gmpi=0;
|
||||
var mpxmlhttp;
|
||||
|
||||
function updateall(){
|
||||
gmpi=0;
|
||||
getdata();
|
||||
//getequdata();
|
||||
}
|
||||
|
||||
function getdata() {
|
||||
var obj = document.getElementsByTagName("DIV");
|
||||
for(var i=gmpi;i<obj.length;i++){
|
||||
gmpi=gmpi+1;
|
||||
if(obj[i].className=="mpdiv"){
|
||||
mpxmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
var cobj= document.getElementById(obj[i].name);
|
||||
mpxmlhttp.open("POST",encodeURI(encodeURI("UnitPointAction.do?method=updatevalue&id="+obj[i].name)),true);
|
||||
mpxmlhttp.setrequestheader("content-length", 0);
|
||||
mpxmlhttp.setrequestheader("content-type", "application/x-www-form-urlencoded");
|
||||
mpxmlhttp.send(true);
|
||||
mpxmlhttp.onreadystatechange = function(){
|
||||
nextmp(cobj);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if(obj[i].className=="sybdiv"){
|
||||
mpxmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
var cobj= document.getElementById(obj[i].name);
|
||||
mpxmlhttp.open("POST",encodeURI(encodeURI("UnitPointAction.do?method=updatesybvalue&id="+obj[i].name)),true);
|
||||
mpxmlhttp.setrequestheader("content-length", 0);
|
||||
mpxmlhttp.setrequestheader("content-type", "application/x-www-form-urlencoded");
|
||||
mpxmlhttp.send(true);
|
||||
mpxmlhttp.onreadystatechange = function(){
|
||||
nextsyb(cobj);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if(obj[i].className=="equdiv"){
|
||||
mpxmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
var cobj= document.getElementById(obj[i].name);
|
||||
var dobj = obj[i];
|
||||
mpxmlhttp.open("POST",encodeURI(encodeURI("UnitPointAction.do?method=updateequvalue&equid="+obj[i].name.Trim())),true);
|
||||
mpxmlhttp.setrequestheader("content-length", 0);
|
||||
mpxmlhttp.setrequestheader("content-type", "application/x-www-form-urlencoded");
|
||||
mpxmlhttp.send(true);
|
||||
mpxmlhttp.onreadystatechange = function(){
|
||||
nextequ(cobj,dobj);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
function nextmp(cobj){
|
||||
if(mpxmlhttp.readyState==4){
|
||||
if(mpxmlhttp.status==200){
|
||||
var res = mpxmlhttp.responseText;
|
||||
if(cobj){
|
||||
cobj.innerHTML=res;
|
||||
}
|
||||
getdata();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function nextsyb(cobj){
|
||||
if(mpxmlhttp.readyState==4){
|
||||
if(mpxmlhttp.status==200){
|
||||
var res = mpxmlhttp.responseText;
|
||||
if(cobj){
|
||||
//alert(res);
|
||||
cobj.innerHTML=res;
|
||||
}
|
||||
getdata();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function nextequ(cobj,dobj){
|
||||
if(mpxmlhttp.readyState==4){
|
||||
if(mpxmlhttp.status==200){
|
||||
var res = mpxmlhttp.responseText;
|
||||
if(cobj){
|
||||
res = res.split("$");
|
||||
cobj.innerHTML=res[0];
|
||||
if(res[1]){
|
||||
|
||||
cobj.parentElement.nextSibling.firstChild.innerText=res[1];
|
||||
dobj.firstChild.style.backgroundColor="#FFFF00"
|
||||
}else{
|
||||
cobj.parentElement.nextSibling.firstChild.innerText="";
|
||||
dobj.firstChild.style.backgroundColor="#c5c5c5";
|
||||
}
|
||||
}
|
||||
getdata();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function hisview(o){
|
||||
window.open(encodeURI(encodeURI("UnitPointAction.do?method=hisview&mpid="+o)),"_blank");
|
||||
}
|
||||
|
||||
function goUpdateRecord(equipmentCardID){
|
||||
equipmentCardForm.elements['equipmentCardID'].value=equipmentCardID;
|
||||
|
||||
equipmentCardForm.submit();
|
||||
}
|
||||
var move = false;
|
||||
var ox, oy;
|
||||
|
||||
function settop(obj) {
|
||||
var obj = document.getElementsByTagName("DIV");
|
||||
for(var i=0;i<obj.length;i++){
|
||||
if(obj[i].className=="mpdiv"&&obj[i].style.zIndex>9){
|
||||
document.all[i].style.zIndex = 9;
|
||||
}
|
||||
}
|
||||
while(obj.parentElement){
|
||||
if(obj.parentElement.className=="mpdiv"){
|
||||
obj=obj.parentElement;
|
||||
break;
|
||||
}else{
|
||||
obj=obj.parentElement;
|
||||
}
|
||||
}
|
||||
if(obj.className=="mpdiv"){
|
||||
obj.style.zIndex = 10;
|
||||
}
|
||||
}
|
||||
function StartDrag(obj) {
|
||||
settop(event.srcElement);
|
||||
obj.setCapture();
|
||||
move = true;
|
||||
ox = event.clientX;
|
||||
oy = event.clientY;
|
||||
}
|
||||
|
||||
function Drag(obj) {
|
||||
if (move) {
|
||||
var oldwin =event.srcElement;
|
||||
while(oldwin.parentElement){
|
||||
if(oldwin.parentElement.className=="mpdiv" || oldwin.parentElement.className=="equdiv"){
|
||||
oldwin=oldwin.parentElement;
|
||||
break;
|
||||
}else{
|
||||
oldwin=oldwin.parentElement;
|
||||
}
|
||||
}
|
||||
if(oldwin.className=="mpdiv" || oldwin.className=="equdiv"){
|
||||
oldwin.style.left = event.clientX - ox + parseInt(oldwin.style.left);
|
||||
if(parseInt(oldwin.style.left)<0){
|
||||
oldwin.style.left=0;
|
||||
}
|
||||
oldwin.style.top = event.clientY - oy + parseInt(oldwin.style.top);
|
||||
if(parseInt(oldwin.style.top)<0){
|
||||
oldwin.style.top=0;
|
||||
}
|
||||
ox = event.clientX;
|
||||
oy = event.clientY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function StopDrag(obj) {
|
||||
obj.releaseCapture();
|
||||
move = false;
|
||||
}
|
||||
|
||||
function $(Id) {
|
||||
return document.getElementById(Id);
|
||||
}
|
||||
|
||||
function refresh(o){
|
||||
setInterval("updateall()",o);
|
||||
}
|
||||
|
||||
setInterval("updateall()",30000);
|
||||
|
||||
function mpvlist(){
|
||||
window.location="measurepointaction.do?method=datainputprepare&bizid=${bizid}";
|
||||
}
|
||||
|
||||
|
||||
function addequalarm(){
|
||||
window.location="alarmaction.do?method=doequnew&bizid=${bizid}&equid="+gdobj.name;
|
||||
}
|
||||
function addequalstatus(){
|
||||
window.location="equstatusaction.do?method=donew&bizid=${bizid}&equid="+gdobj.name;
|
||||
}
|
||||
|
||||
var oPopup = window.createPopup();
|
||||
var gdobj;
|
||||
function contxtmenuequ(){
|
||||
//alert(event.srcElement.innerHTML);
|
||||
gdobj=event.srcElement;
|
||||
while(gdobj.parentElement){
|
||||
if(gdobj.parentElement.className=="equdiv"){
|
||||
gdobj=gdobj.parentElement;
|
||||
break;
|
||||
}else{
|
||||
gdobj=gdobj.parentElement;
|
||||
}
|
||||
}
|
||||
oPopup.document.body.innerHTML=""
|
||||
+"<table cellpadding='1' cellspacing='1' border='1' bgcolor='#c5c5c5' width='100%' style='font-size:12px;'><tbody>"
|
||||
+"<tr style='cursor:pointer;'><td valign='middle' height='20' onclick='parent.addequalarm();'>添加故障信息</td></tr>"
|
||||
+"<tr style='cursor:pointer;'><td valign='middle' height='20' onclick='parent.addequalstatus();'>更改设备状态</td></tr></tbaody><table>";
|
||||
oPopup.show(event.x, event.y, 90, 48,document.body);
|
||||
//alert(oPopup.document.body.innerHTML);
|
||||
}
|
||||
function mpedit(){
|
||||
window.open("measurepointaction.do?method=doedit&id="+gdobj.name);
|
||||
}
|
||||
function contxtmenump(){
|
||||
//alert(event.srcElement.innerHTML);
|
||||
gdobj=event.srcElement;
|
||||
|
||||
oPopup.document.body.innerHTML=""
|
||||
+"<table cellpadding='1' cellspacing='1' border='1' bgcolor='#c5c5c5' width='100%' style='font-size:12px;'><tbody>"
|
||||
+"<tr style='cursor:pointer;'><td valign='middle' height='20' onclick='parent.mpedit();'>测量点设置</td></tr></tbaody><table>";
|
||||
oPopup.show(event.x, event.y, 90, 24,document.body);
|
||||
//alert(oPopup.document.body.innerHTML);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<body onload="updateall();">
|
||||
<img src="${cp.picurl}" width="1020" height="688" border="0">
|
||||
|
||||
<div
|
||||
|
||||
id="<c:out value="${cp.picurl}" />">
|
||||
<br>
|
||||
<c:forEach items="${mplist}" var="cmp">
|
||||
<div
|
||||
style="font-size:12px;z-index:9;position:absolute;top:${cmp.posy};left:${cmp.posx};"
|
||||
class="mpdiv" id="${cmp.id}" name="${cmp.mpid}"
|
||||
>
|
||||
<c:if test="${empty cmp._icon}">
|
||||
<table bgcolor="#c5c5c5" width="70" style="font-size: 12px;"
|
||||
title="${cmp.name}" onmousemove="Drag(this);" onmousedown="StartDrag(this);"
|
||||
onmouseup="StopDrag(this);"
|
||||
onmouseover="this.style.cursor='pointer';" >
|
||||
<tr align="center" bgcolor="#888888" >
|
||||
<td colspan="2" name="${cmp.mpid}">
|
||||
${cmp.name }
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#000000" style="color: #00FF00" align="center"
|
||||
ID="<c:out value="${cmp.mpid}" />" ondblclick="hisview('${cmp.mpid }');">
|
||||
${cmp.cvalue }
|
||||
</td>
|
||||
<td >
|
||||
|
||||
<c:out value="${cmp.unit}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</c:if>
|
||||
<c:if test="${not empty cmp._icon}">
|
||||
<div id="${cmp.mpid}" >
|
||||
<img ondblclick="hisview('${cmp.mpid }');" name="${cmp.mpid}" src="${cmp._icon}" oncontextmenu="contxtmenump('${cmp.mpid}');return false;">
|
||||
</div>
|
||||
|
||||
</c:if>
|
||||
</div>
|
||||
</c:forEach>
|
||||
|
||||
<c:forEach items="${syblist}" var="csyb">
|
||||
<div
|
||||
style="font-size:12px;z-index:9;position:absolute;top:${csyb.posy};left:${csyb.posx};"
|
||||
class="sybdiv"
|
||||
name="${csyb.id}">
|
||||
<c:if test="${empty csyb._icon}">
|
||||
<table bgcolor="#c5c5c5" width="70" style="font-size:12px"
|
||||
title="${csyb.title}" onmousemove="Drag(this);" onmousedown="StartDrag(this);"
|
||||
onmouseup="StopDrag(this);"
|
||||
onmouseover="this.style.cursor='pointer';">
|
||||
<tr align="center" bgcolor="#888888">
|
||||
<td colspan="2">
|
||||
<c:out value="${csyb.title}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#000000" style="color: #00FF00" align="center"
|
||||
ID="<c:out value="${csyb.id}" />">
|
||||
<c:out value="${csyb.cvalue}" />
|
||||
</td>
|
||||
<td width="30%">
|
||||
<c:out value="${csyb.unit}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</c:if>
|
||||
<c:if test="${not empty csyb._icon}">
|
||||
<div id="${csyb.id}" onmouseover="this.style.cursor='pointer';">
|
||||
<img src="${csyb._icon}">
|
||||
</div>
|
||||
|
||||
</c:if>
|
||||
</div>
|
||||
</c:forEach>
|
||||
|
||||
|
||||
<c:forEach items="${equlist}" var="cmp">
|
||||
<div
|
||||
style="background-image: url('${cmp.logo}');font-size:12px;z-index:9;position:absolute;top:${cmp.posy};left:${cmp.posx};height:100px;background-repeat:no-repeat;"
|
||||
class="equdiv" id="${cmp.id}" name="${cmp.equid}"
|
||||
>
|
||||
<table <c:if test="${cmp._status!='unuseable'}">bgcolor="#c5c5c5"</c:if><c:if test="${cmp._status=='unuseable'}">bgcolor="#ffff00"</c:if> width="100" style="font-size: 12px"
|
||||
title="${cmp.name}"
|
||||
onmousemove="Drag(this);" onmousedown="StartDrag(this);"
|
||||
onmouseup="StopDrag(this);"
|
||||
onmouseover="this.style.cursor='pointer';"
|
||||
>
|
||||
<tr align="center" bgcolor="#888888" >
|
||||
<td colspan="2" ondblclick="goUpdateRecord('${cmp.equid}');" oncontextmenu="contxtmenuequ('${cmp.equid}');return false;">
|
||||
${cmp.name }
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" bgcolor="#000000" style="color: #00FF00"
|
||||
align="center" ID="<c:out value="${cmp.equid}" />">
|
||||
|
||||
<br>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<c:if test="${cmp._status=='unuseable'}">
|
||||
${cmp._memo }
|
||||
</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
|
||||
<html:form action="equipmentCard.do?method=equipmentCardOperation"
|
||||
target="_blank">
|
||||
|
||||
<html:hidden property="equipmentCardID" />
|
||||
<html:hidden property="choice" value="goUpdateRecord" />
|
||||
</html:form>
|
||||
|
||||
<br>
|
||||
<table cellpadding="0" CELLSPACING="0" width="1000"
|
||||
class="toolbartable">
|
||||
<tr class="toolbartableline1">
|
||||
<td width="20"></td>
|
||||
<td width="70px" style="vertical-align: middle" align="center"
|
||||
onmouseover="this.className='over';"
|
||||
onmouseout="this.className='';" onclick="addmp();">
|
||||
<img alt="" src="IMG/button/new.gif" style="vertical-align: middle">
|
||||
测量点
|
||||
</td>
|
||||
<td width="56px" style="vertical-align: middle" align="center"
|
||||
onmouseover="this.className='over';"
|
||||
onmouseout="this.className='';" onclick="addequ();">
|
||||
<img alt="" src="IMG/button/new.gif" style="vertical-align: middle">
|
||||
设备
|
||||
</td>
|
||||
<td width="56px" style="vertical-align: middle" align="center"
|
||||
onmouseover="this.className='over';"
|
||||
onmouseout="this.className='';" onclick="addsyb();">
|
||||
<img alt="" src="IMG/button/new.gif" style="vertical-align: middle">
|
||||
标识
|
||||
</td>
|
||||
<td width="56px" style="vertical-align: middle" align="center"
|
||||
onmouseover="this.className='over';"
|
||||
onmouseout="this.className='';" onclick="syncall();">
|
||||
<img alt="" src="IMG/button/new.gif" style="vertical-align: middle">
|
||||
同步
|
||||
</td>
|
||||
<td width="80px" style="vertical-align: middle" align="center"
|
||||
onmouseover="this.className='over';"
|
||||
onmouseout="this.className='';" onclick="setdata();">
|
||||
<img alt="" src="IMG/button/save.gif"
|
||||
style="vertical-align: middle">
|
||||
保存布局
|
||||
</td>
|
||||
<td width="56px" style="vertical-align: middle" align="center"
|
||||
onmouseover="this.className='over';"
|
||||
onmouseout="this.className='';" onclick="mpcopy();">
|
||||
<img alt="" src="IMG/button/new.gif" style="vertical-align: middle">
|
||||
复制
|
||||
</td>
|
||||
<td>
|
||||
<select name='frompicid' id="frompicid" >
|
||||
<c:forEach items="${scadapiclist}" var="current">
|
||||
<c:if test="${current.id==cp.id}">
|
||||
<option value="<c:out value="${current.id}"/>" selected>
|
||||
<c:out value="${current.name }" />
|
||||
</option>
|
||||
</c:if>
|
||||
<c:if test="${current.id!=cp.id}">
|
||||
<option value="<c:out value="${current.id}"/>" >
|
||||
<c:out value="${current.name }" />
|
||||
</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</td>
|
||||
<td style="vertical-align: middle">
|
||||
<div id="result">
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user