Commit 06b85c80 authored by xcc's avatar xcc

跑马灯跑部分bug修复

parent 6b0c5550
......@@ -855,7 +855,7 @@
}
.marquee-container {
width: 50%;
width: 49%;
overflow: hidden;
white-space: nowrap;
box-sizing: border-box;
......
......@@ -266,6 +266,8 @@
$("#warningNode").css("display", "block");
}
}else{
handStop=false;
}
}
......@@ -292,6 +294,12 @@
let warningMsg = _data.warningMsg;
$("#msgShowWindow").text(warningMsg);
$("#msgShowWindow").addClass("error");
var elements = document.querySelectorAll('.marquee');
for (const element of elements) {
var totalWidth = element.scrollWidth;
var duration = (totalWidth) / 1000 * 1000*4; // 假设1px滚动需要1ms
element.style.animationDuration = duration + 'ms';
}
}
}
if(_data.type==='warningMag'){
......@@ -300,12 +308,24 @@
let warningMsg = _data.message;
$("#msgShowWindow").text(warningMsg);
$("#msgShowWindow").addClass("error");
var elements = document.querySelectorAll('.marquee');
for (const element of elements) {
var totalWidth = element.scrollWidth;
var duration = (totalWidth) / 1000 * 1000*4; // 假设1px滚动需要1ms
element.style.animationDuration = duration + 'ms';
}
}
}
if(_data.type=='broadcast'){
if(_data.message){
$("#broadcastShowWindow").text(_data.message);
var elements = document.querySelectorAll('.marquee');
for (const element of elements) {
var totalWidth = element.scrollWidth;
var duration = (totalWidth) / 1000 * 1000*4; // 假设1px滚动需要1ms
element.style.animationDuration = duration + 'ms';
}
}
}
......
......@@ -347,6 +347,7 @@ $(document).ready(function () {
}
if(_data.type==='statusWarningMag'){
$("#equipmentStatus").text(_data.status);
if(_data.status==='异常'){
$("#equipmentStatus").addClass("error");
//TODO 异常报警信息
......@@ -357,10 +358,22 @@ $(document).ready(function () {
$("#msgShowWindow").removeClass("error");
$("#equipmentStatus").addClass("text-124");
}
var elements = document.querySelectorAll('.marquee');
for (const element of elements) {
var totalWidth = element.scrollWidth;
var duration = (totalWidth) / 1000 * 1000*4; // 假设1px滚动需要1ms
element.style.animationDuration = duration + 'ms';
}
}
if(_data.type=='broadcast'){
if(_data.message){
$("#broadcastShowWindow").text(_data.message);
var elements = document.querySelectorAll('.marquee');
for (const element of elements) {
var totalWidth = element.scrollWidth;
var duration = (totalWidth) / 1000 * 1000*4; // 假设1px滚动需要1ms
element.style.animationDuration = duration + 'ms';
}
}
}
if(_data.type=='info'){
......
......@@ -129,11 +129,23 @@
let warningMsg = _data.warningMsg;
$("#msgShowWindow").text(warningMsg);
$("#msgShowWindow").addClass("error");
var elements = document.querySelectorAll('.marquee');
for (const element of elements) {
var totalWidth = element.scrollWidth;
var duration = (totalWidth) / 1000 * 1000*4; // 假设1px滚动需要1ms
element.style.animationDuration = duration + 'ms';
}
}
}
if(_data.type=='broadcast'){
if(_data.message){
$("#broadcastShowWindow").text(_data.message);
var elements = document.querySelectorAll('.marquee');
for (const element of elements) {
var totalWidth = element.scrollWidth;
var duration = (totalWidth) / 1000 * 1000*4; // 假设1px滚动需要1ms
element.style.animationDuration = duration + 'ms';
}
}
}
if(_data.type==='siteId'){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment