修改颜色

dev
夜笙歌 1 year ago
parent 3816bcbcd4
commit 9af670c06c

@ -193,13 +193,13 @@ export default {
});
map.add(text)
},
setPolygon(position) {
setPolygon(position,val) {
let e = position.map(val => {
return [val.longitude, val.latitude]
})
let thisPolygon = new AMap.Polygon({
path: e,
fillColor: e ? '#ff0000' : '#1791fc',
fillColor: val>0 ? '#ff0000' : '#1791fc',
});
map.add(thisPolygon)
map.setFitView()
@ -214,7 +214,7 @@ export default {
strokeOpacity: 0.2,
fillOpacity: 0.4,
strokeDasharray: [10, 10],
fillColor: e ? '#ff0000' : '#1791fc',
fillColor: e>0 ? '#ff0000' : '#1791fc',
})
map.add(circle);
map.setFitView()
@ -289,7 +289,7 @@ export default {
const {data} = await ElectronicNumVo(this.$store.getters.sceneId)
data.forEach(e => {
if (e.areaPoints?.length > 0) {
this.setPolygon(e.areaPoints)
this.setPolygon(e.areaPoints,e.abnormalCount)
}
if (e.centerPoint) {
this.setCircle([e.centerPoint.longitude, e.centerPoint.latitude], e.radius, e.abnormalCount)

Loading…
Cancel
Save