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

Merge remote-tracking branch 'origin/master'

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