Commit c45c3d31 authored by 耿迪迪's avatar 耿迪迪

车辆巡检问题修改

parent 41232d08
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
inspectListInfo({taskId: taskId}).then(res =>{ inspectListInfo({taskId: taskId}).then(res =>{
if(res.code == 200){ if(res.code == 200){
this.trackList = res.data; this.trackList = res.data;
if(this.trackList){ if(this.trackList && this.trackList.length > 0){
//添加点位 //添加点位
this.trackList.forEach(item =>{ this.trackList.forEach(item =>{
let marker = this.addMarker(item); let marker = this.addMarker(item);
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<div :class="{ active: !mapStyle }" @click="mapChange(1)">卫星地图</div> <div :class="{ active: !mapStyle }" @click="mapChange(1)">卫星地图</div>
<div :class="{ active: mapStyle }" @click="mapChange(2)">全景地图</div> <div :class="{ active: mapStyle }" @click="mapChange(2)">全景地图</div>
</div> </div>
<div id="track-map" style="width: 100%; height: 500px"></div> <div id="leak-map" style="width: 100%; height: 500px"></div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
this.$nextTick(() => { this.$nextTick(() => {
const path = eval(this.systemSetting.map_center); const path = eval(this.systemSetting.map_center);
this.gaoMap = new EditorMap( this.gaoMap = new EditorMap(
"track-map", "leak-map",
{ {
center: path, center: path,
//mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758", //mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
this.loading = false; this.loading = false;
if(res.code == 200){ if(res.code == 200){
this.pointList = res.data; this.pointList = res.data;
if(this.pointList){ if(this.pointList && this.pointList.length > 0){
//添加点位 //添加点位
this.pointList.forEach(item =>{ this.pointList.forEach(item =>{
let marker = this.addMarker(item); let marker = this.addMarker(item);
......
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