This commit is contained in:
yanran200730
2022-10-10 17:52:14 +08:00
2 changed files with 4 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
<template>
<ai-list class="resourceList">
<template slot="title">
<ai-title title="社会资源" :isShowBottomBorder="false" :isShowArea="true" v-model="areaId" @change="changeAreaId" :instance="instance">
<ai-title title="社会资源" :isShowBottomBorder="false" :isShowArea="currIndex==1" v-model="areaId" @change="changeAreaId" :instance="instance">
<template slot="sub">
<div>方便成员能够快速找到指定区域内的社区资源</div>
</template>

View File

@@ -55,8 +55,6 @@ export default {
mapLib: null,
type: '',
typeList: [],
fireIcon: require('./img/fire-icon.png'),
fireIconActive: require('./img/fire-icon-active.png'),
isShowInfo: false,
resourceList: [],
chooseResourceId: '',
@@ -119,7 +117,7 @@ export default {
renderMarker(context) {
const resourceId = context.data[0].id
let el = `<img src="${resourceId === this.chooseResourceId ? this.fireIconActive : this.fireIcon}" style="${resourceId === this.chooseResourceId ? 'width:50px;height:50px;' : 'width:38px;height:38px;'}" id="resourceId-${resourceId}" class="mark-icon" />`
let el = `<img src="${context.data[0].icon}" style="${resourceId === this.chooseResourceId ? 'width:50px;height:50px;' : 'width:38px;height:38px;'}" id="resourceId-${resourceId}" class="mark-icon" />`
context.marker.setContent(el);
context.marker.setAnchor("center")
@@ -133,11 +131,9 @@ export default {
document.querySelectorAll('.mark-icon').forEach(el => {
el.style['width'] = '38px'
el.style['height'] = '38px'
el.src = this.fireIcon
})
document.querySelector(`#resourceId-${e.target.id}`).style['width'] = '50px'
document.querySelector(`#resourceId-${e.target.id}`).style['height'] = '50px'
document.querySelector(`#resourceId-${e.target.id}`).src = this.fireIconActive
})
},
@@ -198,7 +194,7 @@ export default {
params: {
current: 1,
size: 1000000,
// areaId: this.areaId,
areaId: this.areaId,
categoryId: this.type
}
}).then(res => {
@@ -210,6 +206,7 @@ export default {
id: item.id,
corpId: item.corpId,
areaName: item.areaName,
icon: item.categoryIcon
}
})
this.addMakert(points)