天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

395 lines
18 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMasterNew.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.ProductPetrospect.MainOperationReviewModel>" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<input id="ids" style="display: none">
<input id="types" style="display: none">
<!--刷新-->
<meta http-equiv="refresh" content="300">
<!--图表配置-->
<%=QMAPP.FJC.Web.Controllers.MainOperationReviewController.QMEChartPageConfig()%>
<%--异步获取数据生成图表--%>
<div id="zhusu" style="width:100%;"><%=QMFrameWork.WebUI.QMEChart.QMEChartHelper.CreateEchart("echartID1", "/MainOperationReview/GetEchartDataGroup1", new string[] { "line", "bar" }
, "myEChart",350, QMFrameWork.WebUI.QMEChart.QMEChartHelper.echartEventEnum.click, "1")%></div>
<div id="yimen">
<div id="yibiao" style="width:50%; float:left"><%=QMFrameWork.WebUI.QMEChart.QMEChartHelper.CreateEchart("echartID2", "/MainOperationReview/GetEchartDataGroup2", new string[] { "line", "bar" }
, "myEChart",370, QMFrameWork.WebUI.QMEChart.QMEChartHelper.echartEventEnum.click, "")%></div>
<div id="menban" style="width:50%; float:right"><%=QMFrameWork.WebUI.QMEChart.QMEChartHelper.CreateEchart("echartID3", "/MainOperationReview/GetEchartDataGroup3", new string[] { "line", "bar" }
, "myEChart",370, QMFrameWork.WebUI.QMEChart.QMEChartHelper.echartEventEnum.click, "")%></div>
</div>
<%--<div id="wancl" style="width:90%; text-align:center;">
<font size="6" weight:bold;>生产完成率分析</font>
</div>--%>
<div id="djingbao" style="left: 0px; top: 0px;width: 1280px; height: 720px; background-image: url(/Content/Img/Plant3.png);
background-size: 100% 100%;position: relative;">
<img id="bj" style="position: absolute;background-color: transparent;left: 1110px; top: 30px; width: 50px; height: 50px;display: none;z-index:999 " src="/Content/Img/bj1.gif"/>
<div id="dcount" style="position: absolute; left: 1100px; top: 100px; font-size: 20px;">
<div style="color: blue">维修报警</div>
<div style="color: white">质量报警</div>
<div style="color: red">物料报警</div>
</div>
<div id="Div1" style="position: absolute; left: 10px; top: 30px; font-size: 30px;">
门板装配线
</div>
<div id="Div2" style="position: absolute; left: 10px; top: 400px; font-size: 30px;">
仪表板装配线
</div>
<div id="DP_R_INSP" style="position: absolute; left: 160px; top: 55px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0DP_R_INSP'></font><font name='fontN' onclick="Count(this)" id='1DP_R_INSP'></font><font name='fontN' onclick="Count(this)" id='2DP_R_INSP'></font>
</div>
<div id="DP_L_INSP" style="position: absolute; left: 160px; top: 195px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0DP_L_INSP'></font><font name='fontN' onclick="Count(this)" id='1DP_L_INSP'></font><font name='fontN' onclick="Count(this)" id='2DP_L_INSP'></font>
</div>
<div id="DP_R_WELD" style="position: absolute; left: 345px; top: 75px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0DP_R_WELD'></font><font name='fontN' onclick="Count(this)" id='1DP_R_WELD'></font><font name='fontN' onclick="Count(this)" id='2DP_R_WELD'></font>
</div>
<div id="DP_L_WELD" style="position: absolute; left: 345px; top: 255px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0DP_L_WELD'></font><font name='fontN' onclick="Count(this)" id='1DP_L_WELD'></font><font name='fontN' onclick="Count(this)" id='2DP_L_WELD'></font>
</div>
<div id="DP_R_HWELD" style="position: absolute; left: 555px; top: 50px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0DP_R_HWELD'></font><font name='fontN' onclick="Count(this)" id='1DP_R_HWELD'></font><font name='fontN' onclick="Count(this)" id='2DP_R_HWELD'></font>
</div>
<div id="DP_L_HWELD" style="position: absolute; left: 555px; top: 280px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0DP_L_HWELD'></font><font name='fontN' onclick="Count(this)" id='1DP_L_HWELD'></font><font name='fontN' onclick="Count(this)" id='2DP_L_HWELD'></font>
</div>
<div id="DP_R_PRE2" style="position: absolute; left: 710px; top: 60px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0DP_R_PRE2'></font><font name='fontN' onclick="Count(this)" id='1DP_R_PRE2'></font><font name='fontN' onclick="Count(this)" id='2DP_R_PRE2'></font>
</div>
<div id="DP_L_PRE2" style="position: absolute; left: 710px; top: 275px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0DP_L_PRE2'></font><font name='fontN' onclick="Count(this)" id='1DP_L_PRE2'></font><font name='fontN' onclick="Count(this)" id='2DP_L_PRE2'></font>
</div>
<div id="DP_R_PRE1" style="position: absolute; left: 850px; top: 60px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0DP_R_PRE1'></font><font name='fontN' onclick="Count(this)" id='1DP_R_PRE1'></font><font name='fontN' onclick="Count(this)" id='2DP_R_PRE1'></font>
</div>
<div id="DP_L_PRE1" style="position: absolute; left: 850px; top: 275px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0DP_L_PRE1'></font><font name='fontN' onclick="Count(this)" id='1DP_L_PRE1'></font><font name='fontN' onclick="Count(this)" id='2DP_L_PRE1'></font>
</div>
<%--<div name='divN' id="Div17" style="position: absolute; left: 290px; top: 210px; font-size: 30px;">
</div>
<div name='divN' id="Div21" style="position: absolute; left: 50px; top: 380px; font-size: 30px;">
</div>--%>
<div id="IP_ASSEMBLY" style="position: absolute; left: 340px; top: 660px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0IP_ASSEMBLY'></font><font name='fontN' onclick="Count(this)" id='1IP_ASSEMBLY'></font><font name='fontN' onclick="Count(this)" id='2IP_ASSEMBLY'></font>
</div>
<div id="IP_SWELD_4" style="position: absolute; left: 340px; top: 580px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0IP_SWELD_4'></font><font name='fontN' onclick="Count(this)" id='1IP_SWELD_4'></font><font name='fontN' onclick="Count(this)" id='2IP_SWELD_4'></font>
</div>
<div id="IP_SWELD_3" style="position: absolute; left: 240px; top: 435px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0IP_SWELD_3'></font><font name='fontN' onclick="Count(this)" id='1IP_SWELD_3'></font><font name='fontN' onclick="Count(this)" id='2IP_SWELD_3'></font>
</div>
<div id="IP_SWELD_2" style="position: absolute; left: 400px; top: 365px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0IP_SWELD_2'></font><font name='fontN' onclick="Count(this)" id='1IP_SWELD_2'></font><font name='fontN' onclick="Count(this)" id='2IP_SWELD_2'></font>
</div>
<div id="IP_VWELD_2" style="position: absolute; left: 515px; top: 510px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0IP_VWELD_2'></font><font name='fontN' onclick="Count(this)" id='1IP_VWELD_2'></font><font name='fontN' onclick="Count(this)" id='2IP_VWELD_2'></font>
</div>
<div id="IP_SWELD_1" style="position: absolute; left: 640px; top: 365px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0IP_SWELD_1'></font><font name='fontN' onclick="Count(this)" id='1IP_SWELD_1'></font><font name='fontN' onclick="Count(this)" id='2IP_SWELD_1'></font>
</div>
<div id="IP_VWELD_1" style="position: absolute; left: 830px; top: 500px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0IP_VWELD_1'></font><font name='fontN' onclick="Count(this)" id='1IP_VWELD_1'></font><font name='fontN' onclick="Count(this)" id='2IP_VWELD_1'></font>
</div>
<div id="IP_LASER" style="position: absolute; left: 840px; top: 600px; font-size: 30px;">
<font name='fontN' onclick="Count(this)" id='0IP_LASER'></font><font name='fontN' onclick="Count(this)" id='1IP_LASER'></font><font name='fontN' onclick="Count(this)" id='2IP_LASER'></font>
</div>
<%--<div name='divN' id="Div57"
style="position: absolute; margin:0;padding:0;left: 900px; top: 310px; font-size: 30px;display:inline">
<font id='Font1' color="blue"></font><font id='Font2' color="white"></font><font id='Font3' color="red"></font>
</div>
<div name='divN' id="Div61"
style="position: absolute; left: 1020px; top: 310px; font-size: 30px;">
<font id='Font4' color="blue"></font><font id='Font5' color="white"></font><font id='Font6' color="red"></font>
</div>--%>
</div>
<script language="javascript">
$(document).ready(function () {
init();
Get();
qiehuan();
GetTable();
});
//初始化
function init() {
$.ajax({
url: "/TempCallLog/GetDivStyle",
data: {
type: "3"
},
type: "POST",
cache: false,
dataType: "json",
async: true,
success: function (data) {
if (data != null && data.length > 0) {
for (var i = 0; i < data.length; i++) {
var divTemp = document.getElementById(data[i].id);
divTemp.style.left = data[i].divLeft;
divTemp.style.top = data[i].divTop;
divTemp.style.fontSize = data[i].fontSize;
//divTemp.style.color = data[i].divColor;
}
}
}
});
}
//获取table
function Get() {
$.ajax({
url: "/TempCallLog/GetListNew",
data: {},
type: "POST",
cache: false,
dataType: "json",
async: true,
success: function (data) {
//debugger ;
if (data != null && data.length > 0) {
FillView(data);
document.getElementById("types").value = "第一次有数据";
document.getElementById("bj").style.display = "block";
} else {
//清空全部div
$("font[name='fontN']")
.each(function () {
this.innerText = "";
});
document.getElementById("bj").style.display = "none";
}
}
});
//指定?秒刷新一次
setTimeout("Get()", 5000);
}
//没有变化时填充table
function FillView(data) {
//debugger;
var ids = document.getElementById("ids");
//var types = document.getElementById("types");
ids.value = "";
//维修
//var callType = "0";
//循环所有的道次对象
for (var i = 0; i < data.length; i++) {
var did = data[i].MACHINECODDE;
//判断id是否存在
if (document.getElementById(did) != null) {
var didType = did;
var rType = "0";
var qType = "1";
var mType = "2";
var fontColor = "";
if (data[i].CALL_TYPE == rType) {
didType = rType + did;
fontColor = "blue";
}
else if (data[i].CALL_TYPE == qType) {
didType = qType + did;
fontColor = "white";
}
else if (data[i].CALL_TYPE == mType) {
didType = mType + did;
fontColor = "red";
}
//把变化的id存起来.
ids.value = ids.value + didType + ";";
//赋值
if (document.getElementById(didType) != null) {
var didtxt = document.getElementById(didType).innerText;
//debugger;
if (didtxt.trim() != data[i].CALL_COUNT) {
//alert(data[i].CALL_COUNT);
document.getElementById(didType).innerText = data[i].CALL_COUNT;
document.getElementById(didType).color = fontColor;
}
}
}
}
//遍历所有div
if (ids.value != '') {
$("font[name='fontN']")
.each(function() {
var dvid = this.id;
var str = ids.value;
//没变化的id赋值
if (str.indexOf(dvid) == -1) {
this.innerText = "";
}
});
}
}
//图表
function GetTable() {
$.ajax({
type: "POST",
url: "/MainOperationReview/GetTable",
dataType: "json",
data: {},
success: function (data) {
$("#maintb").html(data);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
}
});
}
//切换
var flag = 0;
function qiehuan() {
var div1 = document.getElementById("djingbao");
// var div2 = document.getElementById("echartID");
var div3 = document.getElementById("zhusu");
var div4 = document.getElementById("yibiao");
var div5 = document.getElementById("menban");
//var div6 = document.getElementById("wancl");
var div7 = document.getElementById("yimen");
if (!flag) {
div1.style.display = "block";
// div2.style.display = "none";
div3.style.display = "none";
div4.style.display = "none";
div5.style.display = "none";
//div6.style.display = "none";
div7.style.display = "none";
flag = 1;
} else {
// div2.style.display = "block";
div3.style.display = "block";
div4.style.display = "block";
div5.style.display = "block";
//div6.style.display = "block";
div7.style.display = "block";
div1.style.display = "none";
flag = 0;
}
setTimeout("qiehuan()", 10000);
}
//统计
function Count(obj) {
//debugger;
//alert(obj.id);
var ids = obj.id;
//submitByButton("/TempCallLog/Count?PID=" + ids);
openAppWindow1('统计', 'Count?PID=' + ids, '950', '500');
}
//进入全屏
function enterFullScreen() {
var de = document.documentElement;
if (de.requestFullscreen) {
de.requestFullscreen();
} else if (de.mozRequestFullScreen) {
de.mozRequestFullScreen();
} else if (de.webkitRequestFullScreen) {
de.webkitRequestFullScreen();
}
}
//获得窗体大小
function getWindowSize() {
document.write(
"屏幕分辨率为:" +
screen.width +
"*" +
screen.height //最好是window.screen
+
"<br />" +
"屏幕可用大小:" +
screen.availWidth +
"*" +
screen.availHeight +
"<br />" +
"网页可见区域宽:" +
document.body.clientWidth +
"<br />" +
"网页可见区域高:" +
document.body.clientHeight +
"<br />" +
"网页可见区域宽(包括边线的宽):" +
document.body.offsetWidth +
"<br />" +
"网页可见区域高(包括边线的宽):" +
document.body.offsetHeight +
"<br />" +
"网页正文全文宽:" +
document.body.scrollWidth +
"<br />" +
"网页正文全文高:" +
document.body.scrollHeight +
"<br />" +
"网页被卷去的高:" +
document.body.scrollTop +
"<br />" +
"网页被卷去的左:" +
document.body.scrollLeft +
"<br />" +
"网页正文部分上:" +
window.screenTop +
"<br />" +
"网页正文部分左:" +
window.screenLeft +
"<br />" +
"屏幕分辨率的高:" +
window.screen.height +
"<br />" +
"屏幕分辨率的宽:" +
window.screen.width +
"<br />" +
"屏幕可用工作区高度:" +
window.screen.availHeight +
"<br />" +
"屏幕可用工作区宽度:" +
window.screen.availWidth
);
}
//a();
//Get();
//enterFullScreen();
</script>
<style type="text/css">
.mtbtt
{
border-collapse:collapse;
}
.mtbtt tr td
{
border: 1px solid grey;
}
.L1cos
{
width:160px;
}
</style>
</asp:Content>