.
This commit is contained in:
parent
57a51585d2
commit
540f96cb3a
@ -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;
|
||||||
}
|
}
|
||||||
@ -1182,7 +1181,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
Loading…
Reference in New Issue
Block a user