|
@@ -7,6 +7,7 @@
|
|
<div id="vmap" />
|
|
<div id="vmap" />
|
|
<div id="marker-tip" :style="marker_tip_style">
|
|
<div id="marker-tip" :style="marker_tip_style">
|
|
<div class="head">基本信息</div>
|
|
<div class="head">基本信息</div>
|
|
|
|
+ <div class="subtitle">{{ layerInfo.title }}</div>
|
|
<div class="item">
|
|
<div class="item">
|
|
<p class="title">巡检任务统计({{ layerInfo.goafTaskTotalNum }})</p>
|
|
<p class="title">巡检任务统计({{ layerInfo.goafTaskTotalNum }})</p>
|
|
<p><span>未完成:{{ layerInfo.goafTaskTotalNum-layerInfo.goafTaskCompletedNum }}</span><span>已完成:{{ layerInfo.goafTaskCompletedNum }}</span></p>
|
|
<p><span>未完成:{{ layerInfo.goafTaskTotalNum-layerInfo.goafTaskCompletedNum }}</span><span>已完成:{{ layerInfo.goafTaskCompletedNum }}</span></p>
|
|
@@ -27,7 +28,7 @@
|
|
import MapSelector from '@/components/MapSelector'
|
|
import MapSelector from '@/components/MapSelector'
|
|
import { getMapLayerById, getMapLayer,getMapLayerInfoById } from '@/api/goaf/layer'
|
|
import { getMapLayerById, getMapLayer,getMapLayerInfoById } from '@/api/goaf/layer'
|
|
import { NumConvertLM } from '@/utils'
|
|
import { NumConvertLM } from '@/utils'
|
|
- const iconSize = [65, 65]
|
|
|
|
|
|
+ const iconSize = [45, 65]
|
|
export default {
|
|
export default {
|
|
name: 'GoafVisualEditor',
|
|
name: 'GoafVisualEditor',
|
|
components: {
|
|
components: {
|
|
@@ -69,6 +70,7 @@
|
|
sensorOfflineTotalNum:"",
|
|
sensorOfflineTotalNum:"",
|
|
//传感器预警总数
|
|
//传感器预警总数
|
|
sensorAlarmNum:"",
|
|
sensorAlarmNum:"",
|
|
|
|
+ title:""
|
|
},
|
|
},
|
|
marker_tip_style:"",
|
|
marker_tip_style:"",
|
|
layers: [],
|
|
layers: [],
|
|
@@ -111,7 +113,7 @@
|
|
maxBounds: bounds, // 地图拖动到边界后自动弹回
|
|
maxBounds: bounds, // 地图拖动到边界后自动弹回
|
|
maxBoundsViscosity: 0.2,
|
|
maxBoundsViscosity: 0.2,
|
|
attributionControl: true,
|
|
attributionControl: true,
|
|
- zoomControl: true // zoomControl(缩放控制):确定缩放控制是否默认加载在地图上。
|
|
|
|
|
|
+ zoomControl: false // zoomControl(缩放控制):确定缩放控制是否默认加载在地图上。
|
|
})
|
|
})
|
|
this.layerGroup = L.layerGroup().addTo(this.map)
|
|
this.layerGroup = L.layerGroup().addTo(this.map)
|
|
this.geoLayer = L.geoJson(null, { pmIgnore: false })
|
|
this.geoLayer = L.geoJson(null, { pmIgnore: false })
|
|
@@ -137,7 +139,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
this.map.fitBounds(bounds)
|
|
this.map.fitBounds(bounds)
|
|
- // this.map.scrollWheelZoom.disable() //滚动缩放
|
|
|
|
|
|
+ this.map.scrollWheelZoom.disable() //滚动缩放
|
|
this.getMapLayers()
|
|
this.getMapLayers()
|
|
},
|
|
},
|
|
|
|
|
|
@@ -227,7 +229,7 @@
|
|
|
|
|
|
const goaf_icon_tag = ""
|
|
const goaf_icon_tag = ""
|
|
//`<div class="goaf-icon-tag" title="${NumConvertLM(goafOrebelt)}-${goafOrebody}-${goafOreheight}-${goafName}">${NumConvertLM(goafOrebelt)}-${goafOrebody}-${goafOreheight}-${goafName}</div>`
|
|
//`<div class="goaf-icon-tag" title="${NumConvertLM(goafOrebelt)}-${goafOrebody}-${goafOreheight}-${goafName}">${NumConvertLM(goafOrebelt)}-${goafOrebody}-${goafOreheight}-${goafName}</div>`
|
|
- const html = `<div data-layer="${layerId}" gid="${goafId}" class="goaf-icon-box ${goafAlarmStatus}" style="width:100%;height:100%;position: relative;">${goaf_icon_tag}<div class="goaf-fill-v" style="height:${Volume}%;"></div></div>`
|
|
|
|
|
|
+ const html = `<div data-layer="${layerId}" gid="${goafId}" class="goaf-icon-box ${goafAlarmStatus}" style="width:100%;height:100%;position: relative;">${goaf_icon_tag}<div class="goaf-fill-v" style="height:${Volume}%;"></div></div>`
|
|
var icon = L.divIcon({
|
|
var icon = L.divIcon({
|
|
html,
|
|
html,
|
|
iconSize
|
|
iconSize
|
|
@@ -235,6 +237,10 @@
|
|
return L.marker(latlng, { icon })
|
|
return L.marker(latlng, { icon })
|
|
},
|
|
},
|
|
onEachFeature: (_feature, layer) => {
|
|
onEachFeature: (_feature, layer) => {
|
|
|
|
+ const goafOrebelt = _feature.properties.goafOrebelt
|
|
|
|
+ const goafOrebody = _feature.properties.goafOrebody
|
|
|
|
+ const goafOreheight = _feature.properties.goafOreheight
|
|
|
|
+ const goafName = _feature.properties.goafName
|
|
this.layerGroup.addLayer(layer)
|
|
this.layerGroup.addLayer(layer)
|
|
// layer.on('click', (ev) => {
|
|
// layer.on('click', (ev) => {
|
|
// self.layer=ev
|
|
// self.layer=ev
|
|
@@ -251,7 +257,8 @@
|
|
goafId
|
|
goafId
|
|
}).then((goaf_layer_res)=>{
|
|
}).then((goaf_layer_res)=>{
|
|
self.layerInfo=goaf_layer_res.data
|
|
self.layerInfo=goaf_layer_res.data
|
|
- self.marker_tip_style=`left:${ev.containerPoint.x+60}px;top:${ev.containerPoint.y-240}px;display:block;`
|
|
|
|
|
|
+ self.layerInfo.title=`${NumConvertLM(goafOrebelt)}-${goafOrebody}-${goafOreheight}-${goafName}`
|
|
|
|
+ self.marker_tip_style=`left:${ev.containerPoint.x+30}px;top:${ev.containerPoint.y-230}px;display:block;`
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -259,6 +266,7 @@
|
|
self.layer=ev
|
|
self.layer=ev
|
|
self.marker_tip_style="left:-1000px;top:0;display:none;"
|
|
self.marker_tip_style="left:-1000px;top:0;display:none;"
|
|
self.markerovertime=undefined
|
|
self.markerovertime=undefined
|
|
|
|
+ self.layerInfo={}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}).addTo(this.layerGroup)
|
|
}).addTo(this.layerGroup)
|
|
@@ -350,11 +358,16 @@
|
|
font-size: 24px;
|
|
font-size: 24px;
|
|
color: #fff;
|
|
color: #fff;
|
|
}
|
|
}
|
|
|
|
+ .subtitle{
|
|
|
|
+ padding-top: 6px;
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ line-height: 1;
|
|
|
|
+ color: #fff;
|
|
|
|
+ }
|
|
.item{
|
|
.item{
|
|
- padding-top: 15px;
|
|
|
|
- padding-bottom: 5px;
|
|
|
|
- &.item{
|
|
|
|
- padding-top: 8px;
|
|
|
|
|
|
+ padding-top: 8px;
|
|
|
|
+ p{
|
|
|
|
+ line-height: 1.2;
|
|
}
|
|
}
|
|
.title{
|
|
.title{
|
|
font-size: 16px;
|
|
font-size: 16px;
|