代码提交
This commit is contained in:
parent
a722270b89
commit
e455026e22
Binary file not shown.
|
@ -0,0 +1,108 @@
|
|||
.mainContainer {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
@media screen and (min-width: 1152px) {
|
||||
.mainContainer {
|
||||
display: block;
|
||||
width: 1152px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.video-container {
|
||||
position: relative;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.video-container:before {
|
||||
display: block;
|
||||
content: "";
|
||||
width: 100%;
|
||||
padding-bottom: 56.25%;
|
||||
}
|
||||
|
||||
.video-container > div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.video-container video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.urlInput {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 8px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.centeredVideo {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: auto;
|
||||
}
|
||||
|
||||
.controls {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 8px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.logcatBox {
|
||||
border-color: #CCCCCC;
|
||||
font-size: 11px;
|
||||
font-family: Menlo, Consolas, monospace;
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.url-input , .options {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.url-input {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.url-input label {
|
||||
flex: initial;
|
||||
}
|
||||
|
||||
.url-input input {
|
||||
flex: auto;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.url-input button {
|
||||
flex: initial;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.options {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,49 @@
|
|||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>视频监控</title>
|
||||
</head>
|
||||
<body style="margin:0px;width: 1000px;;height: 582px;overflow: hidden;z-index: 99;">
|
||||
<script src="flv.min.js"></script>
|
||||
<video id="videoElement" style="width: 1000px;height: 582px;" muted></video>
|
||||
|
||||
<script>
|
||||
var a=getParam('name')
|
||||
|
||||
console.log(a,'sssss');
|
||||
|
||||
if (flvjs.isSupported()) {
|
||||
var videoElement = document.getElementById('videoElement');
|
||||
var flvPlayer = flvjs.createPlayer({
|
||||
type: 'flv',
|
||||
isLive: true,
|
||||
// url: 'ws://172.16.1.209:8998/rtsp/1/channel=1&subtype=0/?url=rtsp://admin:5Gpmlabs@172.16.1.242:554/cam/realmonitor?channel=1&subtype=0'
|
||||
// url: 'ws://223.112.17.26:12309/rtsp/1/channel=1&subtype=0/?url=rtsp://admin:5Gpmlabs@10.16.1.1:10086/cam/realmonitor'
|
||||
// url: 'ws://172.16.1.21:12309/rtsp/1/a/?url=rtsp://127.0.0.1:12310/live/'+a
|
||||
// url: 'ws://223.112.17.26:12309/rtsp/1/a/?url=rtsp://127.0.0.1:12310/live/'+a
|
||||
// url: 'ws://223.112.17.26:12309/rtsp/1/channel=1&subtype=0/?url=rtsp://127.0.0.1:12310/live/'+a
|
||||
url: 'ws://119.45.94.212:12309/rtsp/1/a/?url=rtsp://127.0.0.1:12310/live/'+a
|
||||
});
|
||||
flvPlayer.attachMediaElement(videoElement);
|
||||
flvPlayer.load();
|
||||
flvPlayer.play();
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getParam(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
//search,查询?后面的参数,并匹配正则
|
||||
var r = location.search.substr(1).match(reg);
|
||||
let val = 'videoPlayer'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*')
|
||||
if (r != null) return decodeURI(decodeURI(r[2]));
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>video</title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
|
||||
let socket;
|
||||
|
||||
function startWebsocket() {
|
||||
toUserId = document.getElementById('toUserId').value;
|
||||
let webSocketUrl = 'ws://172.17.2.42:71';
|
||||
if ('WebSocket' in window) {
|
||||
// console.log(1)
|
||||
socket = new WebSocket(webSocketUrl);
|
||||
} else if ('MozWebSocket' in window) {
|
||||
// console.log(2)
|
||||
socket = new MozWebSocket(webSocketUrl);
|
||||
}
|
||||
// socket = new SockJS('https://' + location.host + '/websocket/' + userId);
|
||||
//连接成功
|
||||
socket.onopen = function (e) {
|
||||
console.log('连接服务器成功!')
|
||||
};
|
||||
//server端请求关闭
|
||||
socket.onclose = function (e) {
|
||||
console.log('close')
|
||||
alert(JSON.stringify(e))
|
||||
|
||||
};
|
||||
//error
|
||||
socket.onerror = function (e) {
|
||||
console.error(e)
|
||||
alert(JSON.stringify(e))
|
||||
};
|
||||
socket.onmessage = onmessage;
|
||||
}
|
||||
//连接服务器
|
||||
startWebsocket();
|
||||
|
||||
</script>
|
|
@ -138,9 +138,9 @@
|
|||
if (this.modulesFiles.length == 8) {
|
||||
this.getData()
|
||||
}
|
||||
} else if(getQueryString('src') == 3){
|
||||
this.modulesFiles = ['10kV_CXX_1_hwg','10kV_JSX_4_hwg', 'BJ', 'DL', 'JG', '1_UPS','2_UPS', 'XG', 'YJDY_Car', 'BackGround','Human','Camera_01','Camera_02',
|
||||
'BS_che','BS_hwg1','BS_hwg2','BS_ups1','BS_ups2']
|
||||
} else if (getQueryString('src') == 3) {
|
||||
this.modulesFiles = ['10kV_CXX_1_hwg', '10kV_JSX_4_hwg', 'BJ', 'DL', 'JG', '1_UPS', '2_UPS', 'XG', 'YJDY_Car', 'BackGround', 'Human', 'Camera_01', 'Camera_02',
|
||||
'BS_che', 'BS_hwg1', 'BS_hwg2', 'BS_ups1', 'BS_ups2']
|
||||
this.modulesFiles.forEach((item, index) => {
|
||||
var obj = {
|
||||
cId: 1,
|
||||
|
@ -170,9 +170,9 @@
|
|||
this.getData()
|
||||
}
|
||||
}
|
||||
else if(getQueryString('src') == 4){
|
||||
this.modulesFiles = ['10kV_CXX_1_hwg','10kV_JSX_4_hwg', 'BJ', 'DL', 'JG', '1_UPS','2_UPS', 'XG', 'YJDY_Car', 'BackGround','Human','Camera_01','Camera_02',
|
||||
'BS_che','BS_hwg1','BS_hwg2','BS_ups1','BS_ups2']
|
||||
else if (getQueryString('src') == 4) {
|
||||
this.modulesFiles = ['10kV_CXX_1_hwg', '10kV_JSX_4_hwg', 'BJ', 'DL', 'JG', '1_UPS', '2_UPS', 'XG', 'YJDY_Car', 'BackGround', 'Human', 'Camera_01', 'Camera_02',
|
||||
'BS_che', 'BS_hwg1', 'BS_hwg2', 'BS_ups1', 'BS_ups2']
|
||||
this.modulesFiles.forEach((item, index) => {
|
||||
var obj = {
|
||||
cId: 1,
|
||||
|
@ -430,9 +430,9 @@
|
|||
// ratio: 0.9, // [0, 1],越大相机越近
|
||||
// });
|
||||
// console.log(e.data.cName,'e.data.cName');
|
||||
// if (e.data.cName.indexOf('monitor')!= -1) {
|
||||
// window.parent.openVideo()
|
||||
// }
|
||||
// // if (e.data.cName.indexOf('monitor')!= -1) {
|
||||
// // window.parent.openVideo()
|
||||
// // }
|
||||
// }
|
||||
// 双击实体
|
||||
if (e.kind === "doubleClickData") {
|
||||
|
@ -442,57 +442,60 @@
|
|||
// animation: true,
|
||||
// ratio: 0.9, // [0, 1],越大相机越近
|
||||
// })
|
||||
if (e.data.cName == 'XG') {
|
||||
let val = 'XG'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*'); // * 通配符 匹配所有地址; content 表示传递过去嵌套iframe页面的数据
|
||||
} else if (e.data.cName == 'JG') {
|
||||
let val = 'JG'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*');
|
||||
}else if (e.data.cName =='Camera_02') {
|
||||
let val = 'Camera_02'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*');
|
||||
}else if (e.data.cName =='Camera_01') {
|
||||
let val = 'Camera_01'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*');
|
||||
}else if (e.data.cName =='Human') {
|
||||
let val = 'Human'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*');
|
||||
}else if(e.data.cName == '1_UPS'){
|
||||
let val = '1_UPS'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
},'*')
|
||||
}else if(e.data.cName == '2_UPS'){
|
||||
let val = '2_UPS'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
},'*')
|
||||
}else if(e.data.cName == 'YJDY_Car'){
|
||||
let val = 'YJDY_Car'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
},'*')
|
||||
}else if(e.data.cName=='10kV_CXX_1_hwg'){
|
||||
let val = '10kV_CXX_1_hwg'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
},'*')
|
||||
}else if(e.data.cName=='10kV_JSX_4_hwg'){
|
||||
let val = '10kV_JSX_4_hwg'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
},'*')
|
||||
}
|
||||
window.setTimeout(() => {
|
||||
if (e.data.cName == 'XG') {
|
||||
let val = 'XG'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*'); // * 通配符 匹配所有地址; content 表示传递过去嵌套iframe页面的数据
|
||||
} else if (e.data.cName == 'JG') {
|
||||
let val = 'JG'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*');
|
||||
} else if (e.data.cName == 'Camera_02') {
|
||||
let val = 'Camera_02'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*');
|
||||
} else if (e.data.cName == 'Camera_01') {
|
||||
let val = 'Camera_01'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*');
|
||||
} else if (e.data.cName == 'Human') {
|
||||
let val = 'Human'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*');
|
||||
} else if (e.data.cName == '1_UPS') {
|
||||
let val = '1_UPS'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*')
|
||||
} else if (e.data.cName == '2_UPS') {
|
||||
let val = '2_UPS'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*')
|
||||
} else if (e.data.cName == 'YJDY_Car') {
|
||||
let val = 'YJDY_Car'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*')
|
||||
} else if (e.data.cName == '10kV_CXX_1_hwg') {
|
||||
let val = '10kV_CXX_1_hwg'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*')
|
||||
} else if (e.data.cName == '10kV_JSX_4_hwg') {
|
||||
let val = '10kV_JSX_4_hwg'
|
||||
window.parent.postMessage({
|
||||
val
|
||||
}, '*')
|
||||
}
|
||||
}, 200)
|
||||
|
||||
}
|
||||
// 开始旋转镜头
|
||||
// if (e.kind === 'beginRotate') {
|
||||
|
@ -503,7 +506,7 @@
|
|||
// 结束旋转镜头
|
||||
// if (e.kind === 'endRotate') {
|
||||
// this.g3d.setVisibleFunc(function(data) { // 设置图元可见性,内部循环
|
||||
// return data.cVisible
|
||||
// return data
|
||||
// });
|
||||
// }
|
||||
});
|
||||
|
@ -571,9 +574,9 @@
|
|||
// 只会创建在modelResource中有对应parentName的实体,多导入的obj不会被创建
|
||||
if (this.modelResource[j].parentName === this.realObj[i].parentName) {
|
||||
this.createNode(this.modelResource[j], this.modelarray);
|
||||
// if (getQueryString('baoDian') == 1) {
|
||||
// this.models[2].cVisible = true
|
||||
// }
|
||||
// if (getQueryString('baoDian') == 1) {
|
||||
// this.models[2].cVisible = true
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -601,7 +604,7 @@
|
|||
this.models[5].setToolTip('名称:监控1');
|
||||
this.models[6].setToolTip('名称:监控2');
|
||||
this.models[7].setToolTip('名称:监控3');
|
||||
} else if(getQueryString('src') == 3){
|
||||
} else if (getQueryString('src') == 3) {
|
||||
this.models[3].cVisible = false
|
||||
// this.createNewIcon()
|
||||
// this.createOldIcon()
|
||||
|
@ -728,7 +731,7 @@
|
|||
// node.setScale3d(17, 17, 17); // 模型放大100倍(x, y, z)
|
||||
this.dm.add(node); // 把node加载到数据容器
|
||||
this.models[node.cId] = node;
|
||||
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
|
|
@ -47,7 +47,8 @@ export const getEnvironmentInfo = (data) => {
|
|||
};
|
||||
export const getSiteInfo = (params) => {
|
||||
return axios.get('electric_interface/gk/info/getSiteInfo', {
|
||||
params
|
||||
params,
|
||||
timeout:1000
|
||||
})
|
||||
};
|
||||
export const getSwitchInfo = (params) => {
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
|
@ -48,7 +48,7 @@ const routes = [
|
|||
name: 'landChildren',
|
||||
meta: {
|
||||
title: '侵华日军南京大屠杀遇难同胞纪念馆',
|
||||
requireLogin: true
|
||||
// requireLogin: true
|
||||
},
|
||||
component: () =>
|
||||
import ('../views/land/child/index.vue'),
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -500,6 +500,7 @@ export default {
|
|||
searchShow: true,
|
||||
leftNum: [],
|
||||
cityId: "",
|
||||
mqttClient: undefined
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -894,7 +895,7 @@ export default {
|
|||
console.log("[MQTT-TEST] 连接回调....");
|
||||
});
|
||||
// 接收回调
|
||||
this.mqttClient.on("message", (topic, message, packet) => {
|
||||
this.mqttClient.on("message", (topic, message) => {
|
||||
console.log(
|
||||
`[MQTT-TEST] 从主题 "${topic}" 收到的内容: ${message.toString()}`
|
||||
);
|
||||
|
@ -903,8 +904,15 @@ export default {
|
|||
// this.infodata[4].num = dataReceived.realTimeLoad
|
||||
console.log(dataReceived.realTimeLoad, "dataReceived");
|
||||
});
|
||||
// this.mqttClient.publish('my-topic','hello,MQTT')
|
||||
}
|
||||
},
|
||||
//发送消息给服务
|
||||
mqttPublish() {
|
||||
let topic = "my-topic"; //和后台约定好的主题
|
||||
message = 'hello,MQTT'
|
||||
this.mqttClient.publish(topic, JSON.stringify(message));
|
||||
},
|
||||
show: function () {
|
||||
this.leftOpen = true;
|
||||
this.rightOpen = true;
|
||||
|
|
Loading…
Reference in New Issue