From 9af670c06cad91525b7e9f5f9930d8e0a2ccebb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Thu, 21 Sep 2023 20:00:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/board/GPS/index.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/views/board/GPS/index.vue b/ruoyi-ui/src/views/board/GPS/index.vue index 0181f99..c51ee56 100644 --- a/ruoyi-ui/src/views/board/GPS/index.vue +++ b/ruoyi-ui/src/views/board/GPS/index.vue @@ -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)