Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/work/scadapic/processdesign.jsp
2026-01-16 14:13:44 +08:00

849 lines
34 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ 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"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page import="com.sipai.entity.base.ServerObject"%>
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
<%@page import="com.sipai.entity.work.ScadaPic_Txt"%>
<%@page import="com.sipai.entity.equipment.EquipmentCard"%>
<%@page import="java.util.Date" %>
<%@page import="java.text.SimpleDateFormat" %>
<%@ page import="com.sipai.tools.SessionManager"%>
<%
SessionManager sessionManager = new SessionManager();
%>
<% request.setAttribute("Flag_Txt", ScadaPic_Txt.Flag_Txt);%>
<% request.setAttribute("Flag_MPoint", ScadaPic_Txt.Flag_MPoint);%>
<% request.setAttribute("Flag_EM", ScadaPic_Txt.Flag_EM);%>
<% request.setAttribute("Flag_PS", ScadaPic_Txt.Flag_PS);%>
<%request.setAttribute("Status_Fault",EquipmentCard.Status_Fault);%>
<%request.setAttribute("Status_OFF",EquipmentCard.Status_OFF);%>
<%request.setAttribute("Status_ON",EquipmentCard.Status_ON);%>
<!DOCTYPE html>
<!-- <html lang="zh-CN"> -->
<!-- BEGIN HEAD -->
<head>
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<script type="text/javascript">
//删除文本
function deletetxt(obj){
var selectid = obj.parentNode.id;
$.post(ext.contextPath + "/work/scadaPic/deleteTxt.do", {id:selectid}, function(data) {
if(data==1){
showAlert('s','删除成功','mainAlertdiv');
$('#'+selectid).remove();
}else{
showAlert('d','删除失败','mainAlertdiv');
}
});
}
//删除工艺段
function deleteps(obj){
var selectid = obj.parentNode.parentNode.id;
$.post(ext.contextPath + "/work/scadaPic/deletePS.do", {id:selectid}, function(data) {
if(data==1){
showAlert('s','删除成功','mainAlertdiv');
$('#'+selectid).remove();
}else{
showAlert('d','删除失败','mainAlertdiv');
}
});
stopBubbleDefaultEvent();//阻止触发父元素点击事件
}
//删除测量点
//删除设备
function deleteem(obj){
var selectid = obj.parentNode.id;
$.post(ext.contextPath + "/work/scadaPic/deleteEM.do", {id:selectid}, function(data) {
if(data==1){
showAlert('s','删除成功','mainAlertdiv');
$('#'+selectid).remove();
}else{
showAlert('d','删除失败','mainAlertdiv');
}
});
}
//删除测量点
function deletemp(obj){
var selectid = obj.parentNode.id;
$.post(ext.contextPath + "/work/scadaPic/deleteMPoint.do", {id:selectid}, function(data) {
if(data==1){
showAlert('s','删除成功','mainAlertdiv');
$('#'+selectid).remove();
}else{
showAlert('d','删除失败','mainAlertdiv');
}
});
}
//为保存布局
function setdata() {
var contentdiv=$("#content");
var obj = document.getElementsByTagName("DIV");
for(var i=0;i<obj.length;i++){
//console.info(obj[i].className.indexOf("easyui-draggable"));
if(obj[i].className.indexOf("bootstrap-draggable")>=0){
console.info(contentdiv.width());
/* $.post(ext.contextPath + '/work/scadaPic/updateLayout.do', {type:obj[i].getAttribute("type"), id:obj[i].id , posx:obj[i].style.left , posy:obj[i].style.top,
containerWidth:obj[i].parentNode.style.width,containerHeight:obj[i].parentNode.style.height,
width:obj[i].style.width,height:obj[i].style.height}, function(data) {
if(data.res!=1){
//top.$.messager.alert('提示','更新失败','info');
showAlert('d','更新失败','mainAlertdiv');
}
},'json'); */
$.post(ext.contextPath + '/work/scadaPic/updateLayout.do', {type:obj[i].getAttribute("type"), id:obj[i].id , posx:obj[i].style.left , posy:obj[i].style.top,
containerWidth:contentdiv.width(),containerHeight:contentdiv.height(),
width:obj[i].style.width,height:obj[i].style.height}, function(data) {
if(data.res!=1){
//top.$.messager.alert('提示','更新失败','info');
showAlert('d','保存失败','mainAlertdiv');
}else{
showAlert('s','保存成功','mainAlertdiv');
}
},'json');
}
}
}
var processSectionId = "";
var addmp = function() {
var companyId =unitId;
var width= $("#content").width();
var height= $("#content").height();
var workshopid = processSectionId;
$.post(ext.contextPath + '/work/scadaPic/addMPoint.do', {containerwidth:width,containerheight:height,pid:workshopid} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
//ComponentsDateTimePickers.init();
});
};
var addequ = function() {
var width= $("#content").width();
var height= $("#content").height();
var workshopid = processSectionId;
var companyId =unitId;
$.post(ext.contextPath + '/work/scadaPic/addEM.do', {containerwidth:width,containerheight:height,pid:workshopid,companyId:unitId} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
//ComponentsDateTimePickers.init();
});
};
var addps = function() {
var width= $("#content").width();
var height= $("#content").height();
var workshopid = processSectionId;
var companyId =unitId;
//alert(companyId);
$.post(ext.contextPath + '/work/scadaPic/addPS.do', {containerwidth:width,containerheight:height,pid:workshopid,companyId:unitId} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
//ComponentsDateTimePickers.init();
});
};
var editps = function(obj) {
var width= $("#content").width();
var height= $("#content").height();
var workshopid = processSectionId;
var companyId =unitId;
//alert(companyId);
$.post(ext.contextPath + '/work/scadaPic/editPS.do', {id:obj,containerwidth:width,containerheight:height,pid:workshopid,companyId:unitId} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
//ComponentsDateTimePickers.init();
});
};
function addtext(){
var width= $("#content").width();
var height= $("#content").height();
var workshopid = processSectionId;
var companyId =unitId;
$.post(ext.contextPath + '/work/scadaPic/addTxt.do', {containerwidth:width,containerheight:height,pid:workshopid,companyId:unitId} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
//ComponentsDateTimePickers.init();
});
}
var contentdiv=$("#content");
var companyId= '';
$(function() {
//简易公司combotree
$.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
//当登陆者的pid以下没有子节点时显示单独一个span
$("#companyId").val(data[0].id);
$("#companyselect").hide();
$("#company").text("公司: " + data[0].text);
companyId = data[0].id;
refreshSelect();
//initFun();
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
//第一次加载时赋值
$("#companyId").val(data[0].id);
$("#cname_input").val(data[0].text);
companyId = data[0].id;
refreshSelect();
//initFun();
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
$('#companytree').treeview({
data: data,
showBorder: false,
levels: 3,
});
$('#companytree').on('nodeSelected', function (event, data) {
$("#companyId").val(data.id);
$("#cname_input").val(data.text);
document.getElementById('ul_tree').style.display = "none";
companyId= data.id;
refreshSelect();
//initFun();
});
} else {
//待完善
};
}, 'json');
//防止点击树的+号收起下拉框
$("#ul_tree").on("click", function (e) {
event.stopPropagation();
});
//点击空白隐藏树
$(document).click(function (e) {
var divTree = $('#ul_tree'); // 设置目标区域
if (!divTree.is(e.target) && divTree.has(e.target).length === 0) {
divTree.hide()
}
})
//window.onresize = changesize;
/* $.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function(data) {
console.log("data:"+data.length);
var companyId= '';
if(data.length == 1){
//选择厂区为一个厂时隐藏选择框
$("#search_code").css("display", "none");
$("#company").text(data[0].text);
companyId=data[0].id;
$("#companyId").val(companyId);
$.post(ext.contextPath + "/work/scadaPic/getlist4Combo.do", {companyId:unitId}, function(data) {
$("#processSection").empty();
processSectionId="";
//dosearch();
var selelct_ =$("#processSection").select2({
data: data,
cache : false,
placeholder:'请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
selelct_.val('').trigger("change");
selelct_.on("change",function(e){
dosearch();
});
},'json');
}else{
$("#company").css("display", "none");
var selelct=$("#search_code").select2({
data : data ,
placeholder:'请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
selelct.val('').trigger("change");
refreshSelect();
selelct.on("change",function(e){
companyId= $(this).val();
$("#companyId").val(companyId);
refreshSelect();
$.post(ext.contextPath + "/work/scadaPic/getlist4Combo.do", {companyId:unitId}, function(data) {
$("#processSection").empty();
processSectionId="";
dosearch();
//alert(processSectionId);
var selelct_ =$("#processSection").select2({
data: data,
cache : false,
placeholder:'请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
selelct_.val('').trigger("change");
selelct_.on("change",function(e){
dosearch();
});
},'json');
});
}
},'json');
*/
});
var refreshSelect = function() {
/* var selelct_ =$("#processSection").select2({
data: null,
placeholder:'请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
});
$("#processSection").empty();
// $("#table").bootstrapTable('refresh', {data:null});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'}) */
$.post(ext.contextPath + "/work/scadaPic/getlist4Combo.do", {companyId:unitId}, function(data) {
processSectionId="";
$("#processSection").empty();
var selelct_ =$("#processSection").select2({
data: data,
placeholder:'请选择',//默认文字提示
allowClear: false,//允许清空
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
selelct_.val('${ScadaPic.processsectionid}').trigger("change");
selelct_.on("change",function(e){
dosearch();
});
},'json');
};
function dosearch(){
/* companyId = $("#search_code").select2().val();
alert(companyId) */
companyId = unitId;
var contentdiv=$("#content");
$.post(ext.contextPath + "/work/scadaPic/getlist4Combo.do", {companyId:unitId}, function(data) {
processSectionId = $("#processSection option:checked").val();
var res= JSON.parse(data);
//console.info(processSectionId);
//console.info(res.length);
if(res.length==0){
processSectionId='';
$("#img").attr("src","");
showMPoint();
showEM();
showPS();
showTxt();
}else{
for (var i=0;i< res.length;i++) {
//processSectionId = res[i].id;
if (res[i].id == processSectionId) {
$("#img").attr("src",ext.serverPath + res[i].picpath);
showMPoint();
showEM();
showPS();
showTxt();
}
}
}
});
};
function showPS(){
var workshopid = processSectionId;
$.post(ext.contextPath + "/work/scadaPic/getPSList.do", {companyId:unitId,pid:workshopid}, function(data) {
clearItem("${Flag_PS}");
if (data.length>0) {
for(i=0 ;i<data.length;i++){
var item= data[i];
// console.log(item);
containerWidth = $("#content").width();
containerHeight = $("#content").height();
var picurl = ext.contextPath+item.picurl;
var value='';
//console.info('222'+item.processSectionName);
if(item.processSection!=null){
value=item.processSection.name;
}
var left=containerWidth*item.posx/item.containerwidth;
var top=containerHeight*item.posy/item.containerheight;
var w=containerWidth*item.width/item.containerwidth;
var h=containerHeight*item.height/item.containerheight;
var son= '<div contentEditable="true" class="bootstrap-draggable " style="border:1px solid yellow;width:'+w+'px;height:'+h+'px;position:absolute;top:'+top+'px;left:'+left+'px;" id="'+item.id+'" type="${Flag_PS}" processSectionId='+item.processSectionid+'>'+
// '<span style="font-weight:bold">'+value+'</span>'+
//'<img src="'+picurl+'" width="100%"></img>'+
'<div style="float:left;width:100%;height:15px;"><a type="button" onclick="deleteps(this)" title="删除"><i class="fa fa-close"></i></a></div>'+
'<div style="float:left;width:100%;height:15px;color:yellow;"><span >'+item.processSection.name+'</span></div>'+
'</div>';
//console.info(son)
$("#content").append(son);
/* $('#'+item.id).bind('contextmenu',function(e){
selectid=this.id;
e.preventDefault();
$('#mEM').menu('show', {
left: e.pageX,
top: e.pageY
});
}); */
//$('#'+item.id).draggable()
//$('#'+item.id).resizable()
$('#'+item.id).draggable();
//$('#'+item.id).resizable({ alsoResize: '.other' });
$('#'+item.id).click(function(){
//alert(this.id);
editps(this.id);
});
}
}
},'json');
};
function showEM(){
var workshopid = processSectionId;
$.post(ext.contextPath + "/work/scadaPic/getEMList.do", {pid:workshopid}, function(data) {
//console.info(data);
clearItem("${Flag_EM}");
if (data.length>0) {
for(i=0 ;i<data.length;i++){
var item= data[i];
containerWidth = $("#content").width();
containerHeight = $("#content").height();
var left=containerWidth*item.posx/item.containerwidth;
var top=containerHeight*item.posy/item.containerheight;
var w=containerWidth*item.width/item.containerwidth;
var h=containerHeight*item.height/item.containerheight;
var son= '<div contentEditable="true" class="bootstrap-draggable bootstrap-resizable" style="border:1px solid yellow;width:'+w+'px;height:'+h+'px;position:absolute;top:'+top+'px;left:'+left+'px;" id="'+item.id+'" type="${Flag_EM}" equipid='+item.equipid+'>'+
'<span style="color:white;font-size:'+item.fsize+'">'+
item.txt+
'</span><span style="color:white;font-size:'+item.fsize+'">'+
''+
'</span>'+
'<a type="button" onclick="deleteem(this)" title="删除"><i class="fa fa-close"></i></a>'+
'</div>';
//console.info(son)
$("#content").append(son);
/* $('#'+item.id).bind('contextmenu',function(e){
selectid=this.id;
e.preventDefault();
$('#mEM').menu('show', {
left: e.pageX,
top: e.pageY
});
}); */
//$('#'+item.id).draggable()
//$('#'+item.id).resizable()
$('#'+item.id).resizable();
$('#'+item.id).draggable();
//$('#'+item.id).resizable({ alsoResize: '.other' });
/* $('#'+item.id).click(function(){
//console.info(this)
showEMInfo(this.getAttribute("equipid"));
//console.info(this)
}); */
}
}
},'json');
};
function showEMInfo(str){
$.post(ext.contextPath + "/equipment/getEquipmentCardInfo.do", {id:str}, function(data) {
//console.info(data)
var sons;
if (data !=null) {
sons= '<div id ="equipInfo" style="border:1px solid yellow;background-color:black;position:absolute;width: 180px;height:200px;top:0px;left:0px">'+
'<table id="info" style="font-size:12px" >'+
'<tr align="left">'+
'<td ><span style="color:white;">设备名称:'+data.equipmentname+'</span></td>'+
'</tr>'+
'<tr align="left">'+
'<td ><span style="color:white;">状态:'+getEquStatus(data.equipmentstatus)+'</span></td>'+
'</tr>'+
'<tr align="left">'+
'<td ><span style="color:white;">排产情况:</span></td>'+
'</tr>'+
'<tr align="left">'+
'<td ><span style="color:white;">'+
getInfoFromArrangement(data.equipmentArrangements)+
'</span></td>'+
'</tr>'+
'</table>'+
'<div id ="arrangeInfo" >'+
'</div>'+
'</div>';
}
//console.info(sons)
//if(!$("#equipInfo")){
$("#equipInfo").remove();
//}
contentdiv.append(sons);
//showArrangeGrid(data.id,"2017-10-13");
},'json');
};
function getEquStatus(statuscode){
switch(statuscode){
case '${Status_Fault}':
return '故障';
break;
case '${Status_OFF}':
return '停机';
break;
case '${Status_ON}':
return '运行中';
break;
}
}
function getInfoFromArrangement(arrangement){
var str ="";
var workorderno="";
$.each(arrangement, function(index, item){
//console.log(item);
if(str !=""){
str+="<br />";
}
if(workorderno!=item._workorderno){
workorderno=item._workorderno;
str=str+"工单:"+workorderno+"<br />";
}
if(item.checkFlag){
str+= item.gt_name+": "+ item.stdt.substring(11,16)+" ~ "+item.enddt.substring(11,16);
}
});
//alert(JSON.stringify(arrangement))
//alert(str)
//console.info(arrangement)
return str;
}
function showTxt(){
var workshopid = processSectionId;
$.post(ext.contextPath + "/work/scadaPic/getTxtList.do", {pid:workshopid}, function(data) {
clearItem("${Flag_Txt}");
if (data.length>0) {
for(i=0 ;i<data.length;i++){
var item= data[i];
containerWidth = $("#content").width();
containerHeight = $("#content").height();
console.log("宽:"+containerWidth)
console.log("高:"+containerHeight)
var left=containerWidth*item.posx/item.containerwidth;
var top=containerHeight*item.posy/item.containerheight;
var son= '<div contentEditable="true" class="bootstrap-draggable" style="background-color:green;width:100px;height:20px;position:absolute;top:'+top+'px;left:'+left+'px;" id="'+item.id+'" type="${Flag_Txt}">'+
'<span style="color:white;font-size:'+item.fsize+'">'+
item.content+
'</span>'+
'<a type="button" onclick="deletetxt(this)" title="删除"><i class="fa fa-close"></i></a>'+
'</div>';
var contentdiv=$("#content");
console.info(contentdiv);
console.info("-----------------------");
console.info(contentdiv.html());
console.info("111111111111111111");
console.info("showTxt:"+son);
//document.getElementById("content").appendChild(son);
$("#content").append(son);
console.info(contentdiv.html());
$('#'+item.id).draggable();
//$('#'+item.id).resizable({ alsoResize: '.other' });
/* $('#'+item.id).click(function(){
//console.info(this)
showEMInfo(this.getAttribute("equipid"));
//console.info(this)
}); */
}
}
},'json');
};
var MpPics;
function showMPoint(){
var workshopid = processSectionId;
var companyId =unitId;
$.post(ext.contextPath + "/work/scadaPic/getMPointList.do", {companyId:unitId,pid:workshopid}, function(data) {
//console.info(data)
clearItem("${Flag_MPoint}");
if (data.length>0) {
for(i=0 ;i<data.length;i++){
var item= data[i];
containerWidth = $("#content").width();
containerHeight = $("#content").height();
//console.log((containerWidth))
var left=containerWidth*item.posx/item.containerwidth;
var top=containerHeight*item.posy/item.containerheight;
var son="";
//console.log((item.mPoint))
if(item.expressionflag!=null && item.expressionflag &&item.expressionflag!=""){
var path;
if(item.mPoint==null || item.mPoint.exp ==null || item.mPoint.exp==""){
path="";
}else{
path= MpPics[parseInt(item.mPoint.exp)].path;
}
son= '<div contentEditable="true" class="bootstrap-draggable" style="width:40px;height:40px;position:absolute;top:'+top+'px;left:'+left+'px;" id="'+item.id+'" type="${Flag_MPoint}">'+
'<img src=../../'+path+' style="width:20px;height:20px;" ></img>'+
'<a type="button" onclick="deletemp(this)" title="删除"><i class="fa fa-close"></i></a>'+
'</div>';
}else{
var value ="";
if(item.mPoint!=null){
value=item.mPoint.parmvalue
}
son= '<div contentEditable="true" class="bootstrap-draggable" style="cursor:pointer;background-color:blue;width:150px;height:40px;position:absolute;top:'+top+'px;left:'+left+'px;" id="'+item.id+'" type="${Flag_MPoint}">'+
'<span style="color:white;font-size:'+item.fsize+'">'+
item.txt+
'</span><span style="color:#00ff00;font-size:'+item.fsize+'">'+
value+
'</span>'+
'<a type="button" onclick="deletemp(this)" title="删除"><i class="fa fa-close"></i></a>'+
'</div>';
}
//console.info(son);
$("#content").append(son);
/* $('#'+item.id).bind('contextmenu',function(e){
selectid=this.id;
e.preventDefault();
$('#mPoint').menu('show', {
left: e.pageX,
top: e.pageY
});
}); */
$('#'+item.id).draggable()
}
}
},'json');
}
//清除原先点
function clearItem(type) {
var obj = document.getElementsByTagName("DIV");
//循环逆序删除
for(var i=obj.length-1;i>0;i--){
//console.info(obj[i].className.indexOf("easyui-draggable"));
//console.info(obj[i].getAttribute("type"));
if(obj[i].className.indexOf("bootstrap-draggable")>=0 && obj[i].getAttribute("type")==type){
//console.info(obj[i]);
obj[i].remove();
}
}
//console.log(obj.length)
}
var firstOnResizeFire = true;//谷歌浏览器onresize事件会执行2次这里加个标志位控制
var containerWidth = 0;
var containerHeight = 0;
var selectid=""; //记录右键时,指向的对象
function changesize(){
alert();
if (firstOnResizeFire) {
firstOnResizeFire = false;
adjuest();
//0.5秒之后将标志位重置Chrome的window.onresize默认执行两次
setTimeout(function() {
firstOnResizeFire = true;
}, 500);
}
}
function adjuest(){
var obj = $("#content").find("div");
var width =document.body.clientWidth;//onresize方法测试时只有body的clientwidth是改变后的值
var height =document.body.clientHeight// $("#content").height();
for(var i=0;i<obj.length;i++){
if(obj[i].className.indexOf("bootstrap-draggable")>=0){
var jobj=$("#"+obj[i].id);
//console.info("新对象",jobj.position().left);
var left=width*jobj.position().left/containerWidth;
var top=height*jobj.position().top/containerHeight;
//console.info("新左距离",left);
jobj.css("left",left);
jobj.css("top",top);
//console.info("文本的左距离",jobj.position().left);
//console.info("容器的宽度",width);
//console.info("body的宽度",);
}
if(obj[i].className.indexOf("bootstrap-resizable")>=0){
var jobj=$("#"+obj[i].id);
//console.info("新对象",jobj.width());
var w=width*jobj.width()/containerWidth;
var h=height*jobj.height()/containerHeight;
//console.info("新左距离",left);
jobj.css("width",w);
jobj.css("height",h);
//console.info("文本的左距离",jobj.position().left);
//console.info("容器的宽度",width);
//console.info("body的宽度",);
}
}
//
containerWidth =width;
containerHeight=height;
}
</script>
</head>
<body onload="initMenu()"
class="hold-transition ${cu.themeclass} sidebar-mini">
<div class="wrapper">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="head_title"></h1>
<ol class="breadcrumb">
<li><a id='head_firstlevel' href="#"><i
class="fa fa-dashboard"></i> </a></li>
<!-- <li class="active">Here</li> -->
</ol>
</section>
<!-- Main content -->
<section class="content container-fluid">
<div id="mainAlertdiv"></div>
<div id="subDiv"></div>
<div id="mpSubDiv"></div>
<div id="expSubDiv"></div>
<div id="emSubDiv"></div>
<div id="psSubDiv"></div>
<div id="menu4SelectDiv"></div>
<div>
<div class="btn-group" style="padding-bottom:10px;">
<button type="button" class="btn btn-default btn-sm" onclick="addps();"><i class="fa fa-plus"></i> 工艺段</button>
<button type="button" class="btn btn-default btn-sm" onclick="addmp();"><i class="fa fa-plus"></i> 测量点</button>
<button type="button" class="btn btn-default btn-sm" onclick="addequ();"><i class="fa fa-plus"></i> 设备</button>
<button type="button" class="btn btn-default btn-sm" onclick="addtext();"><i class="fa fa-plus"></i> 文本</button>
<button type="button" class="btn btn-default btn-sm" onclick="setdata();"><i class="fa fa-save"></i> 保存布局</button>
</div>
<div class="form-group form-inline" style="padding:0;">
<div class="form-group form-inline">
<!-- <div class="form-group form-inline">
<div class="form-group ">
<input id="companyId" name="companyId" type="hidden" />
<span id="company" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
</div>
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
<li class="dropdown" style="width:300px;">
Menu toggle button
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
style="width:300px;" onclick="document.getElementById('ul_tree').style.display = 'block';">
<div class="input-group">
<span class="input-group-addon"
style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
<input class="form-control " id="cname_input" name="cname_input"
style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
readonly />
</div>/input-group
</a>
<ul id="ul_tree" class="dropdown-menu" data-stopPropagation="true">
<li class="header">
<div id="companytree" style="width: 275px;overflow:auto;"></div>
</li>
</ul>
</li>
</ul>
</div> -->
<!-- <div class="form-group form-inline" style="padding:0;"></div> -->
<div class="form-group form-inline" >
<div class="form-group pull-right" style="margin-top:8px;">
<label class="form-label">底图</label>
<select class="form-control select2 " id="processSection" name ="processSection" style="width: 220px;"></select>
</div>
</div>
</div>
<!-- <div class="form-group pull-right" >
<div class="input-group input-group-sm" style="width: 250px;">
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="名称">
<div class="input-group-btn">
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
</div>
</div>
</div> -->
</div>
<div class="col-lg-12 col-xs-12" style="text-align: center;padding:0px" id="content">
<img alt="" src="" width="100%" id="img">
</div>
<!-- <div id="mTxt" class="easyui-menu" data-options="onClick:txtMenuHandler" style="width:120px;">
<div data-options="name:'delete',iconCls:'icon-remove'">删除</div>
<div data-options="name:'help',iconCls:'icon-help'">属性</div>
</div>
<div id="mPoint" class="easyui-menu" data-options="onClick:mPointMenuHandler" style="width:120px;">
<div data-options="name:'delete',iconCls:'icon-remove'">删除</div>
<div data-options="name:'help',iconCls:'icon-help'">属性</div>
</div>
<div id="mEM" class="easyui-menu" data-options="onClick:mEMMenuHandler" style="width:120px;">
<div data-options="name:'delete',iconCls:'icon-remove'">删除</div>
<div data-options="name:'help',iconCls:'icon-help'">属性</div>
</div> -->
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
<!-- echarts-->
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/echarts.js" charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/macarons.js" charset="utf-8"></script>
<!-- 引入daterangepicker-->
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js" charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js" charset="utf-8"></script>
</html>