|
@@ -979,7 +979,7 @@ export default {
|
|
|
eventLogList: [],
|
|
|
visuForestCloudYuAnBo: null,
|
|
|
eventDialog: false,
|
|
|
- radius: 1,//资源搜索半径
|
|
|
+ radius: 5000,//资源搜索半径
|
|
|
resourcesList: [
|
|
|
{
|
|
|
resourceName: '取水口',
|
|
@@ -1029,6 +1029,7 @@ export default {
|
|
|
icon: 'camera'
|
|
|
}
|
|
|
],
|
|
|
+ resourcesListCheck:[],
|
|
|
//文本域
|
|
|
feedback: ''
|
|
|
|
|
@@ -1060,60 +1061,68 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
listResourceByWz(type) {
|
|
|
- //搜索物资
|
|
|
- let param = { longitude: this.longitude, latitude: this.latitude, type: type, radius: this.radius }
|
|
|
- listResourceByWz(param).then(res => {
|
|
|
- if (res.data != null && res.data.length > 0) {
|
|
|
- var markersList = []
|
|
|
- for (let i = 0; i < res.data.length; i++) {
|
|
|
- let markersMap = {
|
|
|
- lng: 124.59,
|
|
|
- lat: 43.02,
|
|
|
- icon: 'marker',
|
|
|
- bindPopupHtml: '',
|
|
|
- click: '',
|
|
|
- parameter: '',
|
|
|
- keepBindPopup: false,
|
|
|
- isAggregation: false
|
|
|
+ if(this.resourcesListCheck.indexOf(type)>-1){
|
|
|
+ this.resourcesListCheck.splice(this.resourcesListCheck.indexOf(type),1)
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.supermapDialog.clearMByType(type)
|
|
|
+ }, 1000)
|
|
|
+ }else{
|
|
|
+ this.resourcesListCheck.push(type)
|
|
|
+ //搜索物资
|
|
|
+ let param = { longitude: this.longitude, latitude: this.latitude, type: type, radius: this.radius }
|
|
|
+ listResourceByWz(param).then(res => {
|
|
|
+ if (res.data != null && res.data.length > 0) {
|
|
|
+ var markersList = []
|
|
|
+ for (let i = 0; i < res.data.length; i++) {
|
|
|
+ let markersMap = {
|
|
|
+ lng: 124.59,
|
|
|
+ lat: 43.02,
|
|
|
+ icon: 'marker',
|
|
|
+ bindPopupHtml: '',
|
|
|
+ click: '',
|
|
|
+ parameter: '',
|
|
|
+ keepBindPopup: false,
|
|
|
+ isAggregation: false
|
|
|
+ }
|
|
|
+ if (res.data.length > 50) {
|
|
|
+ markersMap.isAggregation = true
|
|
|
+ }
|
|
|
+ if (type == 'qsk') {
|
|
|
+ markersMap.icon = 'sj-icon-waterintake'
|
|
|
+ } else if (type == 'sh') {
|
|
|
+ markersMap.icon = 'sj-icon-watercrane'
|
|
|
+ } else if (type == 'xfs') {
|
|
|
+ markersMap.icon = 'sj-icon-firehydrant'
|
|
|
+ } else if (type == 'qjd') {
|
|
|
+ markersMap.icon = 'sj-icon-landing'
|
|
|
+ } else if (type == 'jcz') {
|
|
|
+ markersMap.icon = 'sj-icon-checkpoint'
|
|
|
+ } else if (type == 'fhd') {
|
|
|
+ markersMap.icon = 'sj-icon-fireteam'
|
|
|
+ } else if (type == 'zdqy') {
|
|
|
+ markersMap.icon = 'sj-icon-tcqh'
|
|
|
+ } else if (type == 'sxt') {
|
|
|
+ markersMap.icon = 'sj-icon-jkzx'
|
|
|
+ }
|
|
|
+ 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].name + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '</div>'
|
|
|
+ markersList.push(markersMap)
|
|
|
}
|
|
|
- if (res.data.length > 50) {
|
|
|
- markersMap.isAggregation = true
|
|
|
- }
|
|
|
- if (type == 'qsk') {
|
|
|
- markersMap.icon = 'sj-icon-waterintake'
|
|
|
- } else if (type == 'sh') {
|
|
|
- markersMap.icon = 'sj-icon-watercrane'
|
|
|
- } else if (type == 'xfs') {
|
|
|
- markersMap.icon = 'sj-icon-firehydrant'
|
|
|
- } else if (type == 'qjd') {
|
|
|
- markersMap.icon = 'sj-icon-landing'
|
|
|
- } else if (type == 'jcz') {
|
|
|
- markersMap.icon = 'sj-icon-checkpoint'
|
|
|
- } else if (type == 'fhd') {
|
|
|
- markersMap.icon = 'sj-icon-fireteam'
|
|
|
- } else if (type == 'zdqy') {
|
|
|
- markersMap.icon = 'sj-icon-tcqh'
|
|
|
- } else if (type == 'sxt') {
|
|
|
- markersMap.icon = 'sj-icon-jkzx'
|
|
|
- }
|
|
|
- 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].name + '</h4>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>' +
|
|
|
- ' </span>' +
|
|
|
- '</div>'
|
|
|
- markersList.push(markersMap)
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.supermapDialog.setMarkersByType(markersList,type)
|
|
|
+ }, 1000)
|
|
|
}
|
|
|
- setTimeout(() => {
|
|
|
- this.$refs.supermapDialog.setMarkers(markersList)
|
|
|
- }, 1000)
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
// 返回图片列表
|
|
|
assetTypeAnImage(filePath) {
|
|
@@ -1173,6 +1182,7 @@ export default {
|
|
|
this.deptOptionsLiandong = []//联动部门
|
|
|
this.eventStatusButton = null//流程按钮标识
|
|
|
this.eventConfirmTitle = null//流程按钮标识
|
|
|
+ this.resourcesListCheck=[]
|
|
|
},
|
|
|
cancelEventConfirm_send() {
|
|
|
//清空表单数据
|