Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jingan-wisdom
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
郭铭瑶
jingan-wisdom
Commits
3e884b08
Commit
3e884b08
authored
Nov 17, 2021
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加gis图层展示
parent
70ae8115
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1731 additions
and
24 deletions
+1731
-24
index.654526b7.css
dist/assets/index.654526b7.css
+1
-1
index.b412d033.js
dist/assets/index.b412d033.js
+1620
-0
index.html
dist/index.html
+2
-2
api.ts
src/ajax/api.ts
+1
-0
gis-icon.png
src/assets/images/gis-icon.png
+0
-0
map-btns.vue
src/view/components/map-btns.vue
+1
-1
map.vue
src/view/components/map.vue
+6
-1
view-page.vue
src/view/view-page.vue
+100
-19
No files found.
dist/assets/index.
00cfd82e
.css
→
dist/assets/index.
654526b7
.css
View file @
3e884b08
This source diff could not be displayed because it is too large. You can
view the blob
instead.
dist/assets/index.
203cae49
.js
→
dist/assets/index.
b412d033
.js
View file @
3e884b08
This diff is collapsed.
Click to expand it.
dist/index.html
View file @
3e884b08
...
@@ -6,10 +6,10 @@
...
@@ -6,10 +6,10 @@
<link
rel=
"icon"
href=
"./favicon.ico"
/>
<link
rel=
"icon"
href=
"./favicon.ico"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
静安智慧房管
</title>
<title>
静安智慧房管
</title>
<script
type=
"module"
crossorigin
src=
"./assets/index.
203cae49
.js"
></script>
<script
type=
"module"
crossorigin
src=
"./assets/index.
b412d033
.js"
></script>
<link
rel=
"modulepreload"
href=
"./assets/vendor.d8be57b6.js"
>
<link
rel=
"modulepreload"
href=
"./assets/vendor.d8be57b6.js"
>
<link
rel=
"stylesheet"
href=
"./assets/vendor.db35e2cd.css"
>
<link
rel=
"stylesheet"
href=
"./assets/vendor.db35e2cd.css"
>
<link
rel=
"stylesheet"
href=
"./assets/index.
00cfd82e
.css"
>
<link
rel=
"stylesheet"
href=
"./assets/index.
654526b7
.css"
>
</head>
</head>
<body>
<body>
...
...
src/ajax/api.ts
View file @
3e884b08
...
@@ -24,4 +24,5 @@ export default {
...
@@ -24,4 +24,5 @@ export default {
EXPAND_INFO
:
EXPAND_INFO
:
'/service-basicdatasync-ddd/public/tbl_community/entity/{id}/ext'
,
// 小区拓展信息
'/service-basicdatasync-ddd/public/tbl_community/entity/{id}/ext'
,
// 小区拓展信息
ELEVATOR
:
'/service-special-ja-ddd/public/elevatorInstallationInfos'
,
// 电梯
ELEVATOR
:
'/service-special-ja-ddd/public/elevatorInstallationInfos'
,
// 电梯
GIS
:
'/service-special-ja-ddd/public/giss'
,
// gis点位
}
}
src/assets/images/gis-icon.png
0 → 100644
View file @
3e884b08
911 Bytes
src/view/components/map-btns.vue
View file @
3e884b08
...
@@ -61,7 +61,7 @@ const btns = computed(() => [
...
@@ -61,7 +61,7 @@ const btns = computed(() => [
hidden
:
props
.
onlyOneView
,
hidden
:
props
.
onlyOneView
,
tip
:
'展示屏配置'
,
tip
:
'展示屏配置'
,
},
},
// { key: 'btn6', icon: btn6
},
{
key
:
'gis'
,
icon
:
btn6
,
tip
:
'gis展示'
},
{
key
:
'reset'
,
icon
:
btn8
,
tip
:
'重置'
},
{
key
:
'reset'
,
icon
:
btn8
,
tip
:
'重置'
},
])
])
const
onClick
=
(
key
:
string
)
=>
{
const
onClick
=
(
key
:
string
)
=>
{
...
...
src/view/components/map.vue
View file @
3e884b08
...
@@ -17,6 +17,7 @@ defineExpose({
...
@@ -17,6 +17,7 @@ defineExpose({
zoomTo
,
zoomTo
,
focus
,
focus
,
addPoints
,
addPoints
,
addPolygon
,
remove
,
remove
,
setCommunityPoints
,
setCommunityPoints
,
})
})
...
@@ -47,7 +48,7 @@ onMounted(async () => {
...
@@ -47,7 +48,7 @@ onMounted(async () => {
})
})
function
onComplete
()
{
function
onComplete
()
{
polygonLayer
=
map
.
add
(
'polygon'
,
{
polygonLayer
=
addPolygon
(
{
data
:
{
data
:
{
path
:
jinganPath
as
[
number
,
number
][],
path
:
jinganPath
as
[
number
,
number
][],
},
},
...
@@ -101,6 +102,10 @@ function addPoints(options) {
...
@@ -101,6 +102,10 @@ function addPoints(options) {
// })
// })
}
}
function
addPolygon
(
options
)
{
return
map
.
add
(
'polygon'
,
options
)
}
function
remove
(
layer
)
{
function
remove
(
layer
)
{
layer
&&
map
.
remove
(
layer
)
layer
&&
map
.
remove
(
layer
)
}
}
...
...
src/view/view-page.vue
View file @
3e884b08
...
@@ -22,23 +22,6 @@
...
@@ -22,23 +22,6 @@
</m-animate>
</m-animate>
</div>
</div>
</m-grid>
</m-grid>
<m-modal
v-model=
"showModal"
title=
"选择展示屏"
>
<div
class=
"list-content"
>
<div
v-for=
"item in list"
:key=
"item.id"
class=
"item"
>
<p
:title=
"item.configName"
>
{{
item
.
configName
}}
</p>
<p>
{{
item
.
updateTime
}}
</p>
<n-button
size=
"tiny"
type=
"info"
ghost
dashed
@
click=
"switchDataView(item)"
>
查看
</n-button>
</div>
</div>
</m-modal>
</div>
</div>
<MapBtns
<MapBtns
:full-screen=
"fullScreen"
:full-screen=
"fullScreen"
...
@@ -46,6 +29,39 @@
...
@@ -46,6 +29,39 @@
:only-one-view=
"onlyOneView"
:only-one-view=
"onlyOneView"
@
touch=
"handleMapBtnsEvents"
@
touch=
"handleMapBtnsEvents"
/>
/>
<m-modal
v-model=
"showModal"
title=
"选择展示屏配置"
>
<div
class=
"list-content"
>
<div
v-for=
"item in list"
:key=
"item.id"
class=
"item"
>
<p
:title=
"item.configName"
>
{{
item
.
configName
}}
</p>
<p>
{{
item
.
updateTime
}}
</p>
<n-button
size=
"tiny"
type=
"info"
ghost
dashed
@
click=
"switchDataView(item)"
>
查看
</n-button>
</div>
</div>
</m-modal>
<m-modal
v-model=
"showGisModal"
title=
"选择GIS图层"
>
<div
class=
"list-content"
>
<div
v-for=
"item in gisTypes"
:key=
"item.value"
class=
"item"
>
<p
:title=
"item.name"
>
{{
item
.
name
}}
</p>
<n-button
size=
"tiny"
type=
"info"
ghost
dashed
@
click=
"switchGisView(item.value)"
>
查看
</n-button>
</div>
</div>
</m-modal>
<m-modal
v-model=
"showCommunityDrawer"
title=
"小区档案"
width=
"80%"
>
<m-modal
v-model=
"showCommunityDrawer"
title=
"小区档案"
width=
"80%"
>
<CommunityInfo
:info=
"communityDetail"
/>
<CommunityInfo
:info=
"communityDetail"
/>
</m-modal>
</m-modal>
...
@@ -82,6 +98,7 @@ import c4 from '@/assets/images/c4.png'
...
@@ -82,6 +98,7 @@ import c4 from '@/assets/images/c4.png'
import
c5
from
'@/assets/images/c5.png'
import
c5
from
'@/assets/images/c5.png'
import
c6
from
'@/assets/images/c6.png'
import
c6
from
'@/assets/images/c6.png'
import
CommunityIcon
from
'@/assets/images/init-point.png'
import
CommunityIcon
from
'@/assets/images/init-point.png'
import
GisIcon
from
'@/assets/images/gis-icon.png'
const
mapRef
=
shallowRef
<
any
>
(
null
)
const
mapRef
=
shallowRef
<
any
>
(
null
)
const
{
layout
}
=
useLayout
()
const
{
layout
}
=
useLayout
()
...
@@ -138,6 +155,63 @@ function switchDataView({ id, configJson }) {
...
@@ -138,6 +155,63 @@ function switchDataView({ id, configJson }) {
const
fullScreen
=
ref
(
false
)
const
fullScreen
=
ref
(
false
)
const
showSearchModal
=
ref
(
false
)
const
showSearchModal
=
ref
(
false
)
const
gisTypes
=
ref
([
{
name
:
'房屋安全排查结果'
,
value
:
'houseSecurity'
},
{
name
:
'多层住宅电梯加装'
,
value
:
'multiHouseElevetor'
},
{
name
:
'新盘清单'
,
value
:
'newHouse'
},
{
name
:
'市政道路'
,
value
:
'cityRoad'
},
{
name
:
'公益性设施'
,
value
:
'commonWealth'
},
{
name
:
'公租房'
,
value
:
'publicRentalHouse'
},
])
const
showGisModal
=
ref
(
false
)
let
polygonLayers
:
any
[]
=
[]
const
switchGisView
=
(
gisType
:
string
)
=>
{
ajax
.
get
({
url
:
api
.
GIS
,
params
:
{
gisType
,
pageSize
:
9000
,
},
})
.
then
((
res
)
=>
{
const
{
content
=
[]
}
=
res
?.
data
||
{}
if
(
gisType
===
'cityRoad'
)
{
addPoints
(
null
)
// 清理之前点位
polygonLayers
=
content
.
map
((
item
)
=>
mapRef
.
value
?.
addPolygon
({
data
:
{
path
:
(
item
.
gisPoint
&&
JSON
.
parse
(
item
.
gisPoint
))?.
map
((
p
)
=>
[
p
.
x
,
p
.
y
,
])
||
[],
},
fillColor
:
'transparent'
,
color
:
'#F7933E'
,
lineWidth
:
1
,
}),
)
}
else
{
addPoints
({
data
:
content
.
map
((
item
)
=>
{
const
{
x
,
y
}
=
(
item
.
gisPointSingle
&&
JSON
.
parse
(
item
.
gisPointSingle
))
||
{}
return
{
id
:
item
.
id
,
gisType
:
item
.
gisType
,
x
,
y
,
}
}),
icon
:
GisIcon
,
size
:
16
,
})
}
showGisModal
.
value
=
false
})
}
function
handleMapBtnsEvents
(
key
:
string
)
{
function
handleMapBtnsEvents
(
key
:
string
)
{
switch
(
key
)
{
switch
(
key
)
{
case
'list'
:
case
'list'
:
...
@@ -175,6 +249,9 @@ function handleMapBtnsEvents(key: string) {
...
@@ -175,6 +249,9 @@ function handleMapBtnsEvents(key: string) {
onMapComplete
()
onMapComplete
()
mapRef
.
value
?.
setCommunityPoints
()
mapRef
.
value
?.
setCommunityPoints
()
break
break
case
'gis'
:
showGisModal
.
value
=
true
break
default
:
default
:
break
break
}
}
...
@@ -196,8 +273,12 @@ function onMapComplete() {
...
@@ -196,8 +273,12 @@ function onMapComplete() {
}
}
function
addPoints
(
data
)
{
function
addPoints
(
data
)
{
mapRef
.
value
?.
remove
(
pointsLayer
)
pointsLayer
&&
mapRef
.
value
?.
remove
(
pointsLayer
)
pointsLayer
=
mapRef
.
value
?.
addPoints
(
data
)
if
(
polygonLayers
.
length
>
0
)
{
polygonLayers
.
forEach
((
layer
)
=>
mapRef
.
value
?.
remove
(
layer
))
polygonLayers
=
[]
}
pointsLayer
=
data
&&
mapRef
.
value
?.
addPoints
(
data
)
mapRef
.
value
?.
focus
([
-
1931.2637583608503
,
4334.0159596985895
],
{
zoom
:
4
})
mapRef
.
value
?.
focus
([
-
1931.2637583608503
,
4334.0159596985895
],
{
zoom
:
4
})
}
}
...
...
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