|
@@ -16,27 +16,25 @@
|
|
</div>
|
|
</div>
|
|
<div class="i-list-con h-73">
|
|
<div class="i-list-con h-73">
|
|
<div class="d-l-con-icon">
|
|
<div class="d-l-con-icon">
|
|
- <div class="icon-con w-33 m-btm-no" :class="{on:iconCurrentIndex1==index}"
|
|
|
|
- v-for="(item,index) in visuForestCloudMapDeviceBOList"
|
|
|
|
- v-on:click="selectDeviceType(index)">
|
|
|
|
|
|
+ <div class="icon-con w-33 m-btm-no" :class="{on:onShe}" @click="sheClick">
|
|
<!-- -->
|
|
<!-- -->
|
|
<div class="icon icon-dot"></div>
|
|
<div class="icon icon-dot"></div>
|
|
<div class="icon-text">
|
|
<div class="icon-text">
|
|
- <h6>{{ item.deviceCount }}</h6>
|
|
|
|
- <h5>{{ item.deviceName }}</h5>
|
|
|
|
|
|
+ <h6>{{ visuForestCloudMapDeviceBOList[0].deviceCount }}</h6>
|
|
|
|
+ <h5>{{ visuForestCloudMapDeviceBOList[0].deviceName }}</h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="icon-con w-33 m-btm-no">
|
|
|
|
|
|
+ <div class="icon-con w-33 m-btm-no" :class="{on:onChuan}" @click="chuanClick">
|
|
<div class="icon icon-dot"></div>
|
|
<div class="icon icon-dot"></div>
|
|
<div class="icon-text">
|
|
<div class="icon-text">
|
|
- <h6>0</h6>
|
|
|
|
|
|
+ <h6>{{ sensorNum }}</h6>
|
|
<h5>传感器</h5>
|
|
<h5>传感器</h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="icon-con w-33 m-btm-no">
|
|
|
|
|
|
+ <div class="icon-con w-33 m-btm-no" :class="{on:onLa}" @click="laClick">
|
|
<div class="icon icon-dot"></div>
|
|
<div class="icon icon-dot"></div>
|
|
<div class="icon-text">
|
|
<div class="icon-text">
|
|
- <h6>0</h6>
|
|
|
|
|
|
+ <h6>{{ loudspeakerNum }}</h6>
|
|
<h5>大喇叭</h5>
|
|
<h5>大喇叭</h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -108,7 +106,7 @@
|
|
<div class="i-list-con h-43">
|
|
<div class="i-list-con h-43">
|
|
<el-input
|
|
<el-input
|
|
v-model="rightDeptName"
|
|
v-model="rightDeptName"
|
|
- placeholder="请输入摄像头名称"
|
|
|
|
|
|
+ :placeholder="placeholderMsg"
|
|
clearable
|
|
clearable
|
|
size="small"
|
|
size="small"
|
|
prefix-icon="el-icon-search"
|
|
prefix-icon="el-icon-search"
|
|
@@ -167,6 +165,8 @@
|
|
import {
|
|
import {
|
|
selectDeviceType,
|
|
selectDeviceType,
|
|
selectCameraByDeptId,
|
|
selectCameraByDeptId,
|
|
|
|
+ getSensorListByDeptId,
|
|
|
|
+ getDlblistBydeptId,
|
|
selectKeyAreaList,
|
|
selectKeyAreaList,
|
|
getCamerasByDeptId,
|
|
getCamerasByDeptId,
|
|
getRegionalFlag
|
|
getRegionalFlag
|
|
@@ -191,6 +191,7 @@ import DHWs from '@/dahua/lib/DHWs'
|
|
/** ----------------------------------摄像头预览结束------------------------------------- */
|
|
/** ----------------------------------摄像头预览结束------------------------------------- */
|
|
// import echarts from 'echarts'
|
|
// import echarts from 'echarts'
|
|
let echarts = require('echarts')
|
|
let echarts = require('echarts')
|
|
|
|
+import Cookies from 'js-cookie';
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -214,9 +215,12 @@ export default {
|
|
/** ----------------------------------底部按钮公用组件结束------------------------------------- */
|
|
/** ----------------------------------底部按钮公用组件结束------------------------------------- */
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.selectDeviceType(-1)
|
|
|
|
this.selectKeyAreaList()
|
|
this.selectKeyAreaList()
|
|
this.getTreeselect()
|
|
this.getTreeselect()
|
|
|
|
+ this.deptId = Cookies.get("deptId")
|
|
|
|
+ this.getSensorListByDeptId()
|
|
|
|
+ this.getDlblistBydeptId()
|
|
|
|
+ this.selectDeviceType(-1)
|
|
this.bottomMenuList() //获取底部公共组件消息和任务
|
|
this.bottomMenuList() //获取底部公共组件消息和任务
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
@@ -247,7 +251,7 @@ export default {
|
|
pubKey: '',
|
|
pubKey: '',
|
|
oWebControl: null,
|
|
oWebControl: null,
|
|
/** ----------------------------------摄像头预览结束------------------------------------- */
|
|
/** ----------------------------------摄像头预览结束------------------------------------- */
|
|
- visuForestCloudMapDeviceBOList: [],
|
|
|
|
|
|
+ visuForestCloudMapDeviceBOList: [{deviceCount: 0, deviceName: "摄像头"}],
|
|
visuForestCloudCameraBOList: [],
|
|
visuForestCloudCameraBOList: [],
|
|
cameraMarkersList: [],
|
|
cameraMarkersList: [],
|
|
sourceData: [],
|
|
sourceData: [],
|
|
@@ -267,6 +271,16 @@ export default {
|
|
indentText: '收起左右栏',
|
|
indentText: '收起左右栏',
|
|
indentdisabled: false,
|
|
indentdisabled: false,
|
|
domId: 'dom1',
|
|
domId: 'dom1',
|
|
|
|
+ placeholderMsg: "请输入摄像头名称",
|
|
|
|
+ localMark: "she",
|
|
|
|
+ onShe: false,
|
|
|
|
+ onChuan: false,
|
|
|
|
+ onLa: false,
|
|
|
|
+ colors: "green",
|
|
|
|
+ sensorNum: 0,
|
|
|
|
+ deptId: '',
|
|
|
|
+ loudspeakerNum: 0,
|
|
|
|
+ values: Math.random()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -338,12 +352,154 @@ export default {
|
|
// 节点单击事件
|
|
// 节点单击事件
|
|
handleNodeClick(data) {
|
|
handleNodeClick(data) {
|
|
let that = this
|
|
let that = this
|
|
- console.log("节点单击事件",data);
|
|
|
|
- // this.findCameraByDept(data.id)
|
|
|
|
- that.selectCameraByDeptId(data.id);
|
|
|
|
- getCamerasByDeptId(data.id).then(res => {
|
|
|
|
- that.$refs.TVWalls.showTVWall(res.data, {longitude: data.deptLongitude, latitude: data.deptLatitude});
|
|
|
|
|
|
+ that.deptId = data.id
|
|
|
|
+ if (that.localMark == 'she') {
|
|
|
|
+ that.selectCameraByDeptId(data.id);
|
|
|
|
+ getCamerasByDeptId(data.id).then(res => {
|
|
|
|
+ that.$refs.TVWalls.showTVWall(res.data, {longitude: data.deptLongitude, latitude: data.deptLatitude});
|
|
|
|
+ })
|
|
|
|
+ } else if (that.localMark == 'chuan') {
|
|
|
|
+ that.getSensorListByDeptId()
|
|
|
|
+ } else if (that.localMark == 'la') {
|
|
|
|
+ that.getDlblistBydeptId()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ sheClick() {
|
|
|
|
+ this.onLa = false
|
|
|
|
+ this.onShe = true
|
|
|
|
+ this.onChuan = false
|
|
|
|
+ this.localMark = 'she'
|
|
|
|
+ this.placeholderMsg = "请输入摄像头名称"
|
|
|
|
+ this.selectDeviceType()
|
|
|
|
+ },
|
|
|
|
+ laClick() {
|
|
|
|
+ this.onLa = true
|
|
|
|
+ this.onShe = false
|
|
|
|
+ this.onChuan = false
|
|
|
|
+ this.localMark = 'la'
|
|
|
|
+ this.placeholderMsg = "请输入大喇叭名称"
|
|
|
|
+ this.getDlblistBydeptId()
|
|
|
|
+ },
|
|
|
|
+ chuanClick() {
|
|
|
|
+ this.onLa = false
|
|
|
|
+ this.onShe = false
|
|
|
|
+ this.onChuan = true
|
|
|
|
+ this.localMark = 'chuan'
|
|
|
|
+ this.placeholderMsg = "请输入传感器名称"
|
|
|
|
+ this.getSensorListByDeptId()
|
|
|
|
+ },
|
|
|
|
+ // 大喇叭
|
|
|
|
+ getDlblistBydeptId() {
|
|
|
|
+ let that = this;
|
|
|
|
+ let markersList = [];
|
|
|
|
+ getDlblistBydeptId(that.deptId).then(function (res) {
|
|
|
|
+ that.loudspeakerNum = res.data.length
|
|
|
|
+ that.visuForestCloudCameraBOListSearch = []
|
|
|
|
+ if (res.data != null && res.data.length > 0) {
|
|
|
|
+ for (let j = 0; j < res.data.length; j++) {
|
|
|
|
+ let dat = {
|
|
|
|
+ cameraName: res.data[j].name,
|
|
|
|
+ longitude: res.data[j].longitude,
|
|
|
|
+ latitude: res.data[j].latitude,
|
|
|
|
+ }
|
|
|
|
+ that.visuForestCloudCameraBOListSearch.push(dat)
|
|
|
|
+ }
|
|
|
|
+ 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,
|
|
|
|
+ };
|
|
|
|
+ markersMap.icon = "big-horn";
|
|
|
|
+
|
|
|
|
+ markersMap.lng = res.data[i].longitude;
|
|
|
|
+ markersMap.lat = res.data[i].latitude;
|
|
|
|
+ markersList.push(markersMap);
|
|
|
|
+ }
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ that.$refs.supermap.clearM(false);
|
|
|
|
+ that.$refs.supermap.clearM(true);
|
|
|
|
+ that.$refs.supermap.setMarkers(markersList);
|
|
|
|
+ }, 2000);
|
|
|
|
+ } else {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ that.$refs.supermap.clearM(false);
|
|
|
|
+ that.$refs.supermap.clearM(true);
|
|
|
|
+ }, 2000);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch(function (error) {
|
|
|
|
+ console.error(error);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 传感器
|
|
|
|
+ getSensorListByDeptId() {
|
|
|
|
+ let that = this;
|
|
|
|
+ let markersList = [];
|
|
|
|
+ getSensorListByDeptId(that.deptId).then(function (res) {
|
|
|
|
+ that.visuForestCloudCameraBOListSearch = []
|
|
|
|
+ that.sensorNum = res.data.length
|
|
|
|
+ if (res.data != null && res.data.length > 0) {
|
|
|
|
+ for (let j = 0; j < res.data.length; j++) {
|
|
|
|
+ let dat = {
|
|
|
|
+ cameraName: res.data[j].deviceName,
|
|
|
|
+ longitude: res.data[j].longitude,
|
|
|
|
+ latitude: res.data[j].latitude,
|
|
|
|
+ }
|
|
|
|
+ that.visuForestCloudCameraBOListSearch.push(dat)
|
|
|
|
+ }
|
|
|
|
+ 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[i].deviceCode == '001') { // 水质传感器
|
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_water_quality_sensor";
|
|
|
|
+ } else if (res.data[i].deviceCode == '002') { // 水尺
|
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_water_gauge";
|
|
|
|
+ } else if (res.data[i].deviceCode == '003') { // 水文监测设备
|
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_hydrological_monitoring_equipment";
|
|
|
|
+ } else if (res.data[i].deviceCode == '004') { // 土壤监测设备
|
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_soil_monitoring_equipment";
|
|
|
|
+ } else if (res.data[i].deviceCode == '005') { // 病虫害监测站
|
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_pest_and_disease_monitoring_station";
|
|
|
|
+ } else if (res.data[i].deviceCode == '006') { // 大气传感器
|
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_atmospheric_sensor";
|
|
|
|
+ } else if (res.data[i].deviceCode == '007') { // 水压传感器
|
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_water_pressure_sensor";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ markersMap.lng = res.data[i].longitude;
|
|
|
|
+ markersMap.lat = res.data[i].latitude;
|
|
|
|
+
|
|
|
|
+ markersList.push(markersMap);
|
|
|
|
+ }
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ that.$refs.supermap.clearM(false);
|
|
|
|
+ that.$refs.supermap.clearM(true);
|
|
|
|
+ that.$refs.supermap.setMarkersA(markersList);
|
|
|
|
+ }, 2000);
|
|
|
|
+ } else {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ that.$refs.supermap.clearM(false);
|
|
|
|
+ that.$refs.supermap.clearM(true);
|
|
|
|
+ }, 2000);
|
|
|
|
+ }
|
|
})
|
|
})
|
|
|
|
+ .catch(function (error) {
|
|
|
|
+ console.error(error);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
selectKeyAreaList() {
|
|
selectKeyAreaList() {
|
|
this.keyAreaList=[]
|
|
this.keyAreaList=[]
|