Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pudong-elevator-map
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
郭铭瑶
pudong-elevator-map
Commits
809a74a0
Commit
809a74a0
authored
Sep 17, 2020
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改进度为星星标识
parent
96560b87
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
9 deletions
+52
-9
common.js
src/util/common.js
+9
-0
house-map.vue
src/views/house-map.vue
+5
-4
main.vue
src/views/main.vue
+38
-5
No files found.
src/util/common.js
View file @
809a74a0
...
...
@@ -27,6 +27,15 @@ export default{
if
(
ratio
<=
90
)
return
9
if
(
ratio
<=
100
)
return
10
},
switchIcon
(
ratio
)
{
if
(
!
ratio
)
ratio
=
0
if
(
ratio
<
1
)
{
ratio
=
ratio
*
100
}
if
(
ratio
<=
50
)
return
'star1'
if
(
ratio
<=
75
)
return
'star2'
if
(
ratio
<=
100
)
return
'star3'
},
switchColor
(
color
)
{
if
(
!
color
)
return
null
if
(
color
.
indexOf
(
'绿'
)
>=
0
)
return
{
'background-color'
:
'#8fd618'
}
...
...
src/views/house-map.vue
View file @
809a74a0
...
...
@@ -2,7 +2,7 @@
<div
id=
"HouseMapContainer"
>
<div
class=
"icon-tooltip"
>
<p><img
src=
"@/assets/images/focus.png"
/>
重点关注对象
</p>
<
p><img
src=
"@/assets/images/rent.png"
/>
出租房
</p
>
<
!--
<p><img
src=
"@/assets/images/rent.png"
/>
出租房
</p>
--
>
<p><img
src=
"@/assets/images/old.png"
/>
独居高龄老人
</p>
</div>
</div>
...
...
@@ -100,9 +100,10 @@ export default {
addPoints
()
{
// 初始化添加楼栋图标,返回图标集合
const
markerCollection
=
[]
const
mock
=
[
{
lon
:
121.509987
,
lat
:
31.195844
,
address
:
'南码头路451弄9号'
,
icon
:
'rent.png'
},
{
lon
:
121.510955
,
lat
:
31.195374
,
address
:
'南码头路451弄23号'
,
icon
:
'focus.png'
},
{
lon
:
121.511426
,
lat
:
31.196219
,
address
:
'浦三路12弄24号'
,
icon
:
'old.png'
},
{
lon
:
121.509987
,
lat
:
31.195844
,
address
:
'南码头路451弄9号202室'
,
icon
:
'focus.png'
},
{
lon
:
121.510955
,
lat
:
31.195374
,
address
:
'南码头路451弄23号302室'
,
icon
:
'focus.png'
},
{
lon
:
121.511426
,
lat
:
31.196219
,
address
:
'浦三路12弄24号102室'
,
icon
:
'old.png'
},
{
lon
:
121.510068
,
lat
:
31.195045
,
address
:
'南码头路451弄13号201室'
,
icon
:
'old.png'
},
]
const
configMarker
=
item
=>
{
const
marker
=
new
AMap
.
Marker
({
...
...
src/views/main.vue
View file @
809a74a0
...
...
@@ -390,17 +390,18 @@ export default {
addSpecialMarker
()
{
// 添加地图中特殊的标志点(已公告、同意率>50%等)
const
markers
=
[]
this
.
eleDataSource
.
forEach
(
item
=>
{
if
(
item
.
ratio
>
0
)
{
// TODO 应该是同意率>50
if
(
item
.
ratio
>
=
0.5
)
{
// 同意率>50%
const
communityName
=
item
.
sectName
&&
(
item
.
sectName
+
''
).
replace
(
'(补)'
,
''
).
replace
(
'(补)'
,
''
)
const
cur
=
this
.
buildingData
.
building
.
find
(
e
=>
{
const
name
=
e
.
name
&&
(
e
.
name
+
''
).
replace
(
'(补)'
,
''
).
replace
(
'(补)'
,
''
)
return
(
communityName
.
indexOf
(
name
)
>=
0
||
name
.
indexOf
(
communityName
)
>=
0
)
&&
(
e
.
buildingNo
.
indexOf
(
item
.
unitNo
)
>=
0
||
item
.
unitNo
.
indexOf
(
e
.
buildingNo
)
>=
0
)
&&
(
e
.
lon
&&
e
.
lat
)
})
// 查找出返回数据中的同一幢楼栋数据
if
(
!
cur
)
return
const
marker
=
new
AMap
.
Marker
({
position
:
[
cur
.
lon
,
cur
.
lat
],
offset
:
new
AMap
.
Pixel
(
-
10
,
-
65
),
icon
:
new
AMap
.
Icon
({
size
:
[
30
,
45
],
size
:
[
20
,
30
],
image
:
require
(
'@/assets/images/than500.gif'
),
}),
extData
:
{
...
...
@@ -420,6 +421,37 @@ export default {
})
markers
.
push
(
marker
)
}
if
(
item
.
status
==
'1'
)
{
// 状态为已公告
const
communityName
=
item
.
sectName
&&
(
item
.
sectName
+
''
).
replace
(
'(补)'
,
''
).
replace
(
'(补)'
,
''
)
const
cur
=
this
.
buildingData
.
building
.
find
(
e
=>
{
const
name
=
e
.
name
&&
(
e
.
name
+
''
).
replace
(
'(补)'
,
''
).
replace
(
'(补)'
,
''
)
return
(
communityName
.
indexOf
(
name
)
>=
0
||
name
.
indexOf
(
communityName
)
>=
0
)
&&
(
e
.
buildingNo
.
indexOf
(
item
.
unitNo
)
>=
0
||
item
.
unitNo
.
indexOf
(
e
.
buildingNo
)
>=
0
)
&&
(
e
.
lon
&&
e
.
lat
)
})
// 查找出返回数据中的同一幢楼栋数据
if
(
!
cur
)
return
const
marker
=
new
AMap
.
Marker
({
position
:
[
cur
.
lon
,
cur
.
lat
],
offset
:
new
AMap
.
Pixel
(
-
10
,
-
65
),
icon
:
new
AMap
.
Icon
({
size
:
[
20
,
30
],
image
:
require
(
'@/assets/images/notice.gif'
),
}),
extData
:
{
community
:
cur
.
name
,
buildingNo
:
cur
.
buildingNo
,
intention
:
cur
.
intention
,
lon
:
cur
.
lon
,
lat
:
cur
.
lat
,
color
:
cur
.
color
,
...
item
},
}).
on
(
'click'
,
e
=>
{
this
.
detailDrawer
=
true
this
.
detailDrawerData
=
marker
.
getExtData
()
const
{
lon
,
lat
}
=
this
.
detailDrawerData
this
.
showInfoTips
(
e
,
[
e
.
lnglat
.
getLng
(),
e
.
lnglat
.
getLat
()],
marker
.
getExtData
(),
this
.
addPrism
(
lon
,
lat
))
})
markers
.
push
(
marker
)
}
})
this
.
map
.
add
(
markers
)
},
...
...
@@ -432,12 +464,13 @@ export default {
const
curObj
=
buildingDatas
.
find
(
e
=>
e
.
unitNo
.
indexOf
(
item
.
buildingNo
)
>=
0
||
item
.
buildingNo
.
indexOf
(
e
.
unitNo
)
>=
0
)
// 查找出返回数据中的同一幢楼栋数据
if
(
!
curObj
)
return
if
(
item
.
lon
&&
item
.
lat
&&
item
.
intention
)
{
if
(
curObj
.
ratio
<
0.25
)
return
if
(
item
&&
item
.
lon
&&
item
.
lat
&&
item
.
intention
)
{
const
marker
=
new
AMap
.
Marker
({
position
:
[
item
.
lon
,
item
.
lat
],
icon
:
new
AMap
.
Icon
({
size
:
[
30
,
10
],
image
:
require
(
`@/assets/images/
${
this
.
$com
.
switchI
mg
(
curObj
.
ratio
)}
.png`
),
size
:
[
20
,
15
],
image
:
require
(
`@/assets/images/
${
this
.
$com
.
switchI
con
(
curObj
.
ratio
)}
.png`
),
}),
extData
:
{
community
:
item
.
name
,
...
...
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