Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
hg-monitor-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
‘superliu’
3 years ago
Commit
e716a019c1a2873e8707814ba23eb7b841241592
1 parent
8a6c59dc
杭州-故障弹框-样式修改
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
36 deletions
hg-monitor-web-base/src/main/resources/static/src/index.js
hg-monitor-web-base/src/main/resources/static/src/lib/extend/msgTips.js
hg-monitor-web-base/src/main/resources/static/src/index.js
View file @
e716a01
...
...
@@ -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,31 +461,7 @@ layui.extend({
if
(
toastType
==
'faultover'
){
imgUrl
=
"/src/style/img/faultprogress.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
>
`
,
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
if
(
toastType
==
'faultprogress'
){
var
imgUrl
=
""
;
if
(
toastType
==
'faultprogress'
){
imgUrl
=
"/src/style/img/faultover.png"
;
}
...
...
@@ -493,13 +469,13 @@ layui.extend({
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: -117
px; 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;"
>
$
{
content
}
<
/span><span class="title closeFault" style="position: absolute;top: 72px;left: 213px;">X</
span
><
span
style
=
"position: absolute;left: 87px;top: 124
px; 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
,
...
...
@@ -512,7 +488,6 @@ layui.extend({
}
})
},
delay
);
}
else
{
setTimeout
(
function
()
{
new
msgTips
({
...
...
hg-monitor-web-base/src/main/resources/static/src/lib/extend/msgTips.js
View file @
e716a01
...
...
@@ -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
();
},
7
00
)
},
5
00
)
};
timer
=
setTimeout
(
timeOut
,
options
.
duration
);
var
newTimes
;
...
...
@@ -127,27 +128,27 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) {
'transition-timing-function'
:
options
.
timingFun
,
// 'width':options.width,
'width'
:
'226px'
,
'bottom'
:
'
62
0px'
'bottom'
:
'
35
0px'
});
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
,
30
+
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).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
)
{
...
...
Please
register
or
login
to post a comment