|
@@ -148,8 +148,8 @@
|
|
getSensorListByDeptId,
|
|
getSensorListByDeptId,
|
|
getDlblistBydeptId,
|
|
getDlblistBydeptId,
|
|
selectKeyAreaList,
|
|
selectKeyAreaList,
|
|
- getCamerasByDeptId,
|
|
|
|
- getRegionalFlag
|
|
|
|
|
|
+ getRegionalFlag,
|
|
|
|
+ getCamerasByDeptId
|
|
} from '@/api/monitor'
|
|
} from '@/api/monitor'
|
|
import {
|
|
import {
|
|
treeselect
|
|
treeselect
|
|
@@ -198,25 +198,29 @@
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.selectKeyAreaList()
|
|
this.selectKeyAreaList()
|
|
|
|
+ this.bottomMenuList() //获取底部公共组件消息和任务
|
|
this.getTreeselect()
|
|
this.getTreeselect()
|
|
this.deptId = Cookies.get("deptId")
|
|
this.deptId = Cookies.get("deptId")
|
|
this.getSensorListByDeptIds()
|
|
this.getSensorListByDeptIds()
|
|
this.getDlblistBydeptIds()
|
|
this.getDlblistBydeptIds()
|
|
this.selectDeviceType(-1)
|
|
this.selectDeviceType(-1)
|
|
- this.bottomMenuList() //获取底部公共组件消息和任务
|
|
|
|
|
|
+ // this.showTVWall();
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ //摄像头名称
|
|
|
|
+ rightDeptName: undefined,
|
|
|
|
+ visuForestCloudCameraBOListSearch: [],
|
|
// 部门名称
|
|
// 部门名称
|
|
cgqData:'',
|
|
cgqData:'',
|
|
deptName: undefined,
|
|
deptName: undefined,
|
|
|
|
+ deptId: '',
|
|
// 部门树选项
|
|
// 部门树选项
|
|
deptOptions: undefined,
|
|
deptOptions: undefined,
|
|
defaultProps: {
|
|
defaultProps: {
|
|
children: 'children',
|
|
children: 'children',
|
|
label: 'label'
|
|
label: 'label'
|
|
},
|
|
},
|
|
- iconCurrentIndex1: '-1',
|
|
|
|
listCurrentIndex1: '-1',
|
|
listCurrentIndex1: '-1',
|
|
listCurrentIndex2: '-1',
|
|
listCurrentIndex2: '-1',
|
|
listCurrentIndex3: '-1',
|
|
listCurrentIndex3: '-1',
|
|
@@ -248,28 +252,26 @@
|
|
activeName: 'info',
|
|
activeName: 'info',
|
|
radio: '1',
|
|
radio: '1',
|
|
region: [],
|
|
region: [],
|
|
- rightDeptName: undefined,
|
|
|
|
- visuForestCloudCameraBOListSearch: [],
|
|
|
|
//左右缩进
|
|
//左右缩进
|
|
indentStyle: '',
|
|
indentStyle: '',
|
|
indentleft: '',
|
|
indentleft: '',
|
|
indentright: '',
|
|
indentright: '',
|
|
indentText: '收起左右栏',
|
|
indentText: '收起左右栏',
|
|
indentdisabled: false,
|
|
indentdisabled: false,
|
|
- domId: 'dom1',
|
|
|
|
placeholderMsg: "请输入摄像头名称",
|
|
placeholderMsg: "请输入摄像头名称",
|
|
|
|
+ domId: 'dom1',
|
|
localMark: "she",
|
|
localMark: "she",
|
|
onShe: false,
|
|
onShe: false,
|
|
onChuan: false,
|
|
onChuan: false,
|
|
onLa: false,
|
|
onLa: false,
|
|
colors: "green",
|
|
colors: "green",
|
|
sensorNum: 0,
|
|
sensorNum: 0,
|
|
- deptId: '',
|
|
|
|
loudspeakerNum: 0,
|
|
loudspeakerNum: 0,
|
|
values: Math.random()
|
|
values: Math.random()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
|
|
+
|
|
// 根据名称筛选部门树
|
|
// 根据名称筛选部门树
|
|
deptName(val) {
|
|
deptName(val) {
|
|
this.$refs.tree.filter(val)
|
|
this.$refs.tree.filter(val)
|
|
@@ -300,34 +302,45 @@
|
|
that.cgqData = "<span style='color:" + color + "'>" + value + "</span>";
|
|
that.cgqData = "<span style='color:" + color + "'>" + value + "</span>";
|
|
}, 1000)
|
|
}, 1000)
|
|
},
|
|
},
|
|
|
|
+
|
|
/* 电视墙替换开始 */
|
|
/* 电视墙替换开始 */
|
|
showTVWall(channelCode, channelName) {
|
|
showTVWall(channelCode, channelName) {
|
|
- // let channelCode = '6044981090191552';
|
|
|
|
- // let channelName = '复兴大桥中段-交通事故';
|
|
|
|
- let tvListJson = [{
|
|
|
|
- 'switchTab': '1',
|
|
|
|
- 'treeLabels': [{
|
|
|
|
- 'labelCode': '123456',
|
|
|
|
- 'labelName': '视频场景',
|
|
|
|
- 'parentLabelCode': null
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- 'labelCode': 'd941adbbd3e64dac92cc448dec5293cd',
|
|
|
|
- 'labelName': channelName,
|
|
|
|
- 'parentLabelCode': 123456
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- 'labelChannels': [{
|
|
|
|
- 'channelDates': [{
|
|
|
|
- 'channelCode': channelCode,
|
|
|
|
- 'channelName': channelName,
|
|
|
|
- 'channelSn': null,
|
|
|
|
- 'cameraType': 1,
|
|
|
|
- 'online': 1
|
|
|
|
- }],
|
|
|
|
- 'labelCode': 'd941adbbd3e64dac92cc448dec5293cd'
|
|
|
|
- }]
|
|
|
|
- }]
|
|
|
|
|
|
+ let tvListJson = [
|
|
|
|
+ {
|
|
|
|
+ "switchTab": "2",
|
|
|
|
+ "treeLabels": [
|
|
|
|
+ {
|
|
|
|
+ "id": null,
|
|
|
|
+ "labelCode": "999",
|
|
|
|
+ "labelName": "电视墙",
|
|
|
|
+ "cameraType": null,
|
|
|
|
+ "parentLabelCode": ""
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "id": "spcamera00010",
|
|
|
|
+ "labelCode": channelCode,
|
|
|
|
+ "labelName": channelName,
|
|
|
|
+ "cameraType": "1",
|
|
|
|
+ "parentLabelCode": "999"
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ "labelChannels": [
|
|
|
|
+ {
|
|
|
|
+ "labelCode": channelCode,
|
|
|
|
+ "channelDates": [
|
|
|
|
+ {
|
|
|
|
+ "channelCode": channelCode,
|
|
|
|
+ "channelName": channelName,
|
|
|
|
+ "channelSn": null,
|
|
|
|
+ "cameraType": "1",
|
|
|
|
+ "online": "1",
|
|
|
|
+ "cameraCode": "1"
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
this.$refs.TVWall.showTVWall(tvListJson, [{
|
|
this.$refs.TVWall.showTVWall(tvListJson, [{
|
|
"channelId": channelCode
|
|
"channelId": channelCode
|
|
}]);
|
|
}]);
|
|
@@ -354,6 +367,8 @@
|
|
handleNodeClick(data) {
|
|
handleNodeClick(data) {
|
|
let that = this
|
|
let that = this
|
|
that.deptId = data.id
|
|
that.deptId = data.id
|
|
|
|
+ console.log("节点单击事件", data, that.localMark);
|
|
|
|
+ // this.findCameraByDept(data.id)
|
|
if (that.localMark == 'she') {
|
|
if (that.localMark == 'she') {
|
|
that.selectCameraByDeptId(data.id);
|
|
that.selectCameraByDeptId(data.id);
|
|
getCamerasByDeptId(data.id).then(res => {
|
|
getCamerasByDeptId(data.id).then(res => {
|
|
@@ -414,8 +429,9 @@
|
|
lat: 43.02,
|
|
lat: 43.02,
|
|
icon: "marker",
|
|
icon: "marker",
|
|
bindPopupHtml: "",
|
|
bindPopupHtml: "",
|
|
- click: "",
|
|
|
|
|
|
+ click: i,
|
|
parameter: "",
|
|
parameter: "",
|
|
|
|
+ name: "",
|
|
keepBindPopup: false,
|
|
keepBindPopup: false,
|
|
isAggregation: false,
|
|
isAggregation: false,
|
|
};
|
|
};
|
|
@@ -429,12 +445,12 @@
|
|
that.$refs.supermap.clearM();
|
|
that.$refs.supermap.clearM();
|
|
that.$refs.supermap.clearMRadius()
|
|
that.$refs.supermap.clearMRadius()
|
|
that.$refs.supermap.setMarkers(markersList);
|
|
that.$refs.supermap.setMarkers(markersList);
|
|
- }, 3000);
|
|
|
|
|
|
+ }, 2000);
|
|
} else {
|
|
} else {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
that.$refs.supermap.clearM();
|
|
that.$refs.supermap.clearM();
|
|
that.$refs.supermap.clearMRadius()
|
|
that.$refs.supermap.clearMRadius()
|
|
- }, 3000);
|
|
|
|
|
|
+ }, 2000);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
.catch(function(error) {
|
|
.catch(function(error) {
|
|
@@ -476,24 +492,25 @@
|
|
bindPopupHtml: "",
|
|
bindPopupHtml: "",
|
|
click: "",
|
|
click: "",
|
|
parameter: "",
|
|
parameter: "",
|
|
|
|
+ name: i,
|
|
keepBindPopup: false,
|
|
keepBindPopup: false,
|
|
isAggregation: false,
|
|
isAggregation: false,
|
|
};
|
|
};
|
|
- if (res.data[i].deviceType == 1) { // 水质传感器
|
|
|
|
- markersMap.icon = "sj-icon-map-centerdata_water_quality_sensor";
|
|
|
|
- } else if (res.data[i].deviceType == '002') { // 水尺
|
|
|
|
- markersMap.icon = "sj-icon-map-centerdata_water_gauge";
|
|
|
|
- } else if (res.data[i].deviceType == '003') { // 水文监测设备
|
|
|
|
- markersMap.icon = "sj-icon-map-centerdata_hydrological_monitoring_equipment";
|
|
|
|
- } else if (res.data[i].deviceType == 2) { // 土壤监测设备
|
|
|
|
- markersMap.icon = "sj-icon-map-centerdata_soil_monitoring_equipment";
|
|
|
|
- } else if (res.data[i].deviceType == 4) { // 病虫害监测站
|
|
|
|
- markersMap.icon = "sj-icon-map-centerdata_pest_and_disease_monitoring_station";
|
|
|
|
- } else if (res.data[i].deviceType == 5) { // 大气传感器
|
|
|
|
- markersMap.icon = "sj-icon-map-centerdata_atmospheric_sensor";
|
|
|
|
- } else if (res.data[i].deviceType == 6) { // 水压传感器
|
|
|
|
- markersMap.icon = "sj-icon-map-centerdata_water_pressure_sensor";
|
|
|
|
- }
|
|
|
|
|
|
+ if (res.data[i].deviceType == 1) { // 水质传感器
|
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_water_quality_sensor";
|
|
|
|
+ } else if (res.data[i].deviceType == '002') { // 水尺
|
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_water_gauge";
|
|
|
|
+ } else if (res.data[i].deviceType == '003') { // 水文监测设备
|
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_hydrological_monitoring_equipment";
|
|
|
|
+ } else if (res.data[i].deviceType == 2) { // 土壤监测设备
|
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_soil_monitoring_equipment";
|
|
|
|
+ } else if (res.data[i].deviceType == 4) { // 病虫害监测站
|
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_pest_and_disease_monitoring_station";
|
|
|
|
+ } else if (res.data[i].deviceType == 5) { // 大气传感器
|
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_atmospheric_sensor";
|
|
|
|
+ } else if (res.data[i].deviceType == 6) { // 水压传感器
|
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_water_pressure_sensor";
|
|
|
|
+ }
|
|
|
|
|
|
markersMap.lng = res.data[i].longitude;
|
|
markersMap.lng = res.data[i].longitude;
|
|
markersMap.lat = res.data[i].latitude;
|
|
markersMap.lat = res.data[i].latitude;
|
|
@@ -504,12 +521,12 @@
|
|
that.$refs.supermap.clearM();
|
|
that.$refs.supermap.clearM();
|
|
that.$refs.supermap.clearMRadius()
|
|
that.$refs.supermap.clearMRadius()
|
|
that.$refs.supermap.setMarkers(markersList);
|
|
that.$refs.supermap.setMarkers(markersList);
|
|
- }, 3000);
|
|
|
|
|
|
+ }, 2000);
|
|
} else {
|
|
} else {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
that.$refs.supermap.clearM();
|
|
that.$refs.supermap.clearM();
|
|
that.$refs.supermap.clearMRadius()
|
|
that.$refs.supermap.clearMRadius()
|
|
- }, 3000);
|
|
|
|
|
|
+ }, 2000);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
.catch(function(error) {
|
|
.catch(function(error) {
|
|
@@ -518,9 +535,7 @@
|
|
},
|
|
},
|
|
getSensorListByDeptIds() {
|
|
getSensorListByDeptIds() {
|
|
let that = this;
|
|
let that = this;
|
|
- let markersList = [];
|
|
|
|
getSensorListByDeptId(that.deptId).then(function(res) {
|
|
getSensorListByDeptId(that.deptId).then(function(res) {
|
|
-
|
|
|
|
that.sensorNum = res.data.length
|
|
that.sensorNum = res.data.length
|
|
|
|
|
|
})
|
|
})
|
|
@@ -550,7 +565,7 @@
|
|
}
|
|
}
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
that.$refs.supermap.clearG()
|
|
that.$refs.supermap.clearG()
|
|
- that.$refs.supermap.setGraphicsList(this.graphicsList, 'red', 0.8)
|
|
|
|
|
|
+ that.$refs.supermap.setGraphicsList(this.graphicsList, 'red',0.8)
|
|
}, 1000)
|
|
}, 1000)
|
|
} else {
|
|
} else {
|
|
that.$refs.supermap.clearG()
|
|
that.$refs.supermap.clearG()
|
|
@@ -623,8 +638,7 @@
|
|
this.$refs.supermap.layerSwitchingList(urlList)
|
|
this.$refs.supermap.layerSwitchingList(urlList)
|
|
},
|
|
},
|
|
/** ----------------------------------底部按钮公用组件结束------------------------------------- */
|
|
/** ----------------------------------底部按钮公用组件结束------------------------------------- */
|
|
- selectDeviceType(index) {
|
|
|
|
- this.iconCurrentIndex1 = index
|
|
|
|
|
|
+ selectDeviceType() {
|
|
//获取左侧动态感知设备
|
|
//获取左侧动态感知设备
|
|
let that = this
|
|
let that = this
|
|
selectDeviceType().then(res => {
|
|
selectDeviceType().then(res => {
|
|
@@ -642,11 +656,9 @@
|
|
this.sourceData.push(aa)
|
|
this.sourceData.push(aa)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
that.visuForestCloudCameraBOList = res.data.visuForestCloudCameraBOList
|
|
that.visuForestCloudCameraBOList = res.data.visuForestCloudCameraBOList
|
|
that.visuForestCloudCameraBOListSearch = res.data.visuForestCloudCameraBOList
|
|
that.visuForestCloudCameraBOListSearch = res.data.visuForestCloudCameraBOList
|
|
- if (res.data.visuForestCloudCameraBOList != null && res.data.visuForestCloudCameraBOList
|
|
|
|
- .length > 0) {
|
|
|
|
|
|
+ if (res.data.visuForestCloudCameraBOList != null && res.data.visuForestCloudCameraBOList.length > 0) {
|
|
for (let i = 0; i < res.data.visuForestCloudCameraBOList.length; i++) {
|
|
for (let i = 0; i < res.data.visuForestCloudCameraBOList.length; i++) {
|
|
let markersMap = {
|
|
let markersMap = {
|
|
lng: 124.59,
|
|
lng: 124.59,
|
|
@@ -655,6 +667,7 @@
|
|
bindPopupHtml: '',
|
|
bindPopupHtml: '',
|
|
click: 'preview',
|
|
click: 'preview',
|
|
parameter: '',
|
|
parameter: '',
|
|
|
|
+ name: i,
|
|
keepBindPopup: false,
|
|
keepBindPopup: false,
|
|
isAggregation: false
|
|
isAggregation: false
|
|
}
|
|
}
|
|
@@ -727,7 +740,7 @@
|
|
that.$refs.supermap.clearM();
|
|
that.$refs.supermap.clearM();
|
|
that.$refs.supermap.clearMRadius()
|
|
that.$refs.supermap.clearMRadius()
|
|
that.$refs.supermap.setMarkersRadius(this.cameraMarkersList)
|
|
that.$refs.supermap.setMarkersRadius(this.cameraMarkersList)
|
|
- }, 1000)
|
|
|
|
|
|
+ }, 3000)
|
|
} else {
|
|
} else {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
that.$refs.supermap.clearM();
|
|
that.$refs.supermap.clearM();
|
|
@@ -738,7 +751,7 @@
|
|
},
|
|
},
|
|
dropLocation(lat, lng, index) {
|
|
dropLocation(lat, lng, index) {
|
|
this.listCurrentIndex2 = index
|
|
this.listCurrentIndex2 = index
|
|
- this.$refs.supermap.dropLocation(lat, lng)
|
|
|
|
|
|
+ this.$refs.supermap.dropLocation(lat, lng, 15)
|
|
},
|
|
},
|
|
selectCameraByDeptId(depId) {
|
|
selectCameraByDeptId(depId) {
|
|
this.listCurrentIndex1 = depId
|
|
this.listCurrentIndex1 = depId
|
|
@@ -758,6 +771,7 @@
|
|
bindPopupHtml: '',
|
|
bindPopupHtml: '',
|
|
click: 'preview',
|
|
click: 'preview',
|
|
parameter: '',
|
|
parameter: '',
|
|
|
|
+ name: i,
|
|
keepBindPopup: false,
|
|
keepBindPopup: false,
|
|
isAggregation: false
|
|
isAggregation: false
|
|
}
|
|
}
|
|
@@ -808,28 +822,12 @@
|
|
' </span>' +
|
|
' </span>' +
|
|
'</div>'
|
|
'</div>'
|
|
this.cameraMarkersList.push(markersMap)
|
|
this.cameraMarkersList.push(markersMap)
|
|
- // cameraAccount: "1"
|
|
|
|
- // cameraCode: "1000010"
|
|
|
|
- // cameraFactory: "2"
|
|
|
|
- // cameraIp: "1"
|
|
|
|
- // cameraName: "2"
|
|
|
|
- // cameraPasword: "2"
|
|
|
|
- // cameraPort: 2
|
|
|
|
- // cameraRadius: 20
|
|
|
|
- // cameraRegion: "3"
|
|
|
|
- // dataDeptId: null
|
|
|
|
- // dataStatus: null
|
|
|
|
- // eventType: null
|
|
|
|
- // height: "11"
|
|
|
|
- // id: "0d165fc362514f79b12a899ea66295fd"
|
|
|
|
- // latitude: "49.325625"
|
|
|
|
- // longitude: "125.3333"
|
|
|
|
}
|
|
}
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- that.$refs.supermap.clearM();
|
|
|
|
that.$refs.supermap.clearMRadius()
|
|
that.$refs.supermap.clearMRadius()
|
|
|
|
+ that.$refs.supermap.clearM();
|
|
that.$refs.supermap.setMarkersRadius(this.cameraMarkersList)
|
|
that.$refs.supermap.setMarkersRadius(this.cameraMarkersList)
|
|
- }, 1000)
|
|
|
|
|
|
+ }, 3000)
|
|
} else {
|
|
} else {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
that.$refs.supermap.clearM();
|
|
that.$refs.supermap.clearM();
|