|
@@ -31,10 +31,12 @@
|
|
</div>
|
|
</div>
|
|
<!-- 地图 -->
|
|
<!-- 地图 -->
|
|
<supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'forestMap'" class="indexSupermapClass"
|
|
<supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'forestMap'" class="indexSupermapClass"
|
|
- :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false" @preview="preview">
|
|
|
|
|
|
+ :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false" @preview="preview" @showResourcesDialog="showResourcesDialog">
|
|
</supermap>
|
|
</supermap>
|
|
<vBottomMenu ref="bottomMenu"></vBottomMenu>
|
|
<vBottomMenu ref="bottomMenu"></vBottomMenu>
|
|
</div>
|
|
</div>
|
|
|
|
+ <resourcesdialog ref="resourcesdialog"
|
|
|
|
+ @getResource="getResource"></resourcesdialog>
|
|
<eventLocation ref="eventLocation"></eventLocation>
|
|
<eventLocation ref="eventLocation"></eventLocation>
|
|
<TVWall ref="TVWall"></TVWall>
|
|
<TVWall ref="TVWall"></TVWall>
|
|
<el-dialog :title="cameraTitle" :visible.sync="cameraVisible" v-if="cameraVisible" customClass="videoCustomWidth"
|
|
<el-dialog :title="cameraTitle" :visible.sync="cameraVisible" v-if="cameraVisible" customClass="videoCustomWidth"
|
|
@@ -58,6 +60,7 @@ import vheader from '@/components/v-header.vue' //一体化共用头部
|
|
import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
|
|
import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
|
|
import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
|
|
import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
|
|
import TVWall from '@/components/TVWall.vue' //电视墙弹窗
|
|
import TVWall from '@/components/TVWall.vue' //电视墙弹窗
|
|
|
|
+import resourcesdialog from '@/views/resourcesdialog.vue' //事件详情弹窗
|
|
/** ----------------------------------摄像头预览开始------------------------------------- */
|
|
/** ----------------------------------摄像头预览开始------------------------------------- */
|
|
import {
|
|
import {
|
|
getHaiKangVideoServer
|
|
getHaiKangVideoServer
|
|
@@ -65,6 +68,7 @@ import {
|
|
/** ----------------------------------摄像头预览结束------------------------------------- */
|
|
/** ----------------------------------摄像头预览结束------------------------------------- */
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
|
|
+ resourcesdialog,
|
|
supermap,
|
|
supermap,
|
|
vheader,
|
|
vheader,
|
|
vBottomMenu,
|
|
vBottomMenu,
|
|
@@ -100,19 +104,23 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //查询各类资源的数量
|
|
getResourcesCount(){
|
|
getResourcesCount(){
|
|
getResourcesCount().then(res => {
|
|
getResourcesCount().then(res => {
|
|
this.resourcesCountList = res.data;
|
|
this.resourcesCountList = res.data;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ //初始化所有资源并落点
|
|
selectResources(){
|
|
selectResources(){
|
|
selectResources(this.labelList).then(res => {
|
|
selectResources(this.labelList).then(res => {
|
|
this.resourcesList = res.data;
|
|
this.resourcesList = res.data;
|
|
this.initMarkers(this.resourcesList);
|
|
this.initMarkers(this.resourcesList);
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ //点击左侧某资源,将该资源进行落点
|
|
selectResourcesByLabel(label){
|
|
selectResourcesByLabel(label){
|
|
let that = this;
|
|
let that = this;
|
|
|
|
+ //每次点击,先将原有点位清空后重新落点
|
|
this.markersList = [];
|
|
this.markersList = [];
|
|
this.resourcesList = [];
|
|
this.resourcesList = [];
|
|
that.$refs.supermap.clearM(false);
|
|
that.$refs.supermap.clearM(false);
|
|
@@ -122,6 +130,14 @@ export default {
|
|
this.initMarkers(this.resourcesList);
|
|
this.initMarkers(this.resourcesList);
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ showResourcesDialog(id) {
|
|
|
|
+ console.log(id)
|
|
|
|
+ //资源信息弹出
|
|
|
|
+ this.$refs.resourcesdialog.showResourcesDialog(id);
|
|
|
|
+ },
|
|
|
|
+ getResource(){
|
|
|
|
+
|
|
|
|
+ },
|
|
initMarkers(list){
|
|
initMarkers(list){
|
|
if (list != null && list.length > 0) {
|
|
if (list != null && list.length > 0) {
|
|
for (let i = 0; i < list.length; i++) {
|
|
for (let i = 0; i < list.length; i++) {
|
|
@@ -138,11 +154,13 @@ export default {
|
|
if (list.length > 200) {
|
|
if (list.length > 200) {
|
|
markersMap.isAggregation = true;
|
|
markersMap.isAggregation = true;
|
|
}
|
|
}
|
|
- // markersMap.icon = 'sj-icon-map-xinshangbao';
|
|
|
|
|
|
+ //根据标签确定资源的图标
|
|
markersMap.icon = 'traffic-resources-' + this.resourcesList[i].label;
|
|
markersMap.icon = 'traffic-resources-' + this.resourcesList[i].label;
|
|
- console.log(markersMap.icon)
|
|
|
|
|
|
+ markersMap.parameter = this.resourcesList[i].id;
|
|
|
|
+ markersMap.click = 'showResourcesDialog';
|
|
markersMap.lng = list[i].longitude;
|
|
markersMap.lng = list[i].longitude;
|
|
markersMap.lat = list[i].latitude;
|
|
markersMap.lat = list[i].latitude;
|
|
|
|
+ //POP的通用部分
|
|
markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
'<span>' +
|
|
'<span>' +
|
|
' <div class="d-l-con">' +
|
|
' <div class="d-l-con">' +
|
|
@@ -207,7 +225,7 @@ export default {
|
|
' </div>' +
|
|
' </div>' +
|
|
'</span>';
|
|
'</span>';
|
|
}
|
|
}
|
|
- if(list[i].remark !="" && list[i].remark !=null){
|
|
|
|
|
|
+ if(list[i].remark !="" && list[i].remark !=null){//POP的备注部分
|
|
markersMap.bindPopupHtml += ''+
|
|
markersMap.bindPopupHtml += ''+
|
|
'<span>' +
|
|
'<span>' +
|
|
' <div class="d-l-con">' +
|
|
' <div class="d-l-con">' +
|