Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yangpu
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
郭铭瑶
yangpu
Commits
9c21e29c
Commit
9c21e29c
authored
Oct 29, 2020
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
鹰眼监控功能
parent
2f00baba
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
95 additions
and
7 deletions
+95
-7
index.html
index.html
+1
-0
api.js
src/server/api.js
+1
-0
actions.js
src/store/actions.js
+1
-1
combine.vue
src/views/components/combine.vue
+6
-1
land-population.vue
src/views/components/land-population.vue
+2
-3
right-component.vue
src/views/components/right-component.vue
+6
-1
smart-discover.vue
src/views/components/smart-discover.vue
+11
-1
video-component.vue
src/views/components/video-component.vue
+53
-0
main.vue
src/views/main.vue
+12
-0
hls.js
static/hls.js
+2
-0
No files found.
index.html
View file @
9c21e29c
...
...
@@ -15,6 +15,7 @@
<div
id=
"app"
></div>
<!-- built files will be auto injected -->
</body>
<script
src=
"./static//hls.js"
></script>
<script
src=
"./static/SMap.min.js"
></script>
<!-- <script src="./static/esm/SMap.min.js"></script> -->
<script
src=
"./static/Plugins.min.js"
></script>
...
...
src/server/api.js
View file @
9c21e29c
...
...
@@ -30,4 +30,5 @@ export default {
GET_COMPRESS_COUNT
:
'/dc/countCompressStationsByStreet'
,
// 街道小型压缩站数目
GET_GARBAGE_COUNT
:
'/dc/countPointsByStreet'
,
// 街道垃圾收集点数目
GET_TOILET_COUNT
:
'/dc/countToiletsByStreet'
,
// 街道环卫公厕数目
GET_VIDEO_URL
:
'http://10.89.1.208:7000/hawkeye/api/v1/camera/'
,
}
src/store/actions.js
View file @
9c21e29c
...
...
@@ -32,7 +32,7 @@ export default {
params
:
{
days
:
10
}
}).
then
(
res
=>
{
const
{
content
}
=
res
.
data
const
keys
=
Object
.
keys
(
content
)
const
keys
=
(
content
&&
Object
.
keys
(
content
))
||
[]
const
result
=
keys
.
map
(
key
=>
({
date
:
moment
(
key
).
format
(
'MM.DD'
),
...
content
[
key
],
...
...
src/views/components/combine.vue
View file @
9c21e29c
<
template
>
<div
class=
"combine"
>
<m-scroll
:length=
"list.length"
:limit=
"2"
>
<m-scroll
v-if=
"list.length > 0"
:length=
"list.length"
:limit=
"2"
>
<div
@
click=
"$emit('select', item)"
class=
"detail"
v-for=
"item in list"
:key=
"item.id"
>
<div>
<h5>
{{
item
.
communityName
}}
</h5>
...
...
@@ -23,6 +23,7 @@
<m-step
class=
"combine-step"
:steps=
"steps"
:current=
"getCurrent(item)"
/>
</div>
</m-scroll>
<div
v-else
class=
"no-data"
>
— 暂无数据 —
</div>
</div>
</
template
>
...
...
@@ -62,6 +63,10 @@ export default {
<
style
lang=
"stylus"
scoped
>
.combine
.no-data
width 100%
height 100%
$flex-center()
.detail
background $section-bg
padding .05rem .1rem .2rem
...
...
src/views/components/land-population.vue
View file @
9c21e29c
...
...
@@ -3,7 +3,7 @@
<div
class=
"labels"
>
<p
v-for=
"label in labels"
:key=
"label"
>
{{
label
}}
</p>
</div>
<div
class=
"content"
v-for=
"
item in list"
:key=
"item.label
"
>
<div
class=
"content"
v-for=
"
(item, index) in list"
:key=
"item.label + index
"
>
<p>
{{
item
.
label
}}
</p>
<div>
<div
v-for=
"(child, i) in item.data"
:key=
"i"
>
...
...
@@ -26,8 +26,7 @@ export default {
},
computed
:
{
list
()
{
const
{
year1
,
year2
,
year3
}
=
this
.
$store
.
state
.
landPopulationInfo
if
(
!
year1
||
!
year2
||
!
year3
)
return
[]
const
{
year1
=
{},
year2
=
{},
year3
=
{}}
=
this
.
$store
.
state
.
landPopulationInfo
const
{
density1
=
0
}
=
year1
const
{
year
:
label2
=
''
,
area
:
area2
=
0
,
registered_population
:
population2
=
0
,
population_density
:
density2
=
0
}
=
year2
const
{
year
:
label3
=
''
,
area
:
area3
=
0
,
registered_population
:
population3
=
0
,
population_density
:
density3
=
0
}
=
year3
...
...
src/views/components/right-component.vue
View file @
9c21e29c
...
...
@@ -42,7 +42,12 @@ export default {
methods
:
{
handleClick
(
i
)
{
const
{
id
}
=
this
.
$store
.
state
.
videoInfo
[
i
]
this
.
$emit
(
'select'
,
id
)
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_VIDEO_URL
+
id
,
showLoading
:
true
,
}).
then
(
res
=>
{
this
.
$emit
(
'video'
,
this
.
$com
.
confirm
(
res
,
'payload.url'
))
})
}
},
}
...
...
src/views/components/smart-discover.vue
View file @
9c21e29c
...
...
@@ -17,7 +17,10 @@
</div>
</div>
</div>
<div
class=
"chart"
><m-chart
:config=
"config"
:data=
"$store.state.discoverTrend"
:options=
"options"
/></div>
<div
class=
"chart"
>
<m-chart
v-if=
"discoverTrend.length > 0"
:config=
"config"
:data=
"discoverTrend"
:options=
"options"
/>
<div
v-else
class=
"no-data"
>
— 暂无数据 —
</div>
</div>
</div>
</
template
>
...
...
@@ -47,6 +50,9 @@ export default {
}
},
computed
:
{
discoverTrend
()
{
return
this
.
$store
.
state
.
discoverTrend
},
curSmartType
()
{
return
this
.
$store
.
state
.
curSmartType
},
...
...
@@ -77,6 +83,10 @@ export default {
<
style
lang=
"stylus"
scoped
>
.smart-discover
.no-data
width 100%
height 100%
$flex-center()
.sum
display flex
margin-bottom .05rem
...
...
src/views/components/video-component.vue
0 → 100644
View file @
9c21e29c
<
template
>
<div
class=
"video-component"
>
<video
v-if=
"isVideo"
class=
"video"
ref=
"video"
autoplay=
"autoplay"
controls
>
您的浏览器不支持播放此视频。
</video>
<iframe
v-else
class=
"video"
:src=
"videoSrc"
frameborder=
"0"
/>
</div>
</
template
>
<
script
>
const
{
Hls
}
=
window
export
default
{
name
:
'VideoComponent'
,
props
:
{
videoSrc
:
{
type
:
String
,
required
:
true
,
}
},
computed
:
{
isVideo
()
{
return
this
.
videoSrc
&&
this
.
videoSrc
.
indexOf
(
'm3u8'
)
>=
0
},
},
mounted
()
{
this
.
$nextTick
(
this
.
play
)
},
methods
:
{
play
()
{
const
{
video
}
=
this
.
$refs
if
(
Hls
.
isSupported
()){
const
hls
=
new
Hls
()
hls
.
loadSource
(
this
.
videoSrc
)
hls
.
attachMedia
(
video
)
hls
.
on
(
Hls
.
Events
.
MANIFEST_PARSED
,
()
=>
{
video
.
play
()
})
}
else
if
(
video
.
canPlayType
(
'application/vnd.apple.mpegurl'
)){
video
.
src
=
this
.
videoSrc
video
.
addEventListener
(
'canplay'
,
()
=>
{
video
.
play
()
})
}
},
},
}
</
script
>
<
style
lang=
"stylus"
scoped
>
.video-component
.video
width 100%
height 100%
</
style
>
src/views/main.vue
View file @
9c21e29c
...
...
@@ -20,6 +20,7 @@
area=
"right"
@
patrol=
"handleMapClick"
@
handle=
"handleMapClick"
@
video=
"handleViewVideo"
/>
</m-animate>
<MapBtns
v-model=
"fullView"
@
zoomin=
"zoom('in')"
@
zoomout=
"zoom('out')"
/>
...
...
@@ -32,6 +33,9 @@
<m-modal
title=
"指挥体系"
:value=
"showCommandModal"
@
close=
"$store.commit('SET_COMMAND_MODAL', false)"
>
<m-form
:label-width=
".7"
:model=
"commandData"
:layout=
"commandLayout"
/>
</m-modal>
<m-modal
title=
"鹰眼监控"
v-model=
"videoModal"
>
<VideoComponent
v-if=
"videoModal"
:videoSrc=
"videoSrc"
/>
</m-modal>
</m-grid>
</
template
>
...
...
@@ -39,6 +43,7 @@
import
LeftComponent
from
'./components/left-component'
import
RightComponent
from
'./components/right-component'
import
MapBtns
from
'./components/map-btns'
import
VideoComponent
from
'./components/video-component'
import
{
mapState
,
mapActions
}
from
'vuex'
export
default
{
name
:
'Main'
,
...
...
@@ -46,11 +51,14 @@ export default {
LeftComponent
,
RightComponent
,
MapBtns
,
VideoComponent
,
},
data
()
{
return
{
complete
:
false
,
fullView
:
false
,
videoModal
:
false
,
videoSrc
:
null
,
detailModal
:
false
,
patrolModal
:
false
,
smartPoints
:
null
,
...
...
@@ -221,6 +229,10 @@ export default {
}),
})
},
handleViewVideo
(
src
)
{
this
.
videoSrc
=
src
this
.
videoModal
=
true
},
zoom
(
type
)
{
if
(
type
===
'in'
)
this
.
$refs
.
map
.
zoomIn
()
else
this
.
$refs
.
map
.
zoomOut
()
...
...
static/hls.js
0 → 100644
View file @
9c21e29c
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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