Commit f0339971 by 前端

Merge branch 'v1.20.0' into 'develop'

V1.20.0版本需求已上线,合并代码到develop

See merge request !33
2 parents 8108a00a 117dc6a5
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
margin-left: 20px; margin-left: 20px;
} }
} }
.map-controll.toleft{
.map-controll.toleft {
left: 150px; left: 150px;
right: calc(100% - 330px) right: calc(100% - 330px)
} }
...@@ -38,11 +39,13 @@ ...@@ -38,11 +39,13 @@
font-size: 16px; font-size: 16px;
} }
} }
.map-bottom-controll.toleft{
.map-bottom-controll.toleft {
left: 20px; left: 20px;
right: calc(100% - 55px); right: calc(100% - 55px);
bottom: 50px; bottom: 50px;
} }
.controll-wrap { .controll-wrap {
position: absolute; position: absolute;
top: 40px; top: 40px;
...@@ -479,7 +482,9 @@ ...@@ -479,7 +482,9 @@
} }
} }
a.fence_btn_grey,a.history_btn_grey,a.resident_btn_grey { a.fence_btn_grey,
a.history_btn_grey,
a.resident_btn_grey {
border: 1px solid #d8d8d8; border: 1px solid #d8d8d8;
color: #999; color: #999;
background: #f2f2f2; background: #f2f2f2;
...@@ -546,7 +551,9 @@ ...@@ -546,7 +551,9 @@
} }
} }
.fence_btn_grey,.history_btn_grey,.resident_btn_grey { .fence_btn_grey,
.history_btn_grey,
.resident_btn_grey {
border: 1px solid #d8d8d8 !important; border: 1px solid #d8d8d8 !important;
color: #999 !important; color: #999 !important;
background: #f2f2f2 !important; background: #f2f2f2 !important;
...@@ -557,3 +564,39 @@ ...@@ -557,3 +564,39 @@
background: #f2f2f2 !important; background: #f2f2f2 !important;
} }
} }
.copy-btn {
cursor: pointer;
}
.map-infowindow-title {
position: relative;
.question_icon {
display:inline-block;
background: url('https://img01.glsx.com.cn/weapp/resource/e-shield/circle-question.png') no-repeat;
background-size: 20px auto;
width: 20px;
height: 20px;
vertical-align: middle;
}
.popover_box {
position: absolute;
background: rgba(0, 0, 0, 0.5);
top: 20px;
right: 0px;
padding:10px;
z-index:2;
border-radius:4px;
color:#fff;
font-size:12px;
p{
margin:0;
}
}
}
.map_info_window {
position: relative;
}
\ No newline at end of file \ No newline at end of file
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
src: { src: {
handler: function (n) { handler: function (n) {
if (n) { if (n) {
console.log(n);
this.imgPath = this.IMAGEURL + n; this.imgPath = this.IMAGEURL + n;
} }
}, },
...@@ -40,7 +39,6 @@ ...@@ -40,7 +39,6 @@
}; };
}, },
created() { created() {
console.log(this.src);
}, },
mounted() {}, mounted() {},
methods: { methods: {
......
...@@ -1319,6 +1319,7 @@ export default { ...@@ -1319,6 +1319,7 @@ export default {
} }
} */ } */
this._drawTimeoutId = setTimeout(() => { this._drawTimeoutId = setTimeout(() => {
this.getPositionData(); this.getPositionData();
}, 10 * 1000); }, 10 * 1000);
......
...@@ -172,6 +172,7 @@ import { ...@@ -172,6 +172,7 @@ import {
import EventBus from "@/event-bus"; import EventBus from "@/event-bus";
import { showToast, deepClone } from "@/utils/utils.js"; import { showToast, deepClone } from "@/utils/utils.js";
import { Validator, CHECK_NUMBER } from "@/common/validator"; import { Validator, CHECK_NUMBER } from "@/common/validator";
import qs from "qs";
export default { export default {
data() { data() {
return { return {
...@@ -236,6 +237,7 @@ export default { ...@@ -236,6 +237,7 @@ export default {
"AMap.AutoComplete", "AMap.AutoComplete",
"AMap.MassMarks", "AMap.MassMarks",
"AMap.MarkerCluster", "AMap.MarkerCluster",
"AMap.Bounds",
]); ]);
if (window.AMap) { if (window.AMap) {
window.AMap = null; window.AMap = null;
...@@ -249,7 +251,7 @@ export default { ...@@ -249,7 +251,7 @@ export default {
.then((AMap) => { .then((AMap) => {
_this.mapLoading = false; _this.mapLoading = false;
window.AMap = AMap; window.AMap = AMap;
_this.map = mapService.init("map", { zoom: 12 }); _this.map = mapService.init("map", { zoom: 11 });
_this.mouseTool = new AMap.MouseTool(_this.map); _this.mouseTool = new AMap.MouseTool(_this.map);
var autoComplete = new AMap.AutoComplete({ var autoComplete = new AMap.AutoComplete({
input: "tipInput", input: "tipInput",
...@@ -258,8 +260,15 @@ export default { ...@@ -258,8 +260,15 @@ export default {
console.log(e); console.log(e);
let poi = e.poi || {}; let poi = e.poi || {};
_this.poi = poi; _this.poi = poi;
_this.$set(_this.form, "address", poi.name);
_this.$refs.addressInput.focus(); _this.$refs.addressInput.focus();
}); });
// 判断是否为全屏,是否带参数,如果带了矩形参数,则默认画一个矩形
let _query = _this.$route.query;
if (_query.type == "full" && _query.leftLngLat) {
this.initPage(_query);
}
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
...@@ -294,10 +303,10 @@ export default { ...@@ -294,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({
...@@ -537,6 +546,8 @@ export default { ...@@ -537,6 +546,8 @@ export default {
async getAreaLocation() { async getAreaLocation() {
let _this = this; let _this = this;
let params = this.getParams(); let params = this.getParams();
let _options = this.$route.query;
console.log(_options);
if (!_this.rectangle) { if (!_this.rectangle) {
showToast({ showToast({
...@@ -550,6 +561,10 @@ export default { ...@@ -550,6 +561,10 @@ export default {
_this.mapMass.clear(); _this.mapMass.clear();
_this.mapMass = null; _this.mapMass = null;
} }
if (_options.type != "full") {
_this.goFullPage();
return false;
}
_this.loading = true; _this.loading = true;
let res = await GER_REGIONAL_SEARCH(params); let res = await GER_REGIONAL_SEARCH(params);
...@@ -633,12 +648,95 @@ export default { ...@@ -633,12 +648,95 @@ export default {
}); });
mass.setMap(_this.map); mass.setMap(_this.map);
this.drawDone = true; this.drawDone = true;
if(arr && arr.length<10){ if (arr && arr.length < 10) {
this.map.setFitView(); this.map.setFitView();
} }
this.mapMass = mass; this.mapMass = mass;
}, },
// 全屏状态下,根据参数初始化页面
initPage(query) {
this.menuId = query.menuId;
if (query.address) {
this.$set(this.form, "address", query.address);
}
if (query.sn) {
this.$set(this.form, "sn", query.sn);
}
// 执行查询设备号
if (query.menuId == 2 && query.sn) {
//this.getLocation();
}
// 如果是地址,则标记出对应的点
if (query.menuId == 1 && query.lng) {
let poi = new AMap.LngLat(query.lng, query.lat);
this.autoCenterMarker = mapService.createMarker(poi);
this.map.add(this.autoCenterMarker);
}
this.drawRectangle(query);
this.getAreaLocation();
},
// 绘画矩形
drawRectangle(query) {
let leftLngLat = query.leftLngLat.split(",");
let rightLngLat = query.rightLngLat.split(",");
let southWest = new AMap.LngLat(leftLngLat[0], leftLngLat[1]);
let northEast = new AMap.LngLat(rightLngLat[0], rightLngLat[1]);
let bounds = new AMap.Bounds(southWest, northEast);
let rectangle = new AMap.Rectangle({
bounds: bounds,
fillColor: "#2C68FF",
strokeColor: "#2C68FF",
fillOpacity: 0.3,
strokeWeight: 4,
strokeOpacity: 1,
draggable: true,
});
this.map.add(rectangle);
this.rectangle = rectangle;
this.calculateWidthHeight(rectangle.getOptions().bounds);
let _zoom = this.map.getZoom();
if (_zoom < 11) {
this.map.setZoom(11);
}
this.map.setZooms([11, 30]);
this.map.setFitView();
},
// 跳转全屏页面
goFullPage() {
let params = this.getParams();
let poi = this.poi;
let m = {};
m.leftLngLat = params.leftLngLat;
m.rightLngLat = params.rightLngLat;
m.menuId = this.menuId;
// 根据地址查询
if (this.menuId == 1) {
//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.form.sn) {
m.sn = this.form.sn;
}
console.log(qs.stringify(m));
let _path = `oEshield#/monitor/zoneCar?type=full&` + qs.stringify(m);
window.open(_path);
},
// 添加海量点 标记点方式 // 添加海量点 标记点方式
// addMarkers2(arr) { // addMarkers2(arr) {
// console.log(arr); // console.log(arr);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!