修改界面

master
夜笙歌 4 years ago
parent 13c33df09f
commit 2cd1b00491

@ -43,8 +43,8 @@ body {
.safe{ .safe{
position: absolute; position: absolute;
width: 22%; width: 22%;
height: 34%; height: 30%;
top: 61%; top: 64%;
left: 75.5%; left: 75.5%;
} }
.abnormal{ .abnormal{

@ -133,6 +133,12 @@ const curWeek = () => {
let d = Math.ceil((today.valueOf() - firstDayOfYear.valueOf()) / 86400000); let d = Math.ceil((today.valueOf() - firstDayOfYear.valueOf()) / 86400000);
return Math.ceil((d / 7) + 1); return Math.ceil((d / 7) + 1);
} }
const today = () => {
const currentYear = new Date().getFullYear().toString();
const hasTimestamp = new Date() - new Date(currentYear);
const hasDays = Math.ceil(hasTimestamp / 86400000);
return hasDays
}
const moduleTitle = () => { const moduleTitle = () => {
const html = ` const html = `
@ -145,6 +151,7 @@ const moduleTitle = () => {
<span style="position: absolute;top: 57.8%;left: 27.6%;color: #CFD2D0;font-size: 1.0vw">单台能耗</span> <span style="position: absolute;top: 57.8%;left: 27.6%;color: #CFD2D0;font-size: 1.0vw">单台能耗</span>
<span style="position: absolute;top: 57.8%;left: 68%;color: #CFD2D0;font-size: 1.0vw">质量分析</span> <span style="position: absolute;top: 57.8%;left: 68%;color: #CFD2D0;font-size: 1.0vw">质量分析</span>
<span style="position: absolute;top: 57.8%;left: 93%;color: #CFD2D0;font-size: 1.0vw">数字化安全</span> <span style="position: absolute;top: 57.8%;left: 93%;color: #CFD2D0;font-size: 1.0vw">数字化安全</span>
<span style="position: absolute;top: 61%;left: 80%;color: #CFD2D0;font-size: 1.0vw">${new Date().getFullYear()} 年连续安全生产 ${today()} </span>
` `
$('body').append(html) $('body').append(html)
} }

Loading…
Cancel
Save