diff --git a/src/views/sponeScreen/waterFlood/index.vue b/src/views/sponeScreen/waterFlood/index.vue index bdb6981..4793f58 100644 --- a/src/views/sponeScreen/waterFlood/index.vue +++ b/src/views/sponeScreen/waterFlood/index.vue @@ -64,6 +64,7 @@ rtuWarnRecordRealtimeDetail().then(res => { console.log('实时告警数据---', res.data); let datas = res.data || []; + let key = 'warning_monitor'; if (datas.length > 0) { // 渲染报警图层 let warningFeatures = []; @@ -75,7 +76,6 @@ }); let warningGeojson = turf.featureCollection(warningFeatures); bus.emit('removeMapDatas', ['warning_monitor']); - let key = 'warning_monitor'; bus.emit('getGeojsonByType', { type: key, callback: geojson => {