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
d5fa099d
Commit
d5fa099d
authored
Dec 31, 2020
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地图网格功能暂存
parent
d30cb1ef
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1527 additions
and
31 deletions
+1527
-31
.gitignore
.gitignore
+1
-1
index.html
index.html
+3
-0
monitor-map.vue
src/components/MonitorComponents/MonitorMap/monitor-map.vue
+61
-2
api.js
src/server/api.js
+5
-3
actions.js
src/store/actions.js
+0
-7
application.vue
src/views/components/application.vue
+20
-16
main.vue
src/views/main.vue
+16
-2
GeoTask.min.js
static/GeoTask.min.js
+2
-0
README-new.md
static/README-new.md
+1419
-0
No files found.
.gitignore
View file @
d5fa099d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# Logs
# Logs
logs
logs
*.log
*.log
*.DS_Store
s
*.DS_Store
npm-debug.log*
npm-debug.log*
yarn-debug.log*
yarn-debug.log*
yarn-error.log*
yarn-error.log*
...
...
index.html
View file @
d5fa099d
...
@@ -18,8 +18,11 @@
...
@@ -18,8 +18,11 @@
<!-- built files will be auto injected -->
<!-- built files will be auto injected -->
</body>
</body>
<script
src=
"./static/hls.js"
></script>
<script
src=
"./static/hls.js"
></script>
<!-- 下面是开发用 -->
<script
src=
"./static/SMap.min.js"
></script>
<script
src=
"./static/SMap.min.js"
></script>
<!-- 下面是生产用 -->
<!-- <script src="./static/esm/SMap.min.js"></script> -->
<!-- <script src="./static/esm/SMap.min.js"></script> -->
<script
src=
"./static/Plugins.min.js"
></script>
<script
src=
"./static/Plugins.min.js"
></script>
<script
src=
"./static/GeoTask.min.js"
></script>
</html>
</html>
src/components/MonitorComponents/MonitorMap/monitor-map.vue
View file @
d5fa099d
...
@@ -3,12 +3,13 @@
...
@@ -3,12 +3,13 @@
</
template
>
</
template
>
<
script
>
<
script
>
const
{
SMap
,
Plugins
}
=
window
const
{
SMap
,
Plugins
,
GeoTask
}
=
window
export
default
{
export
default
{
name
:
'MonitorMap'
,
name
:
'MonitorMap'
,
data
()
{
data
()
{
return
{
return
{
map
:
null
,
map
:
null
,
identifytask
:
null
,
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -31,6 +32,7 @@ export default {
...
@@ -31,6 +32,7 @@ export default {
// this.map.hideXQ_Poly()
// this.map.hideXQ_Poly()
this
.
map
.
hideXQ_Point
()
this
.
map
.
hideXQ_Point
()
this
.
map
.
hideMPZ
()
this
.
map
.
hideMPZ
()
this
.
addGridListener
()
this
.
addListener
()
this
.
addListener
()
this
.
$emit
(
'complete'
)
this
.
$emit
(
'complete'
)
})
})
...
@@ -44,9 +46,66 @@ export default {
...
@@ -44,9 +46,66 @@ export default {
this
.
$emit
(
'event'
,
res
.
results
[
0
].
graphic
.
attributes
)
this
.
$emit
(
'event'
,
res
.
results
[
0
].
graphic
.
attributes
)
}
}
})
})
const
param
=
{
layerUniqueId
:
'aaa'
,
url
:
'http://10.81.71.243:23456/hmfmstest/gisshare/C/rest/services/YPZRWG/MapServer'
,
displayed
:
false
,
//查询接口是否在地图上显示
tolerance
:
5
,
geometry
:
eventParamter
.
mapPoint
}
this
.
identifytask
.
MapService
(
param
).
then
(
res
=>
{
if
(
res
.
results
&&
res
.
results
.
length
>
0
)
{
this
.
$emit
(
'grid'
,
res
.
results
[
0
].
feature
.
attributes
)
}
})
})
})
},
},
addGridListener
()
{
this
.
identifytask
=
new
GeoTask
.
Identify
(
this
.
map
.
view
)
// this.identifytask.on(SMap.MapEvent.pointermove, (result, geometry) => {
// console.log('----', result, geometry)
// if (geometry) {
// this.map.view.popup.defaultPopupTemplateEnabled = true
// this.map.view.popup.autoOpenEnabled = false
// this.map.view.popup.open({
// location: geometry,
// title: result.attributes.name,
// content: createContentpopup(result.attributes),
// })
// }
// })
},
addGrid
(
name
)
{
return
SMap
.
load
([
'esri/Map'
,
'esri/layers/FeatureLayer'
,
'esri/renderers/SimpleRenderer'
,
'esri/symbols/SimpleMarkerSymbol'
]).
then
(([,
FeatureLayer
])
=>
{
const
gridLayer
=
new
FeatureLayer
({
url
:
'http://10.81.71.243:23456/hmfmstest/gisshare/C/rest/services/YPZRWG/MapServer/0'
,
renderer
:
{
type
:
'simple'
,
symbol
:
{
type
:
'simple-fill'
,
color
:
'rgba(255,235,59,.3)'
,
outline
:
{
// color: [128, 128, 128, 0.5],
color
:
[
0
,
0
,
0
,
1
],
width
:
2
}
}
},
definitionExpression
:
`所属街 = '
${
name
}
'`
,
id
:
'grid'
})
this
.
map
.
view
.
map
.
add
(
gridLayer
)
return
gridLayer
})
},
removeGrid
()
{
this
.
map
.
removeLayer
(
'grid'
)
},
// 添加点
// 添加点
addPoint
({
key
,
data
,
labelKey
=
null
,
icon
=
'test.png'
,
size
=
14
,
color
})
{
addPoint
({
key
,
data
,
labelKey
=
null
,
icon
=
'test.png'
,
size
=
14
,
color
})
{
if
(
!
this
.
map
)
return
if
(
!
this
.
map
)
return
...
...
src/server/api.js
View file @
d5fa099d
let
BASE_URL
=
''
let
BASE_URL
=
''
let
DATA_URL
=
''
let
DATA_URL
=
''
let
VIDEO_URL
=
''
switch
(
process
.
env
.
NODE_ENV
)
{
switch
(
process
.
env
.
NODE_ENV
)
{
case
'production'
:
case
'production'
:
// BASE_URL = 'http://10.89.4.164:18080/api'
// BASE_URL = 'http://10.89.4.164:18080/api'
// VIDEO_URL = 'http://10.89.4.179:27343
/api/v1/camera
'
// VIDEO_URL = 'http://10.89.4.179:27343'
BASE_URL
=
'http://yangpu.hm.omniview.pro/api'
BASE_URL
=
'http://yangpu.hm.omniview.pro/api'
VIDEO_URL
=
'http://10.89.1.208:7000/hawkeye'
VIDEO_URL
=
'http://10.89.1.208:7000/hawkeye'
DATA_URL
=
'http://10.89.1.208:10005'
DATA_URL
=
'http://10.89.1.208:10005'
break
break
default
:
default
:
BASE_URL
=
'http://yangpu.hm.omniview.pro/api'
BASE_URL
=
'http://yangpu.hm.omniview.pro/api'
VIDEO_URL
=
'http://10.89.1.208:7000/hawkeye'
DATA_URL
=
'http://10.89.1.208:10005'
DATA_URL
=
'http://10.89.1.208:10005'
}
}
export
default
{
export
default
{
...
@@ -41,7 +43,7 @@ export default {
...
@@ -41,7 +43,7 @@ export default {
GET_COMPRESS_COUNT
:
'/dc/countCompressStationsByStreet'
,
// 街道小型压缩站数目
GET_COMPRESS_COUNT
:
'/dc/countCompressStationsByStreet'
,
// 街道小型压缩站数目
GET_GARBAGE_COUNT
:
'/dc/countPointsByStreet'
,
// 街道垃圾收集点数目
GET_GARBAGE_COUNT
:
'/dc/countPointsByStreet'
,
// 街道垃圾收集点数目
GET_TOILET_COUNT
:
'/dc/countToiletsByStreet'
,
// 街道环卫公厕数目
GET_TOILET_COUNT
:
'/dc/countToiletsByStreet'
,
// 街道环卫公厕数目
GET_
STREET_BASIC
:
'/dc/getStreetGridPowerByStreetGridId'
,
// 街道基数
GET_
GRID_PERSON
:
'/dc/getStreetGridPowerByStreetGridId'
,
// 网格人员信息
GET_VIDEO_URL
:
VIDEO_URL
+
'/api/v1/camera/'
,
// 后面接id获取视频地址
GET_VIDEO_URL
:
VIDEO_URL
+
'/api/v1/camera/'
,
// 后面接id获取视频地址
GET_HEALTH_INFO
:
'/service-documents-ddd/public/property/health/degree'
,
// 物业健康度
GET_HEALTH_INFO
:
'/service-documents-ddd/public/property/health/degree'
,
// 物业健康度
}
}
src/store/actions.js
View file @
d5fa099d
...
@@ -26,7 +26,6 @@ export default {
...
@@ -26,7 +26,6 @@ export default {
dispatch
(
'getDoneList'
)
dispatch
(
'getDoneList'
)
dispatch
(
'getHealthInfo'
)
dispatch
(
'getHealthInfo'
)
// dispatch('getInspection')
// dispatch('getInspection')
// dispatch('getStreetBasic')
},
},
async
getGreenInfo
({
commit
})
{
async
getGreenInfo
({
commit
})
{
const
result
=
[
const
result
=
[
...
@@ -187,10 +186,4 @@ export default {
...
@@ -187,10 +186,4 @@ export default {
// console.log('res --', res)
// console.log('res --', res)
// })
// })
// }
// }
// getStreetBasic({commit}) { // 街道基数
// ajax.get({url: api.DATA_URL + api.GET_STREET_BASIC, params: {street: '五角场街道', gridId: 10027}}).then(res => {
// console.log('basic', com.confirm(res, 'data.content', {}))
// // commit('SET_STREET_BASIC', com.confirm(res, 'data.content', {}))
// })
// },
}
}
src/views/components/application.vue
View file @
d5fa099d
<
template
>
<
template
>
<div
class=
"application"
>
<div
class=
"application"
>
<
div
v-for=
"item in list"
:key=
"item.name"
@
click
.
prevent=
"handleClick(item.key)
"
>
<
template
v-for=
"item in list
"
>
<div
v-if=
"'all'==item.type"
>
<div
<img
:src=
"require(`@/assets/images/$
{item.icon}`)" />
v-if=
"'all' == item.type || currentStreetInfo.name.indexOf(item.type) >= 0"
<p>
{{
item
.
name
}}
</p>
:key=
"item.name"
</div>
@
click
.
prevent=
"handleClick(item.key, item.url)"
<div
v-if=
"$store.state.currentStreetInfo.id==item.type"
>
>
<img
:src=
"require(`@/assets/images/$
{item.icon}`)" />
<img
:src=
"require(`@/assets/images/$
{item.icon}`)" />
<p>
{{
item
.
name
}}
</p>
<p>
{{
item
.
name
}}
</p>
</div>
</div>
</
div
>
</
template
>
</div>
</div>
</template>
</template>
...
@@ -23,20 +23,25 @@ export default {
...
@@ -23,20 +23,25 @@ export default {
{
name
:
'派单系统'
,
icon
:
'app2.png'
,
type
:
'all'
},
{
name
:
'派单系统'
,
icon
:
'app2.png'
,
type
:
'all'
},
{
name
:
'气象系统'
,
icon
:
'app3.png'
,
type
:
'all'
},
{
name
:
'气象系统'
,
icon
:
'app3.png'
,
type
:
'all'
},
{
name
:
'网格系统'
,
icon
:
'app4.png'
,
key
:
'jumpGridPage'
,
type
:
'all'
},
{
name
:
'网格系统'
,
icon
:
'app4.png'
,
key
:
'jumpGridPage'
,
type
:
'all'
},
{
name
:
'五角场商圈'
,
icon
:
'app5.png'
,
type
:
'310110019000'
,
key
:
'jumpSpecicalPage'
},
{
name
:
'五角场商圈'
,
icon
:
'app5.png'
,
type
:
'五角场'
,
key
:
'jumpSpecicalPage'
,
url
:
'https://test.chanchuang.jdcloud.com/shsq/index'
},
{
name
:
'一铺一档'
,
icon
:
'app5.png'
,
type
:
'控江'
,
key
:
'jumpSpecicalPage'
,
url
:
'http://10.216.71.157/ypyd/#/MxbDataShow'
},
]
]
}
}
},
},
computed
:
{
currentStreetInfo
()
{
return
this
.
$store
.
state
.
currentStreetInfo
}
},
methods
:
{
methods
:
{
handleClick
(
key
)
{
handleClick
(
key
,
url
=
''
)
{
key
&&
this
[
key
]()
key
&&
this
[
key
](
url
)
},
},
jumpSpecicalPage
(){
jumpSpecicalPage
(
url
){
const
{
specialUrl
}
=
this
.
$store
.
state
.
currentStreetInfo
url
&&
window
.
open
(
url
)
window
.
open
(
specialUrl
)
},
},
jumpGridPage
()
{
jumpGridPage
()
{
const
{
url
}
=
this
.
$store
.
state
.
currentStreetInfo
const
{
url
}
=
this
.
currentStreetInfo
window
.
open
(
url
)
window
.
open
(
url
)
},
},
}
}
...
@@ -47,11 +52,10 @@ export default {
...
@@ -47,11 +52,10 @@ export default {
.application
.application
display flex
display flex
align-items center
align-items center
justify-content space-around
>div
>div
flex 1
text-align center
text-align center
cursor pointer
cursor pointer
padding 0 .05rem
&:hover
&:hover
box-shadow 0 .3rem 0.1rem 0.05rem rgba(0,0,0,0.2)
box-shadow 0 .3rem 0.1rem 0.05rem rgba(0,0,0,0.2)
img
img
...
...
src/views/main.vue
View file @
d5fa099d
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
gap=
"0.05rem"
gap=
"0.05rem"
:complete=
"complete"
:complete=
"complete"
>
>
<m-map
ref=
"map"
@
complete=
"mapComplete"
@
event=
"handleMapClick"
/>
<m-map
ref=
"map"
@
complete=
"mapComplete"
@
event=
"handleMapClick"
@
grid=
"handleGridClick"
/>
<m-title
area=
"title"
:bgImg=
"require('@/assets/images/title-bg.png')"
>
{{
currentStreetInfo
.
name
}}
城市运行平台
</m-title>
<m-title
area=
"title"
:bgImg=
"require('@/assets/images/title-bg.png')"
>
{{
currentStreetInfo
.
name
}}
城市运行平台
</m-title>
<m-animate
enter=
"fadeInLeft"
leave=
"fadeOutLeft"
>
<m-animate
enter=
"fadeInLeft"
leave=
"fadeOutLeft"
>
<LeftComponent
v-show=
"!fullView"
area=
"left"
/>
<LeftComponent
v-show=
"!fullView"
area=
"left"
/>
...
@@ -143,6 +143,7 @@ export default {
...
@@ -143,6 +143,7 @@ export default {
],
],
doneModal
:
false
,
doneModal
:
false
,
doneData
:
{},
doneData
:
{},
gridLayer
:
null
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -203,12 +204,14 @@ export default {
...
@@ -203,12 +204,14 @@ export default {
this
.
initMapFocus
()
this
.
initMapFocus
()
map
.
addPolygon
({
paths
:
this
.
$store
.
state
.
streetPaths
[
id
],
fillColor
:
'rgba(51,145,255,.3)'
})
map
.
addPolygon
({
paths
:
this
.
$store
.
state
.
streetPaths
[
id
],
fillColor
:
'rgba(51,145,255,.3)'
})
map
.
addBoundary
({
name
:
name
})
map
.
addBoundary
({
name
:
name
})
this
.
gridLayer
=
map
.
addGrid
(
this
.
currentStreetInfo
.
name
)
},
},
initMapFocus
()
{
initMapFocus
()
{
const
{
center
}
=
this
.
currentStreetInfo
const
{
center
}
=
this
.
currentStreetInfo
this
.
$refs
.
map
.
focus
(...
center
,
5.5
)
this
.
$refs
.
map
.
focus
(...
center
,
5.5
)
},
},
handleMapClick
(
data
)
{
handleMapClick
(
data
)
{
if
(
!
data
)
return
if
(
data
.
key
===
'camera'
)
{
if
(
data
.
key
===
'camera'
)
{
const
{
deviceGbcode
,
deviceName
}
=
data
const
{
deviceGbcode
,
deviceName
}
=
data
this
.
$ajax
.
get
({
this
.
$ajax
.
get
({
...
@@ -220,12 +223,23 @@ export default {
...
@@ -220,12 +223,23 @@ export default {
}
else
if
(
data
.
key
===
'patrol'
)
{
}
else
if
(
data
.
key
===
'patrol'
)
{
this
.
patrolData
=
data
this
.
patrolData
=
data
this
.
patrolModal
=
true
this
.
patrolModal
=
true
}
else
{
}
else
if
(
data
.
key
===
'smart'
)
{
this
.
detailData
=
data
this
.
detailData
=
data
this
.
detailModal
=
true
this
.
detailModal
=
true
}
}
// this.$refs.map.focus(data.x || data.gpsx, data.y || data.gpsy, 8)
// this.$refs.map.focus(data.x || data.gpsx, data.y || data.gpsy, 8)
},
},
handleGridClick
(
data
)
{
console
.
log
(
'grid-click'
,
data
)
this
.
$refs
.
map
.
removeGrid
()
// this.$ajax.get({
// url: this.$api.DATA_URL + this.$api.GET_GRID_PERSON,
// params: {street: this.currentStreetInfo.name, gridId: data['网格编']}
// }).then(res => {
// this.gridPersonList = this.$com.confirm(res, 'data.content', [])
// this.gridPersonModal = true
// })
},
handleListClick
(
data
)
{
handleListClick
(
data
)
{
if
(
this
.
handleCurTab
===
'处置中'
)
{
if
(
this
.
handleCurTab
===
'处置中'
)
{
this
.
detailData
=
data
this
.
detailData
=
data
...
...
static/GeoTask.min.js
0 → 100644
View file @
d5fa099d
This diff is collapsed.
Click to expand it.
static/README-new.md
0 → 100644
View file @
d5fa099d
This diff is collapsed.
Click to expand it.
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