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
Plain Diff
Browse Files
Authored by
xwx
3 years ago
Commit
273834dcbfdee4c0dacfaf3a62946f60dcf23750
2 parents
84a91125
3129dc8a
Merge branch 'master' of
http://113.200.75.45:82/monitor_v3/hg-monitor-web
into master-v32-xwx
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
39 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 @
273834d
...
...
@@ -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: 2
4px;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: -96
px; font-weight: bold;float: right;"
>
$
{
title
}
<
/span></
p
>
`
,
message
:
`
<
p
style
=
"line-height: 2
0px;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: 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
,
...
...
@@ -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
({
...
...
hg-monitor-web-base/src/main/resources/static/src/lib/extend/msgTips.js
View file @
273834d
...
...
@@ -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,24 +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
,
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
)
{
...
...
Please
register
or
login
to post a comment