|
@@ -78,7 +78,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 地图 -->
|
|
|
- <supermap ref="supermap" style="width: 100%;height: 100vh;" @preview="preview">
|
|
|
+ <supermap ref="supermap" style="width: 100%;height: 100vh;" @preview="preview" @jump="jump">
|
|
|
</supermap>
|
|
|
<!-- 右侧 -->
|
|
|
<div class="rightbar" :class="indentright" ref="right">
|
|
@@ -96,7 +96,8 @@
|
|
|
:class="{on:listCurrentIndex2 == index}" v-on:click="dropLocation(item.latitude,item.longitude,index)">
|
|
|
<div class="d-l-l-text">
|
|
|
<i class="iconfont sj-icon-jkzx icon-sxt"></i>
|
|
|
- <h4>{{ item.cameraName }}</h4><h4 v-if="onChuan" v-html="cgqData[index]"></h4>
|
|
|
+ <h4>{{ item.cameraName }}</h4>
|
|
|
+ <h4 v-if="onChuan" v-html="cgqData[index]"></h4>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -202,17 +203,17 @@
|
|
|
this.bottomMenuList() //获取底部公共组件消息和任务
|
|
|
this.getTreeselect()
|
|
|
this.deptId = Cookies.get("deptId")
|
|
|
- //this.getSensorListByDeptIds()
|
|
|
+ //this.getSensorListByDeptIds()
|
|
|
this.chuanSet()
|
|
|
- this.getMonitorDeviceAndDataList()
|
|
|
- this.getDlblistBydeptIds()
|
|
|
+ this.getMonitorDeviceAndDataLists()
|
|
|
+ this.getDlblistBydeptIds()
|
|
|
this.selectDeviceType(-1)
|
|
|
// this.showTVWall();
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
|
|
|
- cgqData:[],
|
|
|
+ cgqData: [],
|
|
|
//摄像头名称
|
|
|
rightDeptName: undefined,
|
|
|
visuForestCloudCameraBOListSearch: [],
|
|
@@ -290,8 +291,11 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- setcgqValue:function(){
|
|
|
- let that=this
|
|
|
+ jump() { // 跳转大喇叭页面
|
|
|
+ window.open("https://sts.sty1818.com");
|
|
|
+ },
|
|
|
+ setcgqValue: function() {
|
|
|
+ let that = this
|
|
|
for (let i = 0; i < that.visuForestCloudCameraBOListSearch.length; i++) {
|
|
|
var color = "green";
|
|
|
var value = Math.random();
|
|
@@ -317,7 +321,7 @@
|
|
|
value = value + "" + down;
|
|
|
}
|
|
|
that.cgqData.push("<span style='color:" + color + "'>" + value + "</span>")
|
|
|
- if(that.cgqData.length>that.visuForestCloudCameraBOListSearch.length){
|
|
|
+ if (that.cgqData.length > that.visuForestCloudCameraBOListSearch.length) {
|
|
|
console.log(that.cgqData)
|
|
|
that.cgqData.splice(0, 1)
|
|
|
}
|
|
@@ -325,42 +329,35 @@
|
|
|
},
|
|
|
/* 电视墙替换开始 */
|
|
|
showTVWall(channelCode, channelName) {
|
|
|
- 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"
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
+ 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, [{
|
|
|
"channelId": channelCode
|
|
|
}]);
|
|
@@ -421,7 +418,9 @@
|
|
|
this.getDlblistBydeptId()
|
|
|
},
|
|
|
chuanClick() {
|
|
|
-
|
|
|
+ this.onLa = false
|
|
|
+ this.onShe = false
|
|
|
+ this.onChuan = true
|
|
|
this.localMark = 'chuan'
|
|
|
this.placeholderMsg = "请输入传感器名称"
|
|
|
//this.getSensorListByDeptId()
|
|
@@ -450,7 +449,7 @@
|
|
|
lat: 43.02,
|
|
|
icon: "marker",
|
|
|
bindPopupHtml: "",
|
|
|
- click: i,
|
|
|
+ click: 'jump',
|
|
|
parameter: "",
|
|
|
name: "",
|
|
|
keepBindPopup: false,
|
|
@@ -464,13 +463,13 @@
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
that.$refs.supermap.clearM();
|
|
|
- that.$refs.supermap.clearMRadius()
|
|
|
+ that.$refs.supermap.clearMRadius()
|
|
|
that.$refs.supermap.setMarkers(markersList);
|
|
|
}, 2000);
|
|
|
} else {
|
|
|
setTimeout(() => {
|
|
|
that.$refs.supermap.clearM();
|
|
|
- that.$refs.supermap.clearMRadius()
|
|
|
+ that.$refs.supermap.clearMRadius()
|
|
|
}, 2000);
|
|
|
}
|
|
|
})
|
|
@@ -482,15 +481,14 @@
|
|
|
let that = this;
|
|
|
|
|
|
getDlblistBydeptId(that.deptId).then(function(res) {
|
|
|
- that.loudspeakerNum = res.data.length
|
|
|
- })
|
|
|
+ that.loudspeakerNum = res.data.length
|
|
|
+ })
|
|
|
.catch(function(error) {
|
|
|
console.error(error);
|
|
|
});
|
|
|
},
|
|
|
- chuanSet()
|
|
|
- {
|
|
|
- let that =this
|
|
|
+ chuanSet() {
|
|
|
+ let that = this
|
|
|
setInterval(function() {
|
|
|
|
|
|
that.getMonitorDeviceAndDataList()
|
|
@@ -498,14 +496,12 @@
|
|
|
}, 300000)
|
|
|
},
|
|
|
//传感器2
|
|
|
- getMonitorDeviceAndDataList()
|
|
|
- {
|
|
|
- let list=[]
|
|
|
+ getMonitorDeviceAndDataList() {
|
|
|
+ let list = []
|
|
|
let markersList = [];
|
|
|
- getMonitorDeviceAndDataList(this.deptId).then((res)=> {
|
|
|
+ getMonitorDeviceAndDataList(this.deptId).then((res) => {
|
|
|
this.visuForestCloudCameraBOListSearch = []
|
|
|
list = res.data
|
|
|
- this.sensorNum=list.length
|
|
|
list.forEach(item => {
|
|
|
let dat = {
|
|
|
cameraName: item.deviceName,
|
|
@@ -975,7 +971,7 @@
|
|
|
" </span>" +
|
|
|
|
|
|
"</div>";
|
|
|
- } else if (item.deviceType == 7)//水流速传感器
|
|
|
+ } else if (item.deviceType == 7) //水流速传感器
|
|
|
{
|
|
|
markersMap.icon = "sj-icon-map-centerdata_water_pressure_sensor";
|
|
|
markersMap.bindPopupHtml += '<div class="map-tip">' +
|
|
@@ -1029,6 +1025,14 @@
|
|
|
}, 2000);
|
|
|
},
|
|
|
|
|
|
+ //传感器2
|
|
|
+ getMonitorDeviceAndDataLists() {
|
|
|
+ let that = this
|
|
|
+ getMonitorDeviceAndDataList(this.deptId).then((res) => {
|
|
|
+ that.sensorNum = res.data.length
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
// 传感器
|
|
|
getSensorListByDeptId() {
|
|
|
let that = this;
|
|
@@ -1057,19 +1061,19 @@
|
|
|
keepBindPopup: false,
|
|
|
isAggregation: false,
|
|
|
};
|
|
|
- if (res.data[i].deviceType == 1) { // 水质传感器
|
|
|
+ if (res.data[i].deviceType == 1) { // 水质传感器
|
|
|
markersMap.icon = "sj-icon-map-centerdata_water_quality_sensor";
|
|
|
- } else if (res.data[i].deviceType == '002') { // 水尺
|
|
|
+ } else if (res.data[i].deviceType == '002') { // 水尺
|
|
|
markersMap.icon = "sj-icon-map-centerdata_water_gauge";
|
|
|
- } else if (res.data[i].deviceType == '003') { // 水文监测设备
|
|
|
+ } else if (res.data[i].deviceType == '003') { // 水文监测设备
|
|
|
markersMap.icon = "sj-icon-map-centerdata_hydrological_monitoring_equipment";
|
|
|
- } else if (res.data[i].deviceType == 2) { // 土壤监测设备
|
|
|
+ } else if (res.data[i].deviceType == 2) { // 土壤监测设备
|
|
|
markersMap.icon = "sj-icon-map-centerdata_soil_monitoring_equipment";
|
|
|
- } else if (res.data[i].deviceType == 4) { // 病虫害监测站
|
|
|
+ } 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) { // 大气传感器
|
|
|
+ } else if (res.data[i].deviceType == 5) { // 大气传感器
|
|
|
markersMap.icon = "sj-icon-map-centerdata_atmospheric_sensor";
|
|
|
- } else if (res.data[i].deviceType == 6) { // 水压传感器
|
|
|
+ } else if (res.data[i].deviceType == 6) { // 水压传感器
|
|
|
markersMap.icon = "sj-icon-map-centerdata_water_pressure_sensor";
|
|
|
}
|
|
|
|
|
@@ -1081,18 +1085,18 @@
|
|
|
that.setcgqValue()
|
|
|
setTimeout(() => {
|
|
|
that.$refs.supermap.clearM();
|
|
|
- that.$refs.supermap.clearMRadius()
|
|
|
+ that.$refs.supermap.clearMRadius()
|
|
|
that.$refs.supermap.setMarkers(markersList);
|
|
|
}, 2000);
|
|
|
} else {
|
|
|
setTimeout(() => {
|
|
|
that.$refs.supermap.clearM();
|
|
|
- that.$refs.supermap.clearMRadius()
|
|
|
+ that.$refs.supermap.clearMRadius()
|
|
|
}, 2000);
|
|
|
}
|
|
|
- that.onLa = false
|
|
|
- that.onShe = false
|
|
|
- that.onChuan = true
|
|
|
+ that.onLa = false
|
|
|
+ that.onShe = false
|
|
|
+ that.onChuan = true
|
|
|
})
|
|
|
.catch(function(error) {
|
|
|
console.error(error);
|
|
@@ -1101,9 +1105,9 @@
|
|
|
getSensorListByDeptIds() {
|
|
|
let that = this;
|
|
|
getSensorListByDeptId(that.deptId).then(function(res) {
|
|
|
- that.sensorNum = res.data.length
|
|
|
+ that.sensorNum = res.data.length
|
|
|
|
|
|
- })
|
|
|
+ })
|
|
|
.catch(function(error) {
|
|
|
console.error(error);
|
|
|
});
|
|
@@ -1130,7 +1134,7 @@
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
that.$refs.supermap.clearG()
|
|
|
- that.$refs.supermap.setGraphicsList(this.graphicsList, 'red',0.8)
|
|
|
+ that.$refs.supermap.setGraphicsList(this.graphicsList, 'red', 0.8)
|
|
|
}, 1000)
|
|
|
} else {
|
|
|
that.$refs.supermap.clearG()
|
|
@@ -1223,7 +1227,8 @@
|
|
|
}
|
|
|
that.visuForestCloudCameraBOList = 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++) {
|
|
|
let markersMap = {
|
|
|
lng: 124.59,
|
|
@@ -1269,8 +1274,10 @@
|
|
|
'<span>' +
|
|
|
' <div class="d-l-con">' +
|
|
|
' <div class="d-l-l-text">' +
|
|
|
- ' <h4>网络运营商:' + (res.data.visuForestCloudCameraBOList[i].operatorType == "1" ?
|
|
|
- "联通" : (res.data.visuForestCloudCameraBOList[i].operatorType == "2" ? "移动" : "电信")) + '</h4>' +
|
|
|
+ ' <h4>网络运营商:' + (res.data.visuForestCloudCameraBOList[i].operatorType ==
|
|
|
+ "1" ?
|
|
|
+ "联通" : (res.data.visuForestCloudCameraBOList[i].operatorType == "2" ? "移动" : "电信")) +
|
|
|
+ '</h4>' +
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </span>' +
|
|
@@ -1302,13 +1309,13 @@
|
|
|
// longitude: "125.3333"
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
- that.$refs.supermap.clearM();
|
|
|
+ that.$refs.supermap.clearM();
|
|
|
that.$refs.supermap.clearMRadius()
|
|
|
that.$refs.supermap.setMarkersRadius(this.cameraMarkersList)
|
|
|
}, 3000)
|
|
|
} else {
|
|
|
setTimeout(() => {
|
|
|
- that.$refs.supermap.clearM();
|
|
|
+ that.$refs.supermap.clearM();
|
|
|
that.$refs.supermap.clearMRadius()
|
|
|
}, 1000)
|
|
|
}
|
|
@@ -1390,12 +1397,12 @@
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
that.$refs.supermap.clearMRadius()
|
|
|
- that.$refs.supermap.clearM();
|
|
|
+ that.$refs.supermap.clearM();
|
|
|
that.$refs.supermap.setMarkersRadius(this.cameraMarkersList)
|
|
|
}, 3000)
|
|
|
} else {
|
|
|
setTimeout(() => {
|
|
|
- that.$refs.supermap.clearM();
|
|
|
+ that.$refs.supermap.clearM();
|
|
|
that.$refs.supermap.clearMRadius()
|
|
|
}, 1000)
|
|
|
}
|
|
@@ -1483,7 +1490,8 @@
|
|
|
cameraCode: cameraParam.code
|
|
|
}).then(newResponse => {
|
|
|
that.cameraTitle = '摄像头-' + newResponse.data.cameraName
|
|
|
- that.initPlugin(newResponse.data.appkey, newResponse.data.loginIp, newResponse.data.secret, newResponse
|
|
|
+ that.initPlugin(newResponse.data.appkey, newResponse.data.loginIp, newResponse.data.secret,
|
|
|
+ newResponse
|
|
|
.data.loginPort)
|
|
|
setTimeout(function() {
|
|
|
that.playhk(newResponse.data.channelCode)
|
|
@@ -1521,9 +1529,9 @@
|
|
|
})
|
|
|
|
|
|
that.oWebControl.JS_CreateWnd('playWnd', 1020, 600).then(
|
|
|
- function() { //JS_CreateWnd创建视频播放窗口,宽高可设定
|
|
|
- that.init(newappkey, newloginIp, newsecret, newloginPort) // 创建播放实例成功后初始化
|
|
|
- })
|
|
|
+ function() { //JS_CreateWnd创建视频播放窗口,宽高可设定
|
|
|
+ that.init(newappkey, newloginIp, newsecret, newloginPort) // 创建播放实例成功后初始化
|
|
|
+ })
|
|
|
}, function() { // 启动插件服务失败
|
|
|
})
|
|
|
},
|