Authored by xwx

Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-v32-xwx

... ... @@ -452,7 +452,7 @@ layui.extend({
}
//判断是否为故障诊断的三种类型
if(toastType=='faultinfo'||toastType=='faultover'){
if(toastType=='faultinfo'||toastType=='faultover'||toastType=='faultprogress'){
var imgUrl="";
if(toastType=='faultinfo'){
imgUrl="/src/style/img/fault.png";
... ... @@ -461,17 +461,21 @@ layui.extend({
if(toastType=='faultover'){
imgUrl="/src/style/img/faultprogress.png";
}
if(toastType=='faultprogress'){
imgUrl="/src/style/img/faultover.png";
}
setTimeout(function () {
new msgTips({
dom: ".right-bottom-tips",
title: title,
message: `<p style="line-height: 24px;background: url(${imgUrl}) no-repeat;background-size: 100%;height: 160px;background-position-x: right;padding-left: 25px;padding-top: 145px;"><span >${content}</span><span class="title closeFault" style="position: relative;top: -126px;left: 22px;">X</span><span style="position: relative;left: -89px;top: -96px; font-weight: bold;float: right;">${title}</span></p>`,
message: `<p style="line-height: 20px;background: url(${imgUrl}) no-repeat;background-size: 100%;height: 160px;background-position-x: right;padding-left: 25px;padding-top: 145px;" ><span style=" overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;margin-left: -11px;" lay-tips="${content}">${content}</span><span class="title closeFault" style="position: absolute;top: 72px;left: 213px;">X</span><span style="position: absolute;left: 87px;top: 124px; font-weight: bold;float: right;">${title}</span></p>`,
duration: 10000,
space: 10,
firstSpace: 8,
limit: 8,
margin: 15,
direction: 'right bottom',
direction: 'right top',
timingFun: 'ease',
width: '300px',
toastType: toastType,
... ... @@ -479,40 +483,11 @@ layui.extend({
action: function () {
//if (hash) {
// location.hash = hash;
location.hash = "/faultDiagnosis/list/faultNo="+content.split(",")[0].split(":")[1];
location.hash = "/faultDiagnosis/list/faultNo="+content.split(",")[0].split(":")[1];
//}
}
})
}, delay);
}else if(toastType=='faultprogress'){
var imgUrl="";
if(toastType=='faultprogress'){
imgUrl="/src/style/img/faultover.png";
}
setTimeout(function () {
new msgTips({
dom: ".right-bottom-tips",
title: title,
message: `<p style="line-height: 24px;background: url(${imgUrl}) no-repeat;background-size: 100%;height: 160px;background-position-x: right;padding-left: 25px;padding-top: 145px;"><span >${content}</span><span class="title closeFault" style="position: relative;top: -175px;left: 179px;">X</span><span style="position: relative;left: -90px;top: -117px; font-weight: bold;float: right;">${title}</span></p>`,
duration: 10000,
space: 10,
firstSpace: 8,
limit: 8,
margin: 15,
direction: 'right bottom',
timingFun: 'ease',
width: '300px',
toastType: toastType,
type: 'click',
action: function () {
//if (hash) {
// location.hash = hash;
location.hash = "/faultDiagnosis/list/faultNo="+content.split(",")[0].split(":")[1];
//}
}
})
}, delay);
}else{
setTimeout(function () {
new msgTips({
... ...
... ... @@ -65,7 +65,8 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) {
$(newContainer).addClass('active length1');
break;
} else if (!$('.ez_tips').hasClass('length'+ (i+1))) {
$(newContainer).css(lastDirection,i * height + options.space * i + options.firstSpace + 'px');
$(newContainer).css(lastDirection,10 + options.space * i + options.firstSpace + 'px');
// $(newContainer).css('right',20 *i + 'px');
$(newContainer).addClass('active length'+(i+1));
break; // break一定要加,否则每次点击都会循环到结束,导致一个目标div可能同时有length1 length2.....等多个类名
}
... ... @@ -118,7 +119,7 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) {
$(newContainer).removeClass('active');
setTimeout(function () {
$(newContainer).remove();
}, 700)
}, 500)
};
timer = setTimeout(timeOut, options.duration);
var newTimes;
... ... @@ -127,24 +128,27 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) {
'transition-timing-function':options.timingFun,
// 'width':options.width,
'width':'226px',
'bottom':'620px'
'bottom':'350px'
});
var height = $(newContainer).outerHeight(true);
var len = $('.fault_ez_tips').size();
if (len >= 2) {
for (var i = 1; i < len; i++) {
if (!$('.fault_ez_tips').hasClass('length1')) {
$(newContainer).css(lastDirection,options.firstSpace + 'px');
$(newContainer).css(lastDirection,options.firstSpace +50+ 'px');
$(newContainer).addClass('active length1');
break;
} else if (!$('.fault_ez_tips').hasClass('length'+ (i+1))) {
$(newContainer).css(lastDirection,i * height + options.space * i + options.firstSpace + 'px');
$(newContainer).css(lastDirection,10 + options.space * i + options.firstSpace +50+'px');
var rightVal=parseInt($(newContainer).css('right').split('px')[0]);
// $(newContainer).css('right',30 + rightVal + 'px');
// $(newContainer).css('right',30 *i + 'px');
$(newContainer).addClass('active length'+(i+1));
break; // break一定要加,否则每次点击都会循环到结束,导致一个目标div可能同时有length1 length2.....等多个类名
}
}
} else {
$(newContainer).css(lastDirection,options.firstSpace + 'px');
$(newContainer).css(lastDirection,options.firstSpace +50+'px');
$(newContainer).addClass('active length1');
}
$(newContainer).on('mouseenter', function (event) {
... ...