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) => {
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;