Commit 48362453 authored by 郭铭瑶's avatar 郭铭瑶 🤘

添加示例图标 addMarker变成初始化就添加(不再需要点击小区)

parent f54d18be
......@@ -12,5 +12,10 @@ default:
export default {
BASE_URL,
STATIC_URL,
// http://211.136.105.193/apiv2/service-report/public/inform/1 //加装 已公告数据
// 0-未签约 1-已公告 2-已开工 3-已完工
// http://211.136.105.193/apiv2/service-report/public/agree //同意率>50%
}
......@@ -18,12 +18,19 @@
</div>
</Panel>
</Collapse>
<Tabs @on-click="handleTabSelect" v-model="curTab" class="tab-menu">
<!-- <Tabs @on-click="handleTabSelect" v-model="curTab" class="tab-menu">
<TabPane label="全部" name="all"/>
<TabPane label="已签约" name="1"/>
<TabPane label="已完工" name="3"/>
<TabPane label="同意>50%" name="4"/>
</Tabs>
</Tabs> -->
<div class="icon-tooltip">
<p><span />不具备条件</p>
<p><span />改造后具备条件</p>
<p><span />已具备条件</p>
<p><img src="@/assets/images/than500.gif"/>意愿征询同意率>50%</p>
<p><img src="@/assets/images/notice.gif"/>已公告加梯幢</p>
</div>
</template>
<Drawer :closable="false" width="24%" v-model="detailDrawer">
<div slot="header">
......@@ -354,11 +361,11 @@ export default {
},
handleView({name, address, location}) { // 点击列表小区名或者地图小区图块事件
this.map.setZoomAndCenter(18, location)
this.addMarker(name)
// this.addMarker(name) // 07-01移至watch中
this.showInfoTips(null, location, {title: name, content: address})
},
addMarker(name) { // 点击小区后展示各楼栋的marker
this.map.remove(this.markerCollection) // 移除之前的marker
// this.map.remove(this.markerCollection) // 移除之前的marker // 07-01注释 为了初始化的时候就全部显示
const markerCollection = []
// const {data} = await axios.get('http://yapi.omniview.pro/mock/279/public/elv/consentRate')
// const mock = [{
......@@ -421,7 +428,9 @@ export default {
const configMarker = item => {
const buildingName = item.name && (item.name + '').replace('(补)', '').replace('(补)', '')
if (buildingName.indexOf(name) < 0 && (item.buildingNo + '').indexOf(name) < 0) return // (筛选出点击的小区的楼栋)楼栋的小区名和name一致则往下走
const curObj = buildingDatas.find(e => e.unitAddr.indexOf(item.buildingNo) >= 0 || item.buildingNo.indexOf(e.unitAddr) >= 0) // 查找出返回数据中的同一幢楼栋数据
// const curObj = buildingDatas.find(e => e.unitAddr.indexOf(item.buildingNo) >= 0 || item.buildingNo.indexOf(e.unitAddr) >= 0) // 查找出返回数据中的同一幢楼栋数据
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) {
const marker = new AMap.Marker({
......@@ -519,6 +528,10 @@ export default {
building: [],
}
this.initLayers()
const communityList = [...this.curStreetData.community]
communityList.forEach(item => {
this.addMarker(item.name)
})
this.addSpecialMarker() // TODO 是否先清除之前的?
}
}
......@@ -587,6 +600,36 @@ export default {
width 3rem
height @width
margin-right 1rem
.icon-tooltip
position absolute
top 1rem
left calc(18% + 2rem)
z-index 100
p
display flex
align-items center
color #000
font-weight bold
margin-bottom 1rem
text-align left
span
display inline-block
width 4rem
height 2rem
margin-right 1rem
&:nth-child(1)
span
background #c60101
&:nth-child(2)
span
background #f6e102
&:nth-child(3)
span
background #95f500
img
width 1.5rem
height auto
margin 0 2rem 0 1.5rem
</style>
<style lang="stylus">
.amap-logo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment