Commit 674ce04f by 前端

修复bug

1 parent 2953c558
......@@ -272,7 +272,7 @@ export default {
})
.catch((error) => {
console.log(error);
//window.location.reload();
window.location.reload();
});
},
......@@ -303,10 +303,10 @@ export default {
// _this.mouseTool.close();
// return false;
// }
if (_zoom < 14) {
_this.map.setZoom(14);
if (_zoom < 11) {
_this.map.setZoom(11);
}
_this.map.setZooms([14, 30]);
_this.map.setZooms([11, 30]);
if (_this.mouseTool) {
_this.mouseTool.rectangle({
......@@ -667,7 +667,7 @@ export default {
// 执行查询设备号
if (query.menuId == 2 && query.sn) {
this.getLocation();
//this.getLocation();
}
// 如果是地址,则标记出对应的点
......@@ -676,12 +676,12 @@ export default {
this.autoCenterMarker = mapService.createMarker(poi);
this.map.add(this.autoCenterMarker);
}
this.drawRectangle(query)
this.getAreaLocation()
this.drawRectangle(query);
this.getAreaLocation();
},
// 绘画矩形
drawRectangle(query){
drawRectangle(query) {
let leftLngLat = query.leftLngLat.split(",");
let rightLngLat = query.rightLngLat.split(",");
let southWest = new AMap.LngLat(leftLngLat[0], leftLngLat[1]);
......@@ -701,11 +701,11 @@ export default {
this.calculateWidthHeight(rectangle.getOptions().bounds);
let _zoom = this.map.getZoom();
if (_zoom < 14) {
this.map.setZoom(14);
if (_zoom < 11) {
this.map.setZoom(11);
}
this.map.setZooms([14, 30]);
this.map.setZooms([11, 30]);
this.map.setFitView();
},
......@@ -719,11 +719,15 @@ export default {
m.menuId = this.menuId;
// 根据地址查询
if (this.menuId == 1) {
m.address = this.form.address;
//m.address = this.form.address;
m.lng = poi.location ? poi.location.lng : "";
m.lat = poi.location ? poi.location.lat : "";
}
if (this.form.address) {
m.address = this.form.address;
}
if (this.menuId == 2) {
m.sn = this.form.sn;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!