From ec7567c2cde5db9376ae0961e9ace3370c09566f Mon Sep 17 00:00:00 2001 From: lin <648540858@qq.com> Date: Thu, 13 Nov 2025 16:17:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E5=9D=90=E6=A0=87=E7=B3=BB=E6=97=B6=E6=9C=AA=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=9F=A2=E9=87=8F=E7=93=A6=E7=89=87=E5=9D=90=E6=A0=87?= =?UTF-8?q?=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/storager/impl/RedisCatchStorageImpl.java | 2 +- web/public/static/js/config.js | 2 +- web/src/views/common/MapComponent.vue | 5 ++--- web/src/views/map/index.vue | 9 ++++++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java index 7e45bc596..99dd5bed1 100755 --- a/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java @@ -474,7 +474,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage { public void removePushListItem(String app, String stream, String mediaServerId) { String key = VideoManagerConstants.PUSH_STREAM_LIST + app + "_" + stream; MediaInfo param = (MediaInfo)redisTemplate.opsForValue().get(key); - if (param != null) { + if (param != null && userSetting.getServerId().equals(param.getServerId())) { redisTemplate.delete(key); } } diff --git a/web/public/static/js/config.js b/web/public/static/js/config.js index 43329f722..1bf43500c 100644 --- a/web/public/static/js/config.js +++ b/web/public/static/js/config.js @@ -16,7 +16,7 @@ window.mapParam = { // 默认地图中心点 center:[116.41020, 39.915119], // 地图最大层级 - maxZoom:18, + maxZoom:19, // 地图最小层级 minZoom: 3 } diff --git a/web/src/views/common/MapComponent.vue b/web/src/views/common/MapComponent.vue index 16d3c70eb..ea5b1c97c 100755 --- a/web/src/views/common/MapComponent.vue +++ b/web/src/views/common/MapComponent.vue @@ -97,8 +97,6 @@ export default { url: this.mapTileList[this.mapTileIndex].tilesUrl }) }) - console.log(4444) - console.log(this.mapTileList[this.mapTileIndex].tilesUrl) } else { tileLayer = new Tile({ preload: 4, @@ -150,11 +148,11 @@ export default { }) }, addVectorTileLayer(tileUrl, clickEvent, errorEvent){ + tileUrl += `?geoCoordSys=${this.mapTileList[this.mapTileIndex].coordinateSystem}&accessToken=${this.$store.getters.token}` let source = new VectorTileSource({ format: new MVT(), url: tileUrl }) - let layer = new VectorTileLayer({ source: source, style: function(feature) { @@ -625,6 +623,7 @@ export default { this.mapTileIndex = index window.coordinateSystem = this.mapTileList[this.mapTileIndex].coordinateSystem tileLayer.getSource().setUrl(this.mapTileList[index].tilesUrl) + tileLayer.getSource().refresh() if (mapTileConfig.coordinateSystem !== this.mapTileList[this.mapTileIndex].coordinateSystem) { // 发送通知 this.$emit('coordinateSystemChange', this.mapTileList[this.mapTileIndex].coordinateSystem) diff --git a/web/src/views/map/index.vue b/web/src/views/map/index.vue index 0d0e74914..9e2fa2d4d 100755 --- a/web/src/views/map/index.vue +++ b/web/src/views/map/index.vue @@ -293,6 +293,7 @@ export default { return } this.$refs.mapComponent.changeMapTile(index) + this.changeLayerType(this.layerType) }, clientEvent(data){ this.closeInfoBox() @@ -310,15 +311,17 @@ export default { this.$refs.mapComponent.removeLayer(channelTileLayer) return } + if (channelTileLayer) { + this.$refs.mapComponent.removeLayer(channelTileLayer) + } - let geoCoordSys = this.$refs.mapComponent.getCoordSys() const baseUrl = window.baseUrl ? window.baseUrl : '' let baseApi = ((process.env.NODE_ENV === 'development') ? process.env.VUE_APP_BASE_API : baseUrl) let tileUrl = null if (index === 1) { - tileUrl = baseApi + `/api/common/channel/map/tile/{z}/{x}/{y}?geoCoordSys=${geoCoordSys}&accessToken=${this.$store.getters.token}` + tileUrl = baseApi + '/api/common/channel/map/tile/{z}/{x}/{y}' }else if (index === 2) { - tileUrl = baseApi + `/api/common/channel/map/thin/tile/{z}/{x}/{y}?geoCoordSys=${geoCoordSys}&accessToken=${this.$store.getters.token}` + tileUrl = baseApi + '/api/common/channel/map/thin/tile/{z}/{x}/{y}' } channelTileLayer = this.$refs.mapComponent.addVectorTileLayer(tileUrl, this.clientEvent) },