Commit 674ce04f by 前端

修复bug

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