Merge remote-tracking branch 'gitee/master'

master
wangh 3 years ago
commit e009888c0e

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

@ -133,6 +133,12 @@ const curWeek = () => {
let d = Math.ceil((today.valueOf() - firstDayOfYear.valueOf()) / 86400000);
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 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: 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: 61%;left: 80%;color: #CFD2D0;font-size: 1.0vw">${new Date().getFullYear()} 年连续安全生产 ${today()} </span>
`
$('body').append(html)
}

Loading…
Cancel
Save