.
This commit is contained in:
parent
57a51585d2
commit
540f96cb3a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user