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
c46c56b4
Commit
c46c56b4
authored
Jan 10, 2022
by
耿迪迪
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.61.77.35:9999/gengdidi/gassafety
parents
0ee5d9af
83d1eb52
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
12 deletions
+28
-12
baojing.mp3
gassafety-web/src/assets/mp3/baojing.mp3
+0
-0
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+28
-12
No files found.
gassafety-web/src/assets/mp3/baojing.mp3
0 → 100644
View file @
c46c56b4
File added
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
c46c56b4
<
template
>
<
template
>
<div>
<div>
<div
class=
"audio"
>
<audio
ref=
"audio"
:src=
"mp3Src"
></audio>
</div>
<div
<div
:style=
"
{ height: `${boxHeight}px`, width: `${boxWidth}px` }"
:style=
"
{ height: `${boxHeight}px`, width: `${boxWidth}px` }"
id="container"
id="container"
...
@@ -355,6 +358,7 @@ export default {
...
@@ -355,6 +358,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
mp3Src
:
require
(
"@/assets/mp3/baojing.mp3"
),
lineColor
,
lineColor
,
gaoMap
:
null
,
gaoMap
:
null
,
deviceType
:
false
,
deviceType
:
false
,
...
@@ -515,6 +519,13 @@ export default {
...
@@ -515,6 +519,13 @@ export default {
}
}
},
},
audio
(){
console
.
log
(
"this.$refs.audio.paused"
,
this
.
$refs
.
audio
.
paused
)
if
(
this
.
$refs
.
audio
.
paused
)
{
// this.$refs.audio.paused = false;
this
.
$refs
.
audio
.
play
();
}
},
initMap
()
{
initMap
()
{
let
gaoMap
=
new
gaodeMap
(
process
.
env
.
VUE_APP_MAP_CENTER
);
let
gaoMap
=
new
gaodeMap
(
process
.
env
.
VUE_APP_MAP_CENTER
);
this
.
gaoMap
=
gaoMap
;
this
.
gaoMap
=
gaoMap
;
...
@@ -675,6 +686,9 @@ export default {
...
@@ -675,6 +686,9 @@ export default {
},
},
// 遍历设备改变状态 polyLines markers
// 遍历设备改变状态 polyLines markers
statusChange
(
list
)
{
statusChange
(
list
)
{
// 报警声音
this
.
audio
();
// 过滤报警管道
// 过滤报警管道
const
polyLineArr
=
list
.
filter
((
item
)
=>
{
const
polyLineArr
=
list
.
filter
((
item
)
=>
{
return
item
.
deviceType
==
"0"
;
return
item
.
deviceType
==
"0"
;
...
@@ -771,18 +785,20 @@ export default {
...
@@ -771,18 +785,20 @@ export default {
device
.
setExtData
(
options
);
device
.
setExtData
(
options
);
// 找到是列表里的哪个,改变它的状态,让列表里的这个设备变成红色
// 找到是列表里的哪个,改变它的状态,让列表里的这个设备变成红色
const
myDevice
=
this
.
allList
.
filter
((
item
)
=>
{
const
myDevice
=
this
.
allList
.
filter
((
item
)
=>
{
for
(
let
i
=
0
;
i
<
item
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
item
.
length
;
i
++
)
{
const
iten
=
item
[
i
];
const
iten
=
item
[
i
];
// 不是隐患也不是值班人员
// 不是隐患也不是值班人员
if
(
!
iten
.
troubleId
&&
!
iten
.
userId
)
{
if
(
!
iten
.
troubleId
&&
!
iten
.
userId
)
{
if
(
iten
.
deviceId
==
device
.
getExtData
().
deviceId
)
{
if
(
iten
.
deviceId
==
device
.
getExtData
().
deviceId
)
{
return
true
return
true
;
}
}
}
}
}
}
})[
0
]?.
filter
(
item
=>
{
})[
0
]
return
item
.
deviceId
==
device
.
getExtData
().
deviceId
?.
filter
((
item
)
=>
{
return
item
.
deviceId
==
device
.
getExtData
().
deviceId
;
})[
0
];
})[
0
];
// console.log("myDevice", myDevice);
// console.log("myDevice", myDevice);
myDevice
.
alarmState
=
options
.
alarmState
;
myDevice
.
alarmState
=
options
.
alarmState
;
...
@@ -1469,7 +1485,7 @@ export default {
...
@@ -1469,7 +1485,7 @@ export default {
},
},
// 搜索
// 搜索
async
search
()
{
async
search
()
{
this
.
Clear
();
this
.
Clear
();
map
.
clearMap
();
map
.
clearMap
();
this
.
gaoMap
.
placeSearch
.
clear
();
this
.
gaoMap
.
placeSearch
.
clear
();
if
(
!
(
!
this
.
gaoMap
.
searchSelectAdcode
&&
!
this
.
gaoMap
.
searchSelectName
))
{
if
(
!
(
!
this
.
gaoMap
.
searchSelectAdcode
&&
!
this
.
gaoMap
.
searchSelectName
))
{
...
...
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