This commit is contained in:
Iruka 2024-12-18 17:05:44 +08:00
parent 57a51585d2
commit 540f96cb3a

View File

@ -426,12 +426,10 @@
}); });
// //
uni.$on("update-land-indexMap", (e) => { uni.$on("update-land-indexMap", (e) => {
console.error("update-land-indexMap:", e);
this.mapOnload(); this.mapOnload();
}); });
// mqtt // mqtt
uni.$on("mqttMsg-indexMap", (e) => { uni.$on("mqttMsg-indexMap", (e) => {
console.error("mqttMsg-indexMap:", e);
this.mapUpdateMarker(e); this.mapUpdateMarker(e);
}); });
@ -473,24 +471,28 @@
}; };
}, },
methods: { 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) { mapOnload(e) {
console.error("mapOnload");
if (!this.ijs.wo) { if (!this.ijs.wo) {
return; return;
} }
const that = this; 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; that.mapObj.landMap = that.ijs.wo.landMap;
let device = {}; let device = {};
// //
if (that.dc.stations.length) { if (that.dc.stations.length) {
console.error("that.dc.stations:", that.dc.stations);
that.dc.stations.forEach(item => { that.dc.stations.forEach(item => {
if (item.latitude && item.longitude) { if (item.latitude && item.longitude) {
let obj = { let obj = {
@ -573,14 +575,11 @@
} }
}); });
} }
console.error("device:", device);
that.mapObj.davice = device; that.mapObj.davice = device;
that.davice = device; that.davice = device;
}, },
// //
mapUpdateMarker(e) { mapUpdateMarker(e) {
console.error("davice:", this.dc.countdownObj);
if (!this.davice[e.deviceCode]) { if (!this.davice[e.deviceCode]) {
return; return;
} }