Files
2026-01-16 14:13:44 +08:00

139 lines
5.0 KiB
Plaintext

<%@ page language="java" 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"%>
<!DOCTYPE html>
<!-- <html lang="zh-CN"> -->
<!-- BEGIN HEAD -->
<head>
<title></title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/incVisual.jsp"></jsp:include>
<style>
.titleDiv {
border-radius: 30px;
border: 3px solid #fff;
background-color: #1BB3DC;
}
</style>
<script type="text/javascript">
/* 请求数据 */
var timeflash = 0;
function clock() {
var time = new Date();
var week;
switch (time.getDay()) {
case 1: week = "星期一"; break;
case 2: week = "星期二"; break;
case 3: week = "星期三"; break;
case 4: week = "星期四"; break;
case 5: week = "星期五"; break;
case 6: week = "星期六"; break;
default: week = "星期天";
}
var year = time.getFullYear();
var month = time.getMonth();
var date = time.getDate();
var hour = time.getHours();
var minute = time.getMinutes();
if (minute < 10) {
minute = "0" + minute;
}
//console.log("time",hour);
// var apm = "上午";
// if (hour < 6 && hour >= 0) {
// apm = "凌晨";
// } else if (hour == 12) {
// apm = "中午";
// } else if (hour > 12 && hour < 18) {
// apm = "下午";
// } else if (hour >= 18 && hour < 24) {
// apm = "晚上";
// }
var maohao = "";
if (timeflash == 0) {
maohao = "<font color='#4972B4'>:</font>";
timeflash = 1;
} else {
maohao = "<font color='#182f52'>:</font>";
timeflash = 0;
}
document.getElementById("clock").innerHTML = hour + maohao + minute;
//document.getElementById("apm").innerHTML = apm;
document.getElementById("date").innerHTML = year + "年" + (month + 1) + "月" + date + "日";
document.getElementById("week").innerHTML = week;
}
function getValue() {
$.post(ext.contextPath + '/plan/getJspWholeInfoByPlanLayoutId.do', { planLayoutId: "${param.planLayoutId}" }, function (data) {
//每一条循环判断
//console.log("data", data);
for (var i = 0; i < data.length; i++) {
if (data[i].elementCode.indexOf("title") != -1) {//获取车间名
var code = data[i].elementCode;
if (document.getElementById(code)) {//判断存不存在
//赋值
document.getElementById(code).innerHTML = data[i].name;
}
}
}
}, 'json');
}
/* 定时器 */
setInterval(getValue, 600000); //<!--每隔10分钟刷新一次-->
setInterval(clock, 1000); //每隔1秒显示一次
/* 初始化 */
$(function () {
getValue();
// console.log("height",document.documentElement.clientWidth);
document.body.style.backgroundColor = "#" + '${param.backgroundColor}';
$("#clock").css("font-size", (document.documentElement.clientWidth * 0.18 + "px"));
// $("#lunar").css("font-size", (document.documentElement.clientWidth * 0.03 + "px"));
$("#date").css("font-size", (document.documentElement.clientWidth * 0.08 + "px"));
$("#week").css("font-size", (document.documentElement.clientWidth * 0.08 + "px"));
$("#title1").css("font-size", (document.documentElement.clientWidth * 0.06 + "px"));
document.getElementById("titleDiv").style.width = document.documentElement.clientWidth * 0.6 + "px";
document.getElementById("titleDiv").style.height = document.documentElement.clientHeight * 0.15 + "px";
document.getElementById("titleDiv").style.borderWidth = document.documentElement.clientHeight * 0.006 + "px";
});
</script>
</head>
<body style="width:100%;height:100%;margin:0;padding:0;overflow-x:hidden;overflow-y:hidden">
<div style="width:100%;height:100%;float:left">
<table
style="width:100%;height:95%;padding-left:5%;padding-right:5%;padding-top:2%;border-collapse:separate;border-spacing:0px 6px;text-align:center">
<tr>
<td align="center">
<div id="titleDiv" class="titleDiv" style="text-align: center;">
<span id="title1" style="font-size:30px;color:#fff;"></span>
</div>
</td>
</tr>
<tr>
<td align="center">
<span id="date" style="color:#4972B4;font-family:Microsoft YaHei;font-weight:bold"></span>
&nbsp;&nbsp;&nbsp;
<span id="week" style="color:#4972B4;font-family:Microsoft YaHei;font-weight:bold"></span>
</td>
</tr>
<tr>
<td align="center">
<span id="clock" style="color:#4972B4;font-family:Microsoft YaHei;font-weight: bold;"></span>
</td>
</tr>
</table>
</div>
</body>
</html>