|
@@ -80,7 +80,7 @@ import {
|
|
|
getResource,
|
|
|
SumLandInfo,
|
|
|
getFindAllType,
|
|
|
- getFindAllZhanList
|
|
|
+ getFindAllZhanList, getPointByDeptId
|
|
|
} from '@/api/datacenter'
|
|
|
|
|
|
import supermap from '@/components/supermap' //超图
|
|
@@ -505,61 +505,258 @@ export default {
|
|
|
that.$refs.supermap.setMarkers(that.markersList);
|
|
|
});
|
|
|
},
|
|
|
+ // indentleftByDeptIdSetMarkers(deptId) {
|
|
|
+ // this.listCurrentIndex = deptId
|
|
|
+ // let that = this;
|
|
|
+ // let type = that.resourceTable;
|
|
|
+ // that.markersList = [];
|
|
|
+ // //点击右侧地图落点
|
|
|
+ // if(type=='hezuoshe'||type=='nongji'||type=='zhibao'||type=='xubao'||type=='yangzhi'){
|
|
|
+ // getPointByDeptId(type,deptId).then(res => {
|
|
|
+ // if (res.data != null && res.data.length > 0) {
|
|
|
+ // for (let i = 0; i < res.data.length; i++) {
|
|
|
+ // let markersMap = {
|
|
|
+ // lng: res.data[i].longitude,
|
|
|
+ // lat: res.data[i].latitude,
|
|
|
+ // icon: 'marker',
|
|
|
+ // bindPopupHtml: '' +
|
|
|
+ // '<div class="map-tip">' +
|
|
|
+ // ' <span>' +
|
|
|
+ // ' <div class="d-l-con">' +
|
|
|
+ // ' <div class="d-l-l-text">' +
|
|
|
+ // ' <h4>经纬度:' + res.data[i].longitude + ',' + res.data[i].latitude + '</h4>' +
|
|
|
+ // ' </div>' +
|
|
|
+ // ' </div>' +
|
|
|
+ // ' </span>' +
|
|
|
+ // ' <span>' +
|
|
|
+ // ' <div class="d-l-con">' +
|
|
|
+ // ' <div class="d-l-l-text">' +
|
|
|
+ // ' <h4>地址:' + res.data[i].address + '</h4>' +
|
|
|
+ // ' </div>' +
|
|
|
+ // ' </div>' +
|
|
|
+ // ' </span>' +
|
|
|
+ // ' <span>' +
|
|
|
+ // ' <div class="d-l-con">' +
|
|
|
+ // ' <div class="d-l-l-text">' +
|
|
|
+ // ' <h4>名称:' + res.data[i].name +'</h4>' +
|
|
|
+ // ' </div>' +
|
|
|
+ // ' </div>' +
|
|
|
+ // ' </span>' +
|
|
|
+ // '</div>',
|
|
|
+ // click: 'showPointDetails',
|
|
|
+ // parameter: {id:res.data[i].id,type:type},
|
|
|
+ // keepBindPopup: false,
|
|
|
+ // isAggregation: false
|
|
|
+ // }
|
|
|
+ // that.markersList.push(markersMap)
|
|
|
+ // }
|
|
|
+ // }else{
|
|
|
+ // that.markersList = [];
|
|
|
+ // }
|
|
|
+ // that.$refs.supermap.clearM(false)
|
|
|
+ // that.$refs.supermap.setMarkers(that.markersList)
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // that.$refs.supermap.clearM(false)
|
|
|
+ // }
|
|
|
indentleftByDeptIdSetMarkers(deptId) {
|
|
|
this.listCurrentIndex = deptId
|
|
|
- let that = this;
|
|
|
- let type = that.resourceTable;
|
|
|
- that.markersList = [];
|
|
|
- //点击右侧地图落点
|
|
|
- if(type=='hezuoshe'||type=='nongji'||type=='zhibao'||type=='xubao'||type=='yangzhi'){
|
|
|
- getFindAllZhanList(type,deptId).then(res => {
|
|
|
- if (res.data != null && res.data.length > 0) {
|
|
|
- for (let i = 0; i < res.data.length; i++) {
|
|
|
- let markersMap = {
|
|
|
- lng: res.data[i].longitude,
|
|
|
- lat: res.data[i].latitude,
|
|
|
- icon: 'marker',
|
|
|
- bindPopupHtml: '' +
|
|
|
- '<div class="map-tip">' +
|
|
|
- ' <span>' +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- ' <h4>经纬度:' + res.data[i].longitude + ',' + res.data[i].latitude + '</h4>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>' +
|
|
|
- ' </span>' +
|
|
|
- ' <span>' +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- ' <h4>地址:' + res.data[i].address + '</h4>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>' +
|
|
|
- ' </span>' +
|
|
|
- ' <span>' +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- ' <h4>名称:' + res.data[i].name +'</h4>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>' +
|
|
|
- ' </span>' +
|
|
|
- '</div>',
|
|
|
- click: 'showPointDetails',
|
|
|
- parameter: {id:res.data[i].id,type:type},
|
|
|
- keepBindPopup: false,
|
|
|
- isAggregation: false
|
|
|
- }
|
|
|
- that.markersList.push(markersMap)
|
|
|
+ let that = this
|
|
|
+ //点击左侧地图落点
|
|
|
+ getPointByDeptId(that.resourceTable, deptId).then(res => {
|
|
|
+ that.markersList = []
|
|
|
+ if (res.data != null && res.data.length > 0) {
|
|
|
+ for (let i = 0; i < res.data.length; i++) {
|
|
|
+ let markersMap = {
|
|
|
+ lng: res.data[i].longitude,
|
|
|
+ lat: res.data[i].latitude,
|
|
|
+ icon: 'marker',
|
|
|
+ bindPopupHtml: '',
|
|
|
+ click: '',
|
|
|
+ keepBindPopup: false,
|
|
|
+ isAggregation: false
|
|
|
}
|
|
|
- }else{
|
|
|
- that.markersList = [];
|
|
|
+ if (that.resourceTable == 'centerdata_t_firecontrol_basic_linkage_force') { //基本联动力量
|
|
|
+ markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-basic-linkage-force'
|
|
|
+ markersMap.lng = res.data[i].longitude
|
|
|
+ markersMap.lat = res.data[i].latitude
|
|
|
+ markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>经纬度:' + res.data[i].longitude + ',' + res
|
|
|
+ .data[i].latitude + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>单位名称:' + res.data[i].company +
|
|
|
+ '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '</div>'
|
|
|
+ } else if (that.resourceTable == 'centerdata_t_firecontrol_fire_force') { //消防力量
|
|
|
+ markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-fire-force'
|
|
|
+ markersMap.lng = res.data[i].longitude
|
|
|
+ markersMap.lat = res.data[i].latitude
|
|
|
+ markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>经纬度:' + res.data[i].longitude + ',' + res
|
|
|
+ .data[i].latitude + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>地址:' + res.data[i].address + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>负责人:' + res.data[i].principal + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>联系电话:' + res.data[i].contact + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span></div>'
|
|
|
+ } else if (that.resourceTable == 'centerdata_t_firecontrol_foam_liquid') { //泡沫液
|
|
|
+ markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-foam-liquid'
|
|
|
+ markersMap.lng = res.data[i].longitude
|
|
|
+ markersMap.lat = res.data[i].latitude
|
|
|
+ markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>经纬度:' + res.data[i].longitude + ',' + res
|
|
|
+ .data[i].latitude + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>单位名称:' + res.data[i].company +
|
|
|
+ '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>联系人:' + res.data[i].contacts +
|
|
|
+ '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>联系电话:' + res.data[i].contactsPhone + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span></div>'
|
|
|
+ } else if (that.resourceTable == 'centerdata_t_firecontrol_fulltime_station') { //专职站
|
|
|
+ markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-fulltime-station'
|
|
|
+ markersMap.lng = res.data[i].longitude
|
|
|
+ markersMap.lat = res.data[i].latitude
|
|
|
+ markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>经纬度:' + res.data[i].longitude + ',' + res
|
|
|
+ .data[i].latitude + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>地址:' + res.data[i].address +
|
|
|
+ '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>负责人:' + res.data[i].principal + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>电话:' + res.data[i].contactsPhone + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '</div>'
|
|
|
+ } else if (that.resourceTable == 'centerdata_t_firecontrol_other_linkage_force') { //其他联动力量
|
|
|
+ markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-other-linkage-force'
|
|
|
+ markersMap.lng = res.data[i].longitude
|
|
|
+ markersMap.lat = res.data[i].latitude
|
|
|
+ markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>经纬度:' + res.data[i].longitude + ',' + res
|
|
|
+ .data[i].latitude + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>单位名称:' + res.data[i].company +
|
|
|
+ '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>单位电话:' + res.data[i].companyPhone +
|
|
|
+ '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>联系人:' + res.data[i].contacts +
|
|
|
+ '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>联系电话:' + res.data[i].contactsPhone +
|
|
|
+ '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span></div>'
|
|
|
+ }
|
|
|
+ that.markersList.push(markersMap)
|
|
|
}
|
|
|
- that.$refs.supermap.clearM(false)
|
|
|
- that.$refs.supermap.setMarkers(that.markersList)
|
|
|
- })
|
|
|
- }
|
|
|
- that.$refs.supermap.clearM(false)
|
|
|
+ }
|
|
|
+ that.$refs.supermap.clearM(false)
|
|
|
+ that.$refs.supermap.setMarkers(that.markersList)
|
|
|
+ })
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
</script>
|