|
@@ -14,11 +14,11 @@
|
|
<div class="d-l-con-icon">
|
|
<div class="d-l-con-icon">
|
|
<div class="icon-con" :class="{on:iconCurrentIndex==item.resourceTable}"
|
|
<div class="icon-con" :class="{on:iconCurrentIndex==item.resourceTable}"
|
|
v-for="(item,index) in resourcesList"
|
|
v-for="(item,index) in resourcesList"
|
|
- v-on:click="indentleftSetMarkers(item.resourceTable)">
|
|
|
|
|
|
+ v-on:click="fireControlViewPoint(item.type)">
|
|
<div class="iconfont icon icon-normal" :class="item.icon"></div>
|
|
<div class="iconfont icon icon-normal" :class="item.icon"></div>
|
|
<div class="icon-text">
|
|
<div class="icon-text">
|
|
- <h6>{{ item.count }}</h6>
|
|
|
|
- <h5>{{ item.resourceName }}</h5>
|
|
|
|
|
|
+ <h6>{{ item.num }}</h6>
|
|
|
|
+ <h5>{{ item.NAME }}</h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -70,7 +70,9 @@
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
getResource,
|
|
getResource,
|
|
|
|
+ fireControlViewList,
|
|
getResourcePoint,
|
|
getResourcePoint,
|
|
|
|
+ fireControlViewPoint,
|
|
getResourcePointByDeptId
|
|
getResourcePointByDeptId
|
|
} from '@/api/datacenter'
|
|
} from '@/api/datacenter'
|
|
|
|
|
|
@@ -98,7 +100,8 @@ export default {
|
|
/** ----------------------------------底部按钮公用组件结束------------------------------------- */
|
|
/** ----------------------------------底部按钮公用组件结束------------------------------------- */
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.getResource()
|
|
|
|
|
|
+ // this.getResource()
|
|
|
|
+ this.fireControlViewList()
|
|
this.bottomMenuList() //获取底部公共组件消息和任务
|
|
this.bottomMenuList() //获取底部公共组件消息和任务
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
@@ -266,17 +269,240 @@ export default {
|
|
showEventInfo2() {
|
|
showEventInfo2() {
|
|
this.eventInfoVisible2 = true
|
|
this.eventInfoVisible2 = true
|
|
},
|
|
},
|
|
- getResource() {
|
|
|
|
|
|
+ fireControlViewList() {
|
|
let that = this
|
|
let that = this
|
|
- //获取左侧菜单列表
|
|
|
|
- getResource().then(res => {
|
|
|
|
|
|
+ fireControlViewList().then(function (res) {
|
|
that.resourcesList = res.data
|
|
that.resourcesList = res.data
|
|
//截取data.resourceTable字段中“_”分隔符最后一个作为关键字,重新拼接成前端需要的图标:class,格式sj-icon-xxxx,将其set回原数组
|
|
//截取data.resourceTable字段中“_”分隔符最后一个作为关键字,重新拼接成前端需要的图标:class,格式sj-icon-xxxx,将其set回原数组
|
|
- res.data.forEach(function(data, index) {
|
|
|
|
- that.$set(that.resourcesList[index], 'icon', 'sj' + '-' + 'icon' + '-' + data
|
|
|
|
- .icon.split('_').slice(-1))
|
|
|
|
|
|
+ res.data.forEach(function (data, index) {
|
|
|
|
+ console.log("data.type.split('_').slice(-1)", data.type.split('_').slice(-1));
|
|
|
|
+ that.$set(that.resourcesList[index], 'icon', 'sj' + '-' + 'icon' + '-' + data.type.replaceAll("_", "-"))
|
|
})
|
|
})
|
|
|
|
+ console.log(JSON.stringify(res.data));
|
|
|
|
+ })
|
|
|
|
+ .catch(function (error) {
|
|
|
|
+ console.log(error);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ /* getResource() {
|
|
|
|
+ let that = this
|
|
|
|
+ //获取左侧菜单列表
|
|
|
|
+ getResource().then(res => {
|
|
|
|
+ that.resourcesList = res.data
|
|
|
|
+ //截取data.resourceTable字段中“_”分隔符最后一个作为关键字,重新拼接成前端需要的图标:class,格式sj-icon-xxxx,将其set回原数组
|
|
|
|
+ res.data.forEach(function(data, index) {
|
|
|
|
+ that.$set(that.resourcesList[index], 'icon', 'sj' + '-' + 'icon' + '-' + data.icon.split('_').slice(-1))
|
|
|
|
+ })
|
|
|
|
|
|
|
|
+ })
|
|
|
|
+ },*/
|
|
|
|
+ fireControlViewPoint(resourceTable) {
|
|
|
|
+ let that = this
|
|
|
|
+ that.resourceTable = resourceTable
|
|
|
|
+ that.markersList = []
|
|
|
|
+ that.source = []
|
|
|
|
+ fireControlViewPoint(resourceTable).then(res => {
|
|
|
|
+ let pointList = res.data.pointList
|
|
|
|
+ that.deptGroupList = res.data.deptList
|
|
|
|
+ if (res.data.deptList != null && res.data.deptList.length > 0) {
|
|
|
|
+ for (let i = 0; i < res.data.deptList.length; i++) {
|
|
|
|
+ let aa = [res.data.deptList[i].deptName, res.data.deptList[i].count]
|
|
|
|
+ that.source.push(aa)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (res.data.pointList != null && res.data.pointList.length > 0) {
|
|
|
|
+ for (let i = 0; i < res.data.pointList.length; i++) {
|
|
|
|
+ let markersMap = {
|
|
|
|
+ lng: res.data.pointList[i].longitude,
|
|
|
|
+ lat: res.data.pointList[i].latitude,
|
|
|
|
+ icon: 'marker',
|
|
|
|
+ bindPopupHtml: '',
|
|
|
|
+ click: '',
|
|
|
|
+ keepBindPopup: false,
|
|
|
|
+ isAggregation: false
|
|
|
|
+ }
|
|
|
|
+ if (resourceTable == 'centerdata_t_firecontrol_basic_linkage_force') { //基本联动力量
|
|
|
|
+ markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-basic-linkage-force'
|
|
|
|
+ markersMap.lng = res.data.pointList[i].longitude
|
|
|
|
+ markersMap.lat = res.data.pointList[i].latitude
|
|
|
|
+ markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>经纬度:' + res.data.pointList[i].longitude + ',' + res
|
|
|
|
+ .data.pointList[i].latitude + '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>单位名称:' + res.data.pointList[i].company +
|
|
|
|
+ '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '</div>'
|
|
|
|
+ } else if (resourceTable == 'centerdata_t_firecontrol_fire_force') { //消防力量
|
|
|
|
+ markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-fire-force'
|
|
|
|
+ markersMap.lng = res.data.pointList[i].longitude
|
|
|
|
+ markersMap.lat = res.data.pointList[i].latitude
|
|
|
|
+ markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>经纬度:' + res.data.pointList[i].longitude + ',' + res
|
|
|
|
+ .data.pointList[i].latitude + '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>地址:' + res.data.pointList[i].address + '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>负责人:' + res.data.pointList[i].principal + '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>联系电话:' + res.data.pointList[i].contact + '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span></div>'
|
|
|
|
+ } else if (resourceTable == 'centerdata_t_firecontrol_foam_liquid') { //泡沫液
|
|
|
|
+ markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-foam-liquid'
|
|
|
|
+ markersMap.lng = res.data.pointList[i].longitude
|
|
|
|
+ markersMap.lat = res.data.pointList[i].latitude
|
|
|
|
+ markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>经纬度:' + res.data.pointList[i].longitude + ',' + res
|
|
|
|
+ .data.pointList[i].latitude + '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>单位名称:' + res.data.pointList[i].company +
|
|
|
|
+ '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>联系人:' + res.data.pointList[i].contacts +
|
|
|
|
+ '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>联系电话:' + res.data.pointList[i].contacts_phone + '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span></div>'
|
|
|
|
+ } else if (resourceTable == 'centerdata_t_firecontrol_fulltime_station') { //专职站
|
|
|
|
+ markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-fulltime-station'
|
|
|
|
+ markersMap.lng = res.data.pointList[i].longitude
|
|
|
|
+ markersMap.lat = res.data.pointList[i].latitude
|
|
|
|
+ markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>经纬度:' + res.data.pointList[i].longitude + ',' + res
|
|
|
|
+ .data.pointList[i].latitude + '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>地址:' + res.data.pointList[i].address +
|
|
|
|
+ '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>负责人:' + res.data.pointList[i].principal + '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>电话:' + res.data.pointList[i].contacts_phone + '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '</div>'
|
|
|
|
+ } else if (resourceTable == 'centerdata_t_firecontrol_other_linkage_force') { //其他联动力量
|
|
|
|
+ markersMap.icon = 'sj-icon-map-centerdata-t-firecontrol-other-linkage-force'
|
|
|
|
+ markersMap.lng = res.data.pointList[i].longitude
|
|
|
|
+ markersMap.lat = res.data.pointList[i].latitude
|
|
|
|
+ markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>经纬度:' + res.data.pointList[i].longitude + ',' + res
|
|
|
|
+ .data.pointList[i].latitude + '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>单位名称:' + res.data.pointList[i].company +
|
|
|
|
+ '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>单位电话:' + res.data.pointList[i].companyPhone +
|
|
|
|
+ '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>联系人:' + res.data.pointList[i].contacts +
|
|
|
|
+ '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span>' +
|
|
|
|
+ '<span>' +
|
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
|
+ ' <h4>联系电话:' + res.data.pointList[i].contacts_phone +
|
|
|
|
+ '</h4>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </div>' +
|
|
|
|
+ ' </span></div>'
|
|
|
|
+ }
|
|
|
|
+ that.markersList.push(markersMap)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ that.dataChat()
|
|
|
|
+ that.$refs.supermap.clearM(false)
|
|
|
|
+ that.$refs.supermap.setMarkers(that.markersList)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
indentleftSetMarkers(resourceTable) {
|
|
indentleftSetMarkers(resourceTable) {
|