From 540f96cb3ab7ba24e4ff0476b891338e0f690c43 Mon Sep 17 00:00:00 2001 From: Iruka <1017819588@qq.com> Date: Wed, 18 Dec 2024 17:05:44 +0800 Subject: [PATCH] . --- pages/index-map.vue | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pages/index-map.vue b/pages/index-map.vue index 4a12f1f..3ab7f8b 100644 --- a/pages/index-map.vue +++ b/pages/index-map.vue @@ -426,12 +426,10 @@ }); // 监听地块改变 uni.$on("update-land-indexMap", (e) => { - console.error("update-land-indexMap:", e); this.mapOnload(); }); // 监听mqtt消息 uni.$on("mqttMsg-indexMap", (e) => { - console.error("mqttMsg-indexMap:", e); this.mapUpdateMarker(e); }); @@ -473,24 +471,28 @@ }; }, methods: { + // 地块选择回调 + landChange(e) { + this.title = e.landName; + }, + // 获取地块信息 + getLand(e) { + this.ijs.getLand(e.node).then(res => { + this.$refs.landRef.addLand(e, res.data); + }); + }, //初始化完成回调 mapOnload(e) { - console.error("mapOnload"); if (!this.ijs.wo) { return; } const that = this; - console.error("that.ijs.wo:", that.ijs.wo); - console.error("stations:", that.dc.stations); - console.error("wo:", that.dc.wo); - console.error("valves", that.dc.valves); //地块边界 that.mapObj.landMap = that.ijs.wo.landMap; let device = {}; //地块基站 if (that.dc.stations.length) { - console.error("that.dc.stations:", that.dc.stations); that.dc.stations.forEach(item => { if (item.latitude && item.longitude) { let obj = { @@ -573,14 +575,11 @@ } }); } - console.error("device:", device); that.mapObj.davice = device; that.davice = device; }, //设备状态更新 mapUpdateMarker(e) { - console.error("davice:", this.dc.countdownObj); - if (!this.davice[e.deviceCode]) { return; } @@ -1182,7 +1181,7 @@ } .title { - + font-size: 16px; display: flex; justify-content: space-between;