This commit is contained in:
liuye
2022-10-10 17:19:16 +08:00
parent 9df5e447eb
commit 71261b4a82

View File

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