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 @@