天津投入产出系统后端
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.
 
 
 
 
 
 

632 lines
27 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="60">--%>
<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 style="position: absolute; left: 10px; top: 30px; font-size: 30px;">
门板装配线
</div>
<div 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>
<!--图表配置-->
<%=QMAPP.FJC.Web.Controllers.MainOperationReviewController.QMEChartPageConfig()%>
<%--异步获取数据生成图表--%>
<div id="fanxiu">
<div style="width: 100%;">
<%=QMFrameWork.WebUI.QMEChart.QMEChartHelper.CreateEchart("echartRepair1", "/AndonDisplay/GetEchartRepair1", new string[] { "line", "bar" }
, "myEChartR1",350, QMFrameWork.WebUI.QMEChart.QMEChartHelper.echartEventEnum.click, "")%></div>
<div style="width: 50%; float: left">
<%=QMFrameWork.WebUI.QMEChart.QMEChartHelper.CreateEchart("echartRepair12", "/AndonDisplay/GetEchartRepair2", new string[] { "line", "bar" }
, "myEChartR2",370, QMFrameWork.WebUI.QMEChart.QMEChartHelper.echartEventEnum.click, "")%></div>
<div style="width: 50%; float: right">
<%=QMFrameWork.WebUI.QMEChart.QMEChartHelper.CreateEchart("echartRepair13", "/AndonDisplay/GetEchartRepair3", new string[] { "line", "bar" }
, "myEChartR3",370, QMFrameWork.WebUI.QMEChart.QMEChartHelper.echartEventEnum.click, "")%></div>
<%--<div id="wancl" style="width:90%; text-align:center;">
<font size="6" weight:bold;>生产完成率分析</font>
</div>--%>
</div>
<%--异步获取数据生成图表:生产完成率分析--%>
<div id="wanchenglv">
<div style="width: 100%;">
<%=QMFrameWork.WebUI.QMEChart.QMEChartHelper.CreateEchart("echartID1", "/AndonDisplay/GetEchartDataGroup1", new string[] { "line", "bar" }
, "myEChart1",350, QMFrameWork.WebUI.QMEChart.QMEChartHelper.echartEventEnum.click, "")%></div>
<div style="width: 50%; float: left">
<%=QMFrameWork.WebUI.QMEChart.QMEChartHelper.CreateEchart("echartID2", "/AndonDisplay/GetEchartDataGroup2", new string[] { "line", "bar" }
, "myEChart2",370, QMFrameWork.WebUI.QMEChart.QMEChartHelper.echartEventEnum.click, "")%></div>
<div style="width: 50%; float: right">
<%=QMFrameWork.WebUI.QMEChart.QMEChartHelper.CreateEchart("echartID3", "/AndonDisplay/GetEchartDataGroup3", new string[] { "line", "bar" }
, "myEChart3",370, QMFrameWork.WebUI.QMEChart.QMEChartHelper.echartEventEnum.click, "")%></div>
<%--<div id="wancl" style="width:90%; text-align:center;">
<font size="6" weight:bold;>生产完成率分析</font>
</div>--%>
</div>
<script type="text/javascript" language="javascript">
$(document).ready(function () {
init();
qiehuan();
timer_tick();
//GetisData();
});
var counter = 0;
function timer_tick() {
try {
if (counter % 5 == 0) {
Get()//5秒刷新ANDON报警
}
if (counter >= 20) {
counter = 0;
qiehuan();//20秒切换界面
}
}
catch (err) {
}
counter += 1;
setTimeout("timer_tick()", 1000);
}
//切换
var flag = 0;
function qiehuan(){
//debugger;
var divDisplay1 = document.getElementById("djingbao");
var divDisplay2 = document.getElementById("wanchenglv");
var divDisplay3 = document.getElementById("fanxiu");
if (flag === 0) {
flag = 2;
divDisplay1.style.display = 'block';
divDisplay2.style.display = 'block';
divDisplay3.style.display = 'block';
Get();
}
else if (flag === 1) {
flag = 2;
divDisplay1.style.display = 'block';
divDisplay2.style.display = 'none';
divDisplay3.style.display = 'none';
RefreshWCL();
}
else if (flag === 2) {
flag = 3;
divDisplay1.style.display = 'none';
divDisplay2.style.display = 'block';
divDisplay3.style.display = 'none';
ConfigxAxisLable(myEChart1);
ConfigxAxisLable(myEChart2);
ConfigxAxisLable(myEChart3);
RefreshFXL();
}
else if (flag === 3) {
flag = 1;
divDisplay1.style.display = 'none';
divDisplay2.style.display = 'none';
divDisplay3.style.display = 'block';
ConfigxAxisLable(myEChartR1);
ConfigxAxisLable(myEChartR2);
ConfigxAxisLable(myEChartR3);
Get();
var ids = document.getElementById("ids");
if (ids.value == "") {
flag = 2;
RefreshWCL();
return;
}
}
}
//刷新完成率
function RefreshWCL() {
LoadChartData(myEChart1, "/AndonDisplay/GetEchartDataGroup1");
LoadChartData(myEChart2, "/AndonDisplay/GetEchartDataGroup2");
LoadChartData(myEChart3, "/AndonDisplay/GetEchartDataGroup3");
}
//刷新返修率
function RefreshFXL() {
LoadChartData(myEChartR1, "/AndonDisplay/GetEchartRepair1");
LoadChartData(myEChartR2, "/AndonDisplay/GetEchartRepair2");
LoadChartData(myEChartR3, "/AndonDisplay/GetEchartRepair3");
}
</script>
<script language="javascript">
//初始化
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;
}
}
}
});
}
//测试是否有数据方法
// function GetisData() {
// //alert("11111111111");
// $.ajax({
// url: "/AndonDisplay/GetTempData",
// type: "POST",
// dataType: "json",
// data: {},
// success: function (data) {
// //debugger;
// if (data != null && data.length > 0) {
// alert(data.length);
// console.log(data.length);
// } else {
// alert("no");
// console.log("no");
// }
// }
// });
// }
//获取table
function Get() {
$.ajax({
url: "/TempCallLog/GetListNew?callback=true",
//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";
var ids = document.getElementById("ids");
ids.value = "";
}
}
});
//指定?秒刷新一次
//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 Count(obj) {
//debugger;
//alert(obj.id);
var ids = obj.id;
//submitByButton("/TempCallLog/Count?PID=" + ids);
openAppWindow1('统计', 'Count?PID=' + ids, '950', '500');
}
//图表
function GetTable() {
$.ajax({
type: "POST",
url: "/AndonDisplay/GetTable",
dataType: "json",
data: {},
success: function (data) {
$("#maintb").html(data);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
}
});
}
//进入全屏
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
);
}
//GetisData();
//Get();
//enterFullScreen();
</script>
<script type="text/javascript" language="javascript">
//长文本配置
var longtextoption = {
grid: {
y2:90
},
xAxis: [{
type: 'category',
axisLabel: {
interval: 0,
rotate: 30,
textStyle: {
fontSize: 14
}
}
}]
};
//竖文本配置
var vtextoption = {
grid: {
y2: 90
},
xAxis: [{
type: 'category',
axisLabel: {
formatter: function (value) { return value.split("").join("\n") },
interval: 0,
rotate: 0,
textStyle: {
fontSize: 12
}
}
}]
};
var normaltextoption = {
grid: {
y2: 60
},
xAxis: [{
type: 'category',
axisLabel: {
interval: 0,
rotate: 0
}
}]
};
//加载图表数据
function LoadChartData(chartObj, url) {
$.ajax({
type: 'POST',
url: url,
dataType: 'html',
success: function (data) {
eval("var dataStr=" + data + ";");
chartObj.hideLoading();
chartObj.clear();
chartObj.setOption(dataStr);
},
error: function (err) {
_closeProgress();
}
});
}
//设置X轴标签
function ConfigxAxisLable(chartObj) {
var option = chartObj.getOption();
var cwidth = $(chartObj.getDom()).width()-120;
var citemwidth = cwidth / option.xAxis[0].data.length;
var maxlabelwidth = 0;
for (var i = 0; i < option.xAxis[0].data.length; i++) {
if (option.xAxis[0].data[i].length * 20 > maxlabelwidth) {
maxlabelwidth = option.xAxis[0].data[i].length * 20;
}
}
if (citemwidth <= 35) {
vtextoption.grid.y2 = maxlabelwidth + 10;
chartObj.setOption(vtextoption);
}
else if (maxlabelwidth > citemwidth) {
longtextoption.grid.y2 = maxlabelwidth / 2 + 25;
chartObj.setOption(longtextoption);
}
}
$(function () {
LoadChartData(myEChart1, "/AndonDisplay/GetEchartDataGroup1");
LoadChartData(myEChart2, "/AndonDisplay/GetEchartDataGroup2");
LoadChartData(myEChart3, "/AndonDisplay/GetEchartDataGroup3");
LoadChartData(myEChartR1, "/AndonDisplay/GetEchartRepair1");
LoadChartData(myEChartR2, "/AndonDisplay/GetEchartRepair2");
LoadChartData(myEChartR3, "/AndonDisplay/GetEchartRepair3");
});
var labelformatter = function (value) {
//debugger
var ret = ""; //拼接加\n返回的类目项
var maxLength = 1; //每项显示文字个数
var valLength = value.length; //X轴类目项的文字个数
var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
if (rowN > 1)//如果类目项的文字大于3,
{
for (var i = 0; i < rowN; i++) {
var temp = ""; //每次截取的字符串
var start = i * maxLength; //开始截取的位置
var end = start + maxLength; //结束截取的位置
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
temp = value.substring(start, end) + "\n";
ret += temp; //凭借最终的字符串
}
return ret;
}
else {
return value;
}
}
</script>
<style type="text/css">
.mtbtt
{
border-collapse: collapse;
}
.mtbtt tr td
{
border: 1px solid grey;
}
.L1cos
{
width: 160px;
}
</style>
</asp:Content>