Commit d5c4d564 authored by 纪泽龙's avatar 纪泽龙

Merge branch 'develop_jzl'

parents 2f8fe801 c5469218
......@@ -54,7 +54,7 @@
<span>{{ obj.inspectionTime }}</span>
</div>
<div>
<span>备注信息</span>
<span>备注信息</span>
<span>{{ obj.remarks }} </span>
</div>
</div>
......
......@@ -104,7 +104,7 @@ export default {
.maintain-content {
width: 100%;
height: 109px;
height: 130px;
padding-left: 22px;
padding-top: 16px;
box-sizing: border-box;
......
......@@ -391,7 +391,7 @@ class gaodeMap {
let polyline = new AMap.Polyline({
path,
strokeColor: "#F7FE38",
strokeWeight: 8,
strokeWeight: 4,
strokeOpacity: 0.9,
zIndex: 50,
bubble: true,
......@@ -500,7 +500,7 @@ class gaodeMap {
map.remove(this.markerOverlays);
this.mouseTool.polyline({
// bubbles:false,
strokeWeight: 9,
strokeWeight: 4,
strokeColor: "#80d8ff",
extData: {
type: "newLine",
......
......@@ -69,17 +69,11 @@
id="tipinput"
class="search-input"
/>
<el-button
icon="el-icon-search"
class="search-but"
@click="search()"
<el-button icon="el-icon-search" class="search-but" @click="search()"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
class="refresh-but"
@click="refreshMap()"
>重置</el-button
<el-button icon="el-icon-refresh" class="refresh-but" @click="refreshMap()"
>重置</el-button
>
<div class="leftBar-wrapper">
......@@ -157,7 +151,7 @@ export default {
this.initMap();
},
methods: {
initMap(){
initMap() {
let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap;
window.addEventListener("click", this.barClose);
......@@ -169,7 +163,7 @@ export default {
// 左边的Bar修改值
leftBarChange(item) {
// this.leftBarNum= this.leftBarNum != item.value ? item.value:0;
const index = this.leftBarNum.indexOf(item.value);
if (index >= 0) {
this.leftBarNum.splice(index, 1);
......@@ -181,44 +175,37 @@ export default {
if (this.leftBarNum.includes(1)) {
this.gaoMap.lineShow(true);
}else{
} else {
this.gaoMap.lineShow(false);
}
// console.log("marks",this.gaoMap.markers)
// this.gaoMap.markerShow();
if (this.leftBarNum.includes(2)) {
this.gaoMap.markerShow(1,true)
}else{
this.gaoMap.markerShow(1,false)
this.gaoMap.markerShow(1, true);
} else {
this.gaoMap.markerShow(1, false);
}
if (this.leftBarNum.includes(3)) {
this.gaoMap.markerShow(2,true)
}else{
this.gaoMap.markerShow(2,false)
this.gaoMap.markerShow(2, true);
} else {
this.gaoMap.markerShow(2, false);
}
if (this.leftBarNum.includes(4)) {
this.gaoMap.markerShow(3,true)
}else{
this.gaoMap.markerShow(3,false)
this.gaoMap.markerShow(3, true);
} else {
this.gaoMap.markerShow(3, false);
}
if (this.leftBarNum.includes(7)) {
this.gaoMap.markerShow(4,true)
}else{
this.gaoMap.markerShow(4,false)
if (this.leftBarNum.includes(7)) {
this.gaoMap.markerShow(4, true);
} else {
this.gaoMap.markerShow(4, false);
}
},
addDevice() {
if (this.iconClass == "icon-create") {
this.targetNum = this.targetNum != 1 ? 1 : 0;
} else {
......@@ -226,7 +213,6 @@ export default {
this.targetNum = 0;
this.createReset();
this.gaoMap.newLineReset();
}
}
if (this.targetNum == 1 && this.createValue == 1) {
......@@ -250,7 +236,7 @@ export default {
this.iconClass = item.icon;
this.createValue = item.value;
this.createLabel = item.label;
if (this.targetNum == 1 && this.createValue == 1) {
// 0是初始,1是新建 2是编辑 3删除
this.gaoMap.lineType = 1;
......@@ -263,7 +249,6 @@ export default {
// 如果不是管道了,把之前的管道清空
this.gaoMap.newLineReset();
// this.createReset();
// 其他
this.gaoMap.draw(this.createValue.toString());
......@@ -285,7 +270,7 @@ export default {
this.gaoMap.linePolyEditorAllClose();
this.gaoMap.removeMarkerDragg();
this.gaoMap.mapOperateType = "normal";
}else{
} else {
// 如果正在新建线条,则清空
this.gaoMap.newLineReset();
this.deviceType = false;
......@@ -294,7 +279,7 @@ export default {
// this.gaoMap.placeSearch.clear();
this.gaoMap.closeAddMarker();
}
// 关闭当前的infowindow
// 关闭当前的infowindow
this.gaoMap.closeInfoWindow();
this.createReset();
},
......@@ -304,7 +289,7 @@ export default {
if (this.targetNum != 3) {
this.gaoMap.removeMarkerDragg();
this.gaoMap.mapOperateType = "normal";
}else{
} else {
// 如果正在新建线条,则清空
this.gaoMap.newLineReset();
// 清空所有正在编辑状态的线
......@@ -315,7 +300,7 @@ export default {
//this.gaoMap.placeSearch.clear();
this.gaoMap.closeAddMarker();
}
// 关闭当前的infowindow
// 关闭当前的infowindow
this.gaoMap.closeInfoWindow();
this.createReset();
},
......@@ -358,37 +343,50 @@ export default {
},
getPipeList(queryParams) {
pipeAllInfoList(queryParams).then((res) => {
console.log("管道", res);
if (res.code == 200) {
this.gaoMap.addPolyline(res.data);
}
console.log("管道", res);
if (res.code == 200) {
this.gaoMap.addPolyline(res.data);
}
});
},
searchClear() {
this.iconClass = "icon-create";
this.createValue = 0;
this.createLabel = "新建";
this.targetNum = 0;
this.gaoMap.lineType = 0;
this.gaoMap.newLineReset();
this.gaoMap.linePolyEditorAllClose();
this.gaoMap.closeAddMarker();
this.gaoMap.removeMarkerDragg();
this.gaoMap.mapOperateType = "normal";
map.remove(this.gaodeMap.markerOverlays);
},
search() {
this.searchClear();
map.clearMap();
this.gaoMap.placeSearch.clear();
if(!(!this.gaoMap.searchSelectAdcode && !this.gaoMap.searchSelectName)){
if (!(!this.gaoMap.searchSelectAdcode && !this.gaoMap.searchSelectName)) {
this.gaoMap.placeSearch.setCity(this.gaoMap.searchSelectAdcode);
this.gaoMap.placeSearch.search(this.gaoMap.searchSelectName);
this.getDeviceInfo({"deviceName": this.gaoMap.searchSelectName});
this.getDeviceInfo({ deviceName: this.gaoMap.searchSelectName });
this.gaoMap.polyLines = [];
this.getPipeList({"pipeName": this.gaoMap.searchSelectName});
this.getPipeList({ pipeName: this.gaoMap.searchSelectName });
this.gaoMap.searchSelectAdcode = undefined;
this.gaoMap.searchSelectName = undefined;
}else{
} else {
this.gaoMap.placeSearch.search(this.keyWord);
this.getDeviceInfo({"deviceName": this.keyWord});
this.getDeviceInfo({ deviceName: this.keyWord });
this.gaoMap.polyLines = [];
this.getPipeList({"pipeName": this.keyWord});
this.getPipeList({ pipeName: this.keyWord });
}
},
// 新建下拉列表关闭 window点击事件
barClose() {
console.log("window");
this.deviceType = false;
// 关闭当前线条的infowindow
this.gaoMap.closeInfoWindow()
this.gaoMap.closeInfoWindow();
// 如果没有选择的时候点window 则高亮消失
if (this.targetNum == 1 && this.iconClass == "icon-create") {
this.targetNum = 0;
......@@ -399,10 +397,14 @@ export default {
this.gaoMap.lineFlag = false;
// this.gaoMap.createNewLine();
},
refreshMap(){
refreshMap() {
this.iconClass = "icon-create";
this.createValue = 0;
this.createLabel = "新建";
this.targetNum = 0;
map.clearMap();
this.initMap();
}
},
},
beforeDestroy() {
......@@ -647,7 +649,7 @@ input[type="radio"] {
background-color: #053b6a;
}
.refresh-but{
.refresh-but {
position: fixed;
top: 100px;
left: 28%;
......
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