Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
H
huamu
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
郭铭瑶
huamu
Commits
65527759
Commit
65527759
authored
Sep 14, 2021
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接入地图功能展示社区居委小区边界
parent
6f6da9e3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
10 deletions
+47
-10
filter-drawer.vue
src/view/components/filter-drawer.vue
+11
-2
map.vue
src/view/components/map.vue
+9
-0
nav-bar.vue
src/view/components/nav-bar.vue
+0
-6
main.vue
src/view/main.vue
+27
-2
No files found.
src/view/components/filter-drawer.vue
View file @
65527759
...
@@ -183,6 +183,8 @@ import { CaretForward, ArrowBack, ArrowForward } from '@vicons/ionicons5'
...
@@ -183,6 +183,8 @@ import { CaretForward, ArrowBack, ArrowForward } from '@vicons/ionicons5'
import
exportIcon
from
'@images/export.svg'
import
exportIcon
from
'@images/export.svg'
import
dot
from
'@images/dot.svg'
import
dot
from
'@images/dot.svg'
const
emit
=
defineEmits
([
'boundary'
])
const
show
=
computed
(()
=>
store
.
state
.
showFilterDrawer
)
const
show
=
computed
(()
=>
store
.
state
.
showFilterDrawer
)
const
close
=
()
=>
{
const
close
=
()
=>
{
store
.
dispatch
(
'getBasicInfo'
)
store
.
dispatch
(
'getBasicInfo'
)
...
@@ -445,9 +447,16 @@ const checkPathThenFetchInfo = () => {
...
@@ -445,9 +447,16 @@ const checkPathThenFetchInfo = () => {
watch
(
watch
(
[()
=>
curArea
.
value
,
()
=>
curCommittee
.
value
,
()
=>
curCommunity
.
value
],
[()
=>
curArea
.
value
,
()
=>
curCommittee
.
value
,
()
=>
curCommunity
.
value
],
()
=>
{
(
[
area
,
committee
,
community
]
)
=>
{
checkPathThenFetchInfo
()
checkPathThenFetchInfo
()
// TODO 地图框出边界并撒点
if
(
community
)
{
emit
(
'boundary'
,
{
type
:
'community'
,
name
:
community
})
}
else
if
(
committee
)
{
emit
(
'boundary'
,
{
type
:
'committee'
,
name
:
committee
})
}
else
if
(
area
)
{
emit
(
'boundary'
,
{
type
:
'area'
,
name
:
area
})
}
// TODO 地图落点
},
},
)
)
</
script
>
</
script
>
...
...
src/view/components/map.vue
View file @
65527759
...
@@ -176,6 +176,15 @@ function showCommittee(name: string) {
...
@@ -176,6 +176,15 @@ function showCommittee(name: string) {
function
showCommunity
(
name
:
string
)
{
function
showCommunity
(
name
:
string
)
{
queryBound
(
0
,
name
)
queryBound
(
0
,
name
)
}
}
defineExpose
({
resetMap
,
switchBM
,
switchJM
,
showStreet
,
showArea
,
showCommittee
,
showCommunity
,
})
// function showBuilding(name: string) {
// function showBuilding(name: string) {
// window.sceneView
// window.sceneView
// .whenLayerView(window.sceneLayer0)
// .whenLayerView(window.sceneLayer0)
...
...
src/view/components/nav-bar.vue
View file @
65527759
...
@@ -95,9 +95,6 @@
...
@@ -95,9 +95,6 @@
:search-key=
"searchKey"
:search-key=
"searchKey"
@
select=
"handleSelect"
@
select=
"handleSelect"
/>
/>
<FilterDrawer
/>
<ActivityDrawer
/>
<StructModal
/>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -106,9 +103,6 @@ import store from '@/store'
...
@@ -106,9 +103,6 @@ import store from '@/store'
import
{
useFetchOrg
,
useFetchMember
}
from
'@/hooks/useFetch'
import
{
useFetchOrg
,
useFetchMember
}
from
'@/hooks/useFetch'
import
useDebounce
from
'@/hooks/useDebounce'
import
useDebounce
from
'@/hooks/useDebounce'
import
SearchModal
from
'./search-modal.vue'
import
SearchModal
from
'./search-modal.vue'
import
FilterDrawer
from
'./filter-drawer.vue'
import
ActivityDrawer
from
'./activity-drawer.vue'
import
StructModal
from
'./struct-modal.vue'
import
nav1
from
'@images/nav1.svg'
import
nav1
from
'@images/nav1.svg'
import
nav2
from
'@images/nav2.svg'
import
nav2
from
'@images/nav2.svg'
import
nav3
from
'@images/nav3.svg'
import
nav3
from
'@images/nav3.svg'
...
...
src/view/main.vue
View file @
65527759
<
template
>
<
template
>
<Map
/>
<Map
ref=
"map"
/>
<NavBar
@
focus=
"showTag = false"
@
blur=
"showTag = true"
/>
<NavBar
@
focus=
"showTag = false"
@
blur=
"showTag = true"
/>
<BasicInfo
:visible=
"showTag"
/>
<BasicInfo
:visible=
"showTag"
/>
<div
v-if=
"showReset"
class=
"reset"
>
<div
v-if=
"showReset"
class=
"reset"
@
click=
"resetMap"
>
<n-icon
class=
"icon"
size=
".14rem"
>
<n-icon
class=
"icon"
size=
".14rem"
>
<svg-icon
:data=
"reset"
original
/>
<svg-icon
:data=
"reset"
original
/>
</n-icon>
</n-icon>
</div>
</div>
<FilterDrawer
@
boundary=
"setBoundary"
/>
<ActivityDrawer
/>
<StructModal
/>
<InforModal
class=
"fix1"
/>
<InforModal
class=
"fix1"
/>
<ListModal
class=
"fix2"
pagination
/>
<ListModal
class=
"fix2"
pagination
/>
<!--
<ActivityDetail
class=
"fix1"
/>
-->
<!--
<ActivityDetail
class=
"fix1"
/>
-->
...
@@ -17,6 +21,9 @@ import { computed, ref } from 'vue'
...
@@ -17,6 +21,9 @@ import { computed, ref } from 'vue'
import
Map
from
'./components/map.vue'
import
Map
from
'./components/map.vue'
import
NavBar
from
'./components/nav-bar.vue'
import
NavBar
from
'./components/nav-bar.vue'
import
BasicInfo
from
'./components/basic-info.vue'
import
BasicInfo
from
'./components/basic-info.vue'
import
FilterDrawer
from
'./components/filter-drawer.vue'
import
ActivityDrawer
from
'./components/activity-drawer.vue'
import
StructModal
from
'./components/struct-modal.vue'
import
InforModal
from
'./components/info-modal.vue'
import
InforModal
from
'./components/info-modal.vue'
import
ListModal
from
'./components/list-modal.vue'
import
ListModal
from
'./components/list-modal.vue'
import
ActivityDetail
from
'./components/activity-detail.vue'
import
ActivityDetail
from
'./components/activity-detail.vue'
...
@@ -25,6 +32,24 @@ import store from '@/store'
...
@@ -25,6 +32,24 @@ import store from '@/store'
const
showTag
=
ref
(
true
)
const
showTag
=
ref
(
true
)
const
showReset
=
computed
(()
=>
store
.
state
.
showBasicInfo
)
const
showReset
=
computed
(()
=>
store
.
state
.
showBasicInfo
)
const
map
=
ref
<
any
>
()
const
resetMap
=
()
=>
map
.
value
&&
map
.
value
.
resetMap
()
const
setBoundary
=
({
type
,
name
}:
{
type
:
string
;
name
:
string
})
=>
{
if
(
!
map
.
value
)
return
switch
(
type
)
{
case
'community'
:
map
.
value
.
showCommunity
(
name
)
break
case
'committee'
:
map
.
value
.
showCommittee
(
name
)
break
case
'area'
:
map
.
value
.
showArea
(
name
)
break
default
:
break
}
}
</
script
>
</
script
>
<
style
lang=
"stylus"
>
<
style
lang=
"stylus"
>
...
...
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