|
@@ -48,7 +48,6 @@
|
|
import {
|
|
import {
|
|
getResource,
|
|
getResource,
|
|
getResourcePoint,
|
|
getResourcePoint,
|
|
- getResourcePointByDeptId
|
|
|
|
} from '@/api/datacenter'
|
|
} from '@/api/datacenter'
|
|
|
|
|
|
import supermap from '@/components/supermap' //超图
|
|
import supermap from '@/components/supermap' //超图
|
|
@@ -354,375 +353,6 @@ export default {
|
|
that.$refs.supermap.setMarkers(that.markersList)
|
|
that.$refs.supermap.setMarkers(that.markersList)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- indentleftByDeptIdSetMarkers(deptId) {
|
|
|
|
- this.listCurrentIndex = deptId
|
|
|
|
- let that = this
|
|
|
|
- //点击左侧地图落点
|
|
|
|
- getResourcePointByDeptId(that.resourceTable, deptId).then(res => {
|
|
|
|
- that.markersList = []
|
|
|
|
- if (res.data.resourceList != null && res.data.resourceList.length > 0) {
|
|
|
|
- for (let i = 0; i < res.data.resourceList.length; i++) {
|
|
|
|
- let markersMap = {
|
|
|
|
- lng: 124.59,
|
|
|
|
- lat: 43.02,
|
|
|
|
- icon: 'marker',
|
|
|
|
- bindPopupHtml: '',
|
|
|
|
- click: '',
|
|
|
|
- keepBindPopup: false,
|
|
|
|
- isAggregation: false
|
|
|
|
- }
|
|
|
|
- if (that.resourceTable == 'centerdata_t_forest_weatherstation') { //气象站
|
|
|
|
- markersMap.icon = 'sj-icon-map-centerdata-t-forest-weatherstation'
|
|
|
|
- markersMap.lng = res.data.resourceList[i].longitude
|
|
|
|
- markersMap.lat = res.data.resourceList[i].latitude
|
|
|
|
- markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
|
|
|
|
- .data.resourceList[i].latitude + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>地址:' + res.data.resourceList[i].weatherstationAddress +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>联系人:' + res.data.resourceList[i].weatherstationPerson +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>电话:' + res.data.resourceList[i].weatherstationTel +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span></div>'
|
|
|
|
- } else if (that.resourceTable == 'centerdata_t_forest_farm') { //林场
|
|
|
|
- markersMap.icon = 'sj-icon-map-centerdata-t-forest-farm'
|
|
|
|
- markersMap.lng = res.data.resourceList[i].longitude
|
|
|
|
- markersMap.lat = res.data.resourceList[i].latitude
|
|
|
|
- markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
|
|
|
|
- .data.resourceList[i].latitude + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>林场名称:' + res.data.resourceList[i].farmName + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>联系人:' + res.data.resourceList[i].farmPerson + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>电话:' + res.data.resourceList[i].farmTel + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span></div>'
|
|
|
|
- } else if (that.resourceTable == 'centerdata_t_forest_landing') { //起降点
|
|
|
|
- markersMap.icon = 'sj-icon-map-centerdata-t-forest-landing'
|
|
|
|
- markersMap.lng = res.data.resourceList[i].longitude
|
|
|
|
- markersMap.lat = res.data.resourceList[i].latitude
|
|
|
|
- markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
|
|
|
|
- .data.resourceList[i].latitude + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>起降点名称:' + res.data.resourceList[i].landingName +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>联系人:' + res.data.resourceList[i].landingPerson +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>电话:' + res.data.resourceList[i].landingTel + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span></div>'
|
|
|
|
- } else if (that.resourceTable == 'centerdata_t_forest_channel') { //水源渠道
|
|
|
|
- markersMap.icon = 'sj-icon-map-centerdata-t-forest-channel'
|
|
|
|
- markersMap.lng = res.data.resourceList[i].longitude
|
|
|
|
- markersMap.lat = res.data.resourceList[i].latitude
|
|
|
|
- markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
|
|
|
|
- .data.resourceList[i].latitude + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>渠道名称:' + res.data.resourceList[i].channelName +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>联系人:' + res.data.resourceList[i].channelPerson +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>电话:' + res.data.resourceList[i].channelTel + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span></div>'
|
|
|
|
- } else if (that.resourceTable == 'centerdata_t_forest_checkpoint') { //防火检查站
|
|
|
|
- markersMap.icon = 'sj-icon-map-centerdata-t-forest-checkpoint'
|
|
|
|
- markersMap.lng = res.data.resourceList[i].longitude
|
|
|
|
- markersMap.lat = res.data.resourceList[i].latitude
|
|
|
|
- markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
|
|
|
|
- .data.resourceList[i].latitude + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>检查站名称:' + res.data.resourceList[i].checkpointName +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>地址:' + res.data.resourceList[i].checkpointAddress +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>联系人:' + res.data.resourceList[i].checkpointPerson +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>电话:' + res.data.resourceList[i].checkpointTel +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span></div>'
|
|
|
|
- } else if (that.resourceTable == 'centerdata_t_forest_waterintake') { //取水口
|
|
|
|
- markersMap.icon = 'sj-icon-map-centerdata-t-forest-waterintake'
|
|
|
|
- markersMap.lng = res.data.resourceList[i].longitude
|
|
|
|
- markersMap.lat = res.data.resourceList[i].latitude
|
|
|
|
- markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
|
|
|
|
- .data.resourceList[i].latitude + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>取水口名称:' + res.data.resourceList[i].waterintakeName +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>联系人:' + res.data.resourceList[i].waterintakePerson +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>电话:' + res.data.resourceList[i].waterintakeTel +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span></div>'
|
|
|
|
- } else if (that.resourceTable == 'centerdata_t_forest_watercrane') { //水鹤
|
|
|
|
- markersMap.icon = 'sj-icon-map-centerdata-t-forest-watercrane'
|
|
|
|
- markersMap.lng = res.data.resourceList[i].longitude
|
|
|
|
- markersMap.lat = res.data.resourceList[i].latitude
|
|
|
|
- markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
|
|
|
|
- .data.resourceList[i].latitude + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>水鹤名称:' + res.data.resourceList[i].watercraneName +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>联系人:' + res.data.resourceList[i].watercranePerson +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>电话:' + res.data.resourceList[i].watercraneTel +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span></div>'
|
|
|
|
- } else if (that.resourceTable == 'centerdata_t_forest_firehydrant') { //消火栓
|
|
|
|
- markersMap.icon = 'sj-icon-map-centerdata-t-forest-firehydrant'
|
|
|
|
- markersMap.lng = res.data.resourceList[i].longitude
|
|
|
|
- markersMap.lat = res.data.resourceList[i].latitude
|
|
|
|
- markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
|
|
|
|
- .data.resourceList[i].latitude + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>消火栓名称:' + res.data.resourceList[i].firehydrantName +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>地址:' + res.data.resourceList[i].firehydrantAddress +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>联系人:' + res.data.resourceList[i].firehydrantPerson +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>电话:' + res.data.resourceList[i].firehydrantTel +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span></div>'
|
|
|
|
- } else if (that.resourceTable == 'centerdata_t_forest_fireteam') { //森林防火队
|
|
|
|
- markersMap.icon = 'sj-icon-map-centerdata-t-forest-fireteam'
|
|
|
|
- markersMap.lng = res.data.resourceList[i].longitude
|
|
|
|
- markersMap.lat = res.data.resourceList[i].latitude
|
|
|
|
- markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
|
|
|
|
- .data.resourceList[i].latitude + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>森林防火队名称:' + res.data.resourceList[i].fireteamName +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>联系人:' + res.data.resourceList[i].fireteamPerson +
|
|
|
|
- '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span>' +
|
|
|
|
- '<span>' +
|
|
|
|
- ' <div class="d-l-con">' +
|
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
|
- ' <h4>电话:' + res.data.resourceList[i].fireteamTel + '</h4>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </div>' +
|
|
|
|
- ' </span></div>'
|
|
|
|
- }
|
|
|
|
- that.markersList.push(markersMap)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- that.$refs.supermap.clearM(false)
|
|
|
|
- that.$refs.supermap.setMarkers(that.markersList)
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|