Commit f63910e5 authored by 王晓倩's avatar 王晓倩

Merge remote-tracking branch 'origin/master'

parents 334812b9 f82316af
......@@ -134,7 +134,7 @@ export default {
this.obj.polyline.getExtData().class.view.$router.push({
path: "/realtimeData/realtimedetail",
query: {
alarmId: this.obj.polyline.getExtData().lineData.pipeId,
deviceId: this.obj.polyline.getExtData().lineData.pipeId,
},
});
},
......
......@@ -227,18 +227,22 @@ class gaodeMap {
// // console.log(Card)
// // e.target.content = this.getMarketContent(data);
// });
marker.on("mouseover", e => {
that.markerType = markerType;
e.target.content = this.getMarketContent(data);
infoWindow.setContent(e.target.content);
infoWindow.open(map, e.target.getPosition());
that.boxCollision(infoWindow.dom);
// that.addCloneDome(e.target, infoWindow);
// infoWindow.close();
that.workerManInfoWindow = infoWindow;
});
// marker.on("mouseover", e => {
// that.markerType = markerType;
// e.target.content = this.getMarketContent(data);
// infoWindow.setContent(e.target.content);
// infoWindow.open(map, e.target.getPosition());
// that.boxCollision(infoWindow.dom);
// // that.addCloneDome(e.target, infoWindow);
// // infoWindow.close();
// that.workerManInfoWindow = infoWindow;
// });
marker.markerType=markerType;
marker.data = data;
marker.infoWindow =infoWindow;
marker.on("mouseover", this.wokerManOpen);
marker.on("mousedown", e => {
console.log(data);
// console.log(data);
that.closeInfoWindow();
if (marker.workerPoint) return;
that.workerManView({
......@@ -342,7 +346,18 @@ class gaodeMap {
return marker;
}
wokerManOpen=(e)=> {
this.markerType = e.target.markerType;
e.target.content = this.getMarketContent( e.target.data);
e.target.infoWindow.setContent(e.target.content);
e.target.infoWindow.open(map, e.target.getPosition());
this.boxCollision(e.target.infoWindow.dom);
// that.addCloneDome(e.target, infoWindow);
// infoWindow.close();
this.workerManInfoWindow = e.target.infoWindow;
}
// 鼠标移入设备时候实行的函数
infoOpen = e => {
if (e.target.getExtData().alarmState == 1) {
if (e.target.getExtData().deviceType == 4) {
......@@ -350,7 +365,7 @@ class gaodeMap {
} else if (e.target.getExtData().deviceType <= 3) {
this.markerType = +e.target.getExtData().deviceType + 1 + "";
}
console.log("that.markerType", this.markerType);
// console.log("this.markerType", this.markerType);
// 警告状态这样就要换infowindow
e.target.content = this.getMarketContent(
e.target.getExtData(),
......
......@@ -100,16 +100,40 @@
</div>
</div>
<div style="height: 320px;width: 100%;margin-top: 15px;padding: 10px;">
<div id="main1" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;"></div>
<div id="main2" style="float: right;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;"></div>
<div v-if="form.deviceType != '压力表'" style="height: 320px;width: 100%;margin-top: 15px;padding: 10px;">
<div id="main1" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
</div>
<div id="main2" style="float: right;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
</div>
</div>
<div style="height: 320px;width: 100%;padding: 10px;margin-top: 10px;">
<div v-if="form.deviceType != '压力表'" id="main3" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
</div>
<div id="main4" style="float: left;width: 49.8%;margin-left: 5px;height:300px;background-color: rgb(247 247 247);padding: 5px;">
</div>
</div>
<div style="height: 320px;width: 100%;padding: 10px;">
<div id="main3" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;"></div>
<div id="main4" style="float: right;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;"></div>
</div>
<!-- <div style="height: 320px;width: 100%;margin-top: 15px;padding: 10px;">
<div id="main1" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
</div>
<div id="main2" style="float: right;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
</div>
</div> -->
<!-- <div style="height: 320px;width: 100%;padding: 10px;margin-top: 10px;">
<div id="main3" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
</div>
<div id="main4" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;margin-left: 5px;">
</div>
</div> -->
</div>
</div>
......@@ -196,7 +220,6 @@ export default {
created() {
// 如果是跳转来的,则接受初始化参数
// this.user_id = this.$route.query.id; //详细信息页接收参数
this.alarmId = +this.$route.query.alarmId;
console.log("query",this.$route.query.alarmId)
......@@ -555,28 +578,28 @@ export default {
},
// 点击按钮显示隐藏
changeDisplay(e){
this.isDisplay = !this.isDisplay
let $timeline = this.$refs.timeline;
if(!this.showAndHide){
for(let i = 0; i< $timeline.$children.length; i++){
if(i>1){
$timeline.$children[i].$el.style.display = "block";
}
}
this.showAndHide = true;
}else{
for(let i = 0; i< $timeline.$children.length; i++){
if(i>1){
$timeline.$children[i].$el.style.display = "none";
}
}
this.showAndHide = false;
}
//$timeline.toggleRowExpansion(row,true)
},
// changeDisplay(e){
// this.isDisplay = !this.isDisplay
// let $timeline = this.$refs.timeline;
// if(!this.showAndHide){
// for(let i = 0; i< $timeline.$children.length; i++){
// if(i>1){
// $timeline.$children[i].$el.style.display = "block";
// }
// }
// this.showAndHide = true;
// }else{
// for(let i = 0; i< $timeline.$children.length; i++){
// if(i>1){
// $timeline.$children[i].$el.style.display = "none";
// }
// }
// this.showAndHide = false;
// }
// //$timeline.toggleRowExpansion(row,true)
// },
handleRemove(file) {
......@@ -609,6 +632,7 @@ export default {
this.dataListdetail3.push(obj3);
this.form = response.data;
console.log("this.form",this.form)
this.active = parseInt(response.data.orderStatus) + 1;
this.gaoMap.resetMapCenter([this.form.longitude,this.form.latitude]);
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form)
......@@ -642,7 +666,7 @@ export default {
console.log("getData3",getData3)
console.log("this.form",this.form)
// this.active = parseInt(response.data.orderStatus) + 1;
// if(this.form.deviceInfoList.length>0){
// this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude,this.form.deviceInfoList[0].latitude]);
......
......@@ -49,7 +49,7 @@
</div>
</div>
<div style="height: 320px;width: 100%;margin-top: 15px;padding: 10px;">
<div v-if="form.deviceType != '压力表'" style="height: 320px;width: 100%;margin-top: 15px;padding: 10px;">
<div id="main1" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
</div>
<div id="main2" style="float: right;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
......@@ -57,10 +57,10 @@
</div>
<div style="height: 320px;width: 100%;padding: 10px;">
<div id="main3" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
<div style="height: 320px;width: 100%;padding: 10px;margin-top: 10px;">
<div v-if="form.deviceType != '压力表'" id="main3" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
</div>
<div id="main4" style="float: right;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
<div id="main4" style="float: left;width: 49.8%;margin-left: 5px;height:300px;background-color: rgb(247 247 247);padding: 5px;">
</div>
</div>
</div>
......
......@@ -724,13 +724,14 @@ export default {
this.polylineInfoWindowShow(iten, lat, lng);
} else if (item.value == 9) {
// 工作人员
this.workerManInfoWindowShow(iten, lat, lng);
} else {
// 其他设备
this.diveceInfoWindowShow(iten, lat, lng);
}
},
// 如果是线条出现infowindow
// 如果是线条飞过去出现infowindow
polylineInfoWindowShow(iten, lat, lng) {
const target = this.gaoMap.polyLines.filter((item) => {
return item.getExtData().lineData.pipeId == iten.deviceId;
......@@ -770,6 +771,30 @@ export default {
this.gaoMap.infoOpen(e);
};
},
// workerMan,值班人员飞过去后侠士infowindow
workerManInfoWindowShow(iten, lat, lng) {
// console.log("iten",iten.userId)
const target = this.gaoMap.markers.filter((item) => {
return item.getExtData().userId == iten.userId;
})[0];
console.log("target", target);
const e = {
target,
lnglat: iten.path,
};
// 如果是原地不动,就直接执行
if (iten.path[0] == lng && iten.path[1] == lat) {
this.gaoMap.wokerManOpen(e);
return;
}
// 因为地图移动的时候infowindow无法显示
this.gaoMap.handleInfoWindowOpenFunc = () => {
this.gaoMap.wokerManOpen(e);
};
},
// 向右的箭头的动画
arrowRightChange(item) {
const index = this.arrowRightNum.indexOf(item.value);
if (index >= 0) {
......@@ -864,6 +889,7 @@ export default {
this.allList[3] = lljArr;
this.allList[4] = ylbArr;
},
// 值班人员
workerManClassify(workManData) {
const workManArr = workManData.map((item, index) => {
return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment