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

1

parent 7aec9f00
......@@ -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;
......
......@@ -390,7 +390,7 @@ class gaodeMap {
let polyline = new AMap.Polyline({
path,
strokeColor: "#F7FE38",
strokeWeight: 8,
strokeWeight: 4,
strokeOpacity: 0.9,
zIndex: 50,
bubble: true,
......@@ -499,7 +499,7 @@ class gaodeMap {
map.remove(this.markerOverlays);
this.mouseTool.polyline({
// bubbles:false,
strokeWeight: 9,
strokeWeight: 4,
strokeColor: "#80d8ff",
extData: {
type: "newLine",
......
......@@ -69,16 +69,10 @@
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 icon="el-icon-refresh" class="refresh-but" @click="refreshMap()"
>重置</el-button
>
......@@ -157,7 +151,7 @@ export default {
this.initMap();
},
methods: {
initMap(){
initMap() {
let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap;
window.addEventListener("click", this.barClose);
......@@ -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)
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) {
......@@ -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;
......@@ -304,7 +289,7 @@ export default {
if (this.targetNum != 3) {
this.gaoMap.removeMarkerDragg();
this.gaoMap.mapOperateType = "normal";
}else{
} else {
// 如果正在新建线条,则清空
this.gaoMap.newLineReset();
// 清空所有正在编辑状态的线
......@@ -364,31 +349,44 @@ export default {
}
});
},
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