Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
gassafety
Commits
0e20a003
Commit
0e20a003
authored
Mar 03, 2022
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消警的就不提示了
parent
cda58c26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+22
-12
No files found.
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
0e20a003
...
@@ -737,7 +737,9 @@ export default {
...
@@ -737,7 +737,9 @@ export default {
});
});
// 管道
// 管道
console
.
log
(
"polyLineArr"
,
polyLineArr
);
console
.
log
(
"polyLineArr"
,
polyLineArr
);
// 报警信息存储
let
errorObj
;
let
errorObj
;
if
(
polyLineArr
.
length
>
0
)
{
if
(
polyLineArr
.
length
>
0
)
{
polyLineArr
.
forEach
((
item
)
=>
{
polyLineArr
.
forEach
((
item
)
=>
{
// 获取循报警设备的id
// 获取循报警设备的id
...
@@ -759,7 +761,6 @@ export default {
...
@@ -759,7 +761,6 @@ export default {
if
(
polyline
)
{
if
(
polyline
)
{
let
options
=
polyline
.
getExtData
();
let
options
=
polyline
.
getExtData
();
errorObj
=
polyline
;
// 增加一个报警状态
// 增加一个报警状态
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
options
.
lineData
.
view
=
this
;
options
.
lineData
.
view
=
this
;
...
@@ -783,6 +784,8 @@ export default {
...
@@ -783,6 +784,8 @@ export default {
options
.
lineData
.
alarmValue
=
null
;
options
.
lineData
.
alarmValue
=
null
;
console
.
log
(
"管道"
);
console
.
log
(
"管道"
);
}
else
{
}
else
{
// 报警弹框
this
.
openError
(
polyline
.
getExtData
().
lineData
);
// 报警声音
// 报警声音
this
.
audio
();
this
.
audio
();
polyline
.
setOptions
({
strokeColor
:
"#ff0000"
});
polyline
.
setOptions
({
strokeColor
:
"#ff0000"
});
...
@@ -833,7 +836,6 @@ export default {
...
@@ -833,7 +836,6 @@ export default {
})[
0
];
})[
0
];
if
(
device
)
{
if
(
device
)
{
const
options
=
device
.
getExtData
();
const
options
=
device
.
getExtData
();
errorObj
=
device
;
// 增加一个报警状态
// 增加一个报警状态
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
options
.
view
=
this
;
options
.
view
=
this
;
...
@@ -848,6 +850,8 @@ export default {
...
@@ -848,6 +850,8 @@ export default {
// 报警信息
// 报警信息
options
.
alarmValue
=
null
;
options
.
alarmValue
=
null
;
}
else
{
}
else
{
// 报警弹框
this
.
openError
(
device
.
getExtData
());
// 报警声音
// 报警声音
this
.
audio
();
this
.
audio
();
options
.
alarmState
=
1
;
options
.
alarmState
=
1
;
...
@@ -910,22 +914,28 @@ export default {
...
@@ -910,22 +914,28 @@ export default {
}
}
});
});
}
}
this
.
openError
(
errorObj
.
getExtData
());
// 是报警的推流才会提示
this
.
$refs
.
Bottom
.
repeatClick
();
if
(
this
.
ws
)
return
;
if
(
this
.
ws
)
return
;
this
.
socket
();
this
.
socket
();
},
},
// 右边弹框
// 右边弹框
openError
(
options
)
{
openError
(
options
)
{
this
.
$notify
({
this
.
$nextTick
(()
=>
{
title
:
`
${
options
.
deviceName
}
报警`
,
this
.
$refs
.
Bottom
.
repeatClick
();
dangerouslyUseHTMLString
:
true
,
this
.
$notify
({
duration
:
"30000"
,
title
:
`
${
options
.
deviceName
||
options
.
pipeName
}
报警`
,
message
:
`<div>
dangerouslyUseHTMLString
:
true
,
<div style="color:#000">设备名称:
${
options
.
deviceName
}
</div>
duration
:
"30000"
,
<div style="color:#000">设备编号:
${
options
.
iotNo
}
</div>
message
:
`<div>
<div style="color:#000">设备名称:
${
options
.
deviceName
||
options
.
pipeName
}
</div>
<div style="color:#000">设备编号:
${
options
.
iotNo
||
options
.
pipeCode
}
</div>
</div>`
,
</div>`
,
type
:
"warning"
,
type
:
"warning"
,
});
});
});
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment