Commit a1b6282a authored by lc0527's avatar lc0527

消息提示优化

parent 788559e0
......@@ -210,7 +210,7 @@
function BottomText(){
// 左边
$('#productionDayDate3999').liMarquee('destroy');
$('#productionDayDate3999').liMarquee('destroy');
$('#productionDayDate3999').liMarquee({
// circular: false,
direction: 'left',
......@@ -219,26 +219,16 @@
// 右边
$('#productionDayDate3888').liMarquee('destroy');
$('#productionDayDate3888').liMarquee('destroy');
$('#productionDayDate3888').liMarquee({
// circular: false,
direction: 'left',
scrollamount: 30
});
}
// 底部文字 初始化
BottomText()
// 左边文字 修改
$('#productionDayDate3999 .str_move').html( "错误信息111" || "" )
$('#productionDayDate3888 .str_move').html( "提示信息111" || "" )
// 给自定义控件添加点击事件,触发播放
/* alarmBell.addEventListener('click', function() {
handPlayAudio();
......@@ -342,8 +332,9 @@
if(_data.status==='异常'){
//TODO 异常报警信息
let warningMsg = _data.warningMsg;
$("#msgShowWindow").text(warningMsg);
$("#msgShowWindow").addClass("error");
$('#productionDayDate3999 .str_move').html(warningMsg)
//$("#msgShowWindow").text(warningMsg);
//$("#msgShowWindow").addClass("error");
var elements = document.querySelectorAll('.marquee');
for (const element of elements) {
var totalWidth = element.scrollWidth;
......@@ -356,8 +347,9 @@
if(_data.message) {
//TODO 异常报警信息
let warningMsg = _data.message;
$("#msgShowWindow").text(warningMsg);
$("#msgShowWindow").addClass("error");
$('#productionDayDate3999 .str_move').html(warningMsg)
//$("#msgShowWindow").text(warningMsg);
//$("#msgShowWindow").addClass("error");
var elements = document.querySelectorAll('.marquee');
for (const element of elements) {
var totalWidth = element.scrollWidth;
......@@ -369,7 +361,8 @@
if(_data.type=='broadcast'){
if(_data.message){
$("#broadcastShowWindow").text(_data.message);
//$("#broadcastShowWindow").text(_data.message);
$('#productionDayDate3888 .str_move').html(_data.message)
var elements = document.querySelectorAll('.marquee');
for (const element of elements) {
var totalWidth = element.scrollWidth;
......
......@@ -348,7 +348,7 @@ $(document).ready(function () {
function BottomText(){
// 左边
$('#productionDayDate3999').liMarquee('destroy');
$('#productionDayDate3999').liMarquee('destroy');
$('#productionDayDate3999').liMarquee({
// circular: false,
direction: 'left',
......@@ -357,7 +357,7 @@ $(document).ready(function () {
// 右边
$('#productionDayDate3888').liMarquee('destroy');
$('#productionDayDate3888').liMarquee('destroy');
$('#productionDayDate3888').liMarquee({
// circular: false,
direction: 'left',
......@@ -369,15 +369,6 @@ $(document).ready(function () {
BottomText()
// 左边文字 修改
$('#productionDayDate3999 .str_move').html( "错误信息222" || "" )
$('#productionDayDate3888 .str_move').html( "提示信息222" || "" )
......@@ -408,11 +399,13 @@ $(document).ready(function () {
$("#equipmentStatus").addClass("error");
//TODO 异常报警信息
let warningMsg = _data.warningMsg;
$("#msgShowWindow").text(warningMsg);
$("#msgShowWindow").addClass("error");
$('#productionDayDate3999 .str_move').html(warningMsg)
//$("#msgShowWindow").text(warningMsg);
//$("#msgShowWindow").addClass("error");
}else{
$("#msgShowWindow").removeClass("error");
$("#equipmentStatus").addClass("text-124");
//$("#msgShowWindow").removeClass("error");
//$("#equipmentStatus").addClass("text-124");
$('#productionDayDate3999 .str_move').html('')
}
var elements = document.querySelectorAll('.marquee');
for (const element of elements) {
......@@ -423,7 +416,8 @@ $(document).ready(function () {
}
if(_data.type=='broadcast'){
if(_data.message){
$("#broadcastShowWindow").text(_data.message);
$('#productionDayDate3888 .str_move').html(_data.message)
//$("#broadcastShowWindow").text(_data.message);
var elements = document.querySelectorAll('.marquee');
for (const element of elements) {
var totalWidth = element.scrollWidth;
......
......@@ -124,7 +124,7 @@
function BottomText(){
// 左边
$('#productionDayDate3999').liMarquee('destroy');
$('#productionDayDate3999').liMarquee('destroy');
$('#productionDayDate3999').liMarquee({
// circular: false,
direction: 'left',
......@@ -133,30 +133,17 @@
// 右边
$('#productionDayDate3888').liMarquee('destroy');
$('#productionDayDate3888').liMarquee('destroy');
$('#productionDayDate3888').liMarquee({
// circular: false,
direction: 'left',
scrollamount: 30
});
}
}
// 底部文字 初始化
BottomText()
// 左边文字 修改
$('#productionDayDate3999 .str_move').html( "错误信息333" || "" )
$('#productionDayDate3888 .str_move').html( "提示信息333" || "" )
let siteId = null;
window.addEventListener('message', function(event={}) {
const _data=JSON.parse( (event.data||"{}") )
......@@ -180,8 +167,9 @@
if(_data.status==='异常'){
//TODO 异常报警信息
let warningMsg = _data.warningMsg;
$("#msgShowWindow").text(warningMsg);
$("#msgShowWindow").addClass("error");
$('#productionDayDate3999 .str_move').html( warningMsg )
//$("#msgShowWindow").text(warningMsg);
//$("#msgShowWindow").addClass("error");
var elements = document.querySelectorAll('.marquee');
for (const element of elements) {
var totalWidth = element.scrollWidth;
......@@ -192,6 +180,7 @@
}
if(_data.type=='broadcast'){
if(_data.message){
$('#productionDayDate3888 .str_move').html(_data.message)
$("#broadcastShowWindow").text(_data.message);
var elements = document.querySelectorAll('.marquee');
for (const element of elements) {
......
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