From 33874f5179c646753e08da4201e4af86ab78a6ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E9=92=A6?= <360013221@qq.com> Date: Fri, 12 Apr 2024 17:58:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9C=B0=E5=9B=BE=E8=B7=AF?= =?UTF-8?q?=E5=86=B5=E5=9B=BE=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/components/AMapContainer/index.vue | 18 ++++++++++ .../CrowdnessIndicatorRankings/index.vue | 34 +++++++++++++------ .../control/event/commandDispatch/index.vue | 20 +++++------ 3 files changed, 51 insertions(+), 21 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue index 02814e3d..5a217264 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue @@ -53,6 +53,16 @@ export default { Vue.prototype.mapIns = this.aMapIns; + // 实时路况图层 + this.trafficLayer = new this.AMap.TileLayer.Traffic({ + zIndex: 99999999999, + zooms: [7, 22], + visible: false, + }); + this.trafficLayer.setMap(this.aMapIns); + this.trafficLayer.hide(); + + this.aMapIns.on("complete", () => { //map渲染完成 this.loading = false; this.$emit("update:isGisCompleted", true); @@ -211,6 +221,14 @@ export default { mapIns: this.aMapIns, }; }, + showRoadConditions(visible){ + if(visible){ + this.trafficLayer.show(); + } else { + this.trafficLayer.hide(); + } + + } }, // unmounted() { beforeDestroy() { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/CrowdnessIndicatorRankings/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/CrowdnessIndicatorRankings/index.vue index 142646bc..49db105a 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/CrowdnessIndicatorRankings/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/CrowdnessIndicatorRankings/index.vue @@ -1,7 +1,7 @@